Skip to content

Incorrect argument types in migration(s). #4324

@JustASideQuestNPC

Description

@JustASideQuestNPC

In app/Database/Migrations/20170502221506_sales_tax_data.php on line 277 (in round_number()):

elseif ($rounding_mode == Migration_Sales_Tax_Data::HALF_FIVE) {
    $rounded_total = round($amount / 5) * 5;
} else {

round() requires a number, but $amount / 5 is a string. Either $amount needs to be converted to a number, or some type annotations are incorrect. This error also exists in app/Database/Migrations/20200202000000_taxamount.php (line 253) and potentially other migration files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugphpPull requests that update Php code

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions