We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello. I propose to improve the "plus" function.
php-liquid/src/Liquid/StandardFilters.php
Line 334 in d3e9c3d
For the possibility of adding an unlimited number of parameters. Example: {{ 4 | plus: 2, 3, 7 }}
Решение:
public static function plus($input, $operand) { //return (float)$input + (float)$operand; $args = func_get_args(); unset($args[0]); if ($args) { $input = (float) $input; foreach ($args as $arg) { if ($arg) { $input += (float) $arg; } } return $input; } else { return $input; } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello. I propose to improve the "plus" function.
php-liquid/src/Liquid/StandardFilters.php
Line 334 in d3e9c3d
For the possibility of adding an unlimited number of parameters.
Example:
{{ 4 | plus: 2, 3, 7 }}
Решение:
The text was updated successfully, but these errors were encountered: