Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print original params in Carbon\Traits\Units::addUnit error message #2677

Merged

Commits on Sep 20, 2022

  1. Print original params in Carbon\Traits\Units::addUnit error message

    Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a parameter, but will instead provide the current value.
    The parameter "$unit" was changed in previous lines. So the exception message contains the changed value.
    This commit preserves the original arguments in variable to be eventually used in the error message.
    costasovo committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    98c780f View commit details
    Browse the repository at this point in the history