You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
In Zend\Db\Sql\Expression, update the constructor to explicitly check for '0' when setting parameters
if ($parameters || $parameters === '0') {
$this->setParameters($parameters);
}
The text was updated successfully, but these errors were encountered:
albertor24
changed the title
Incorrect expression parameters when passing zero
Incorrect Sql Expression parameters when passing zero in the constructor
Jul 3, 2019
I am trying to create an expression that has zero as the parameter value. However, the parameters incorrectly show as empty.
Code to reproduce the issue
Expected results
It prints "0"
Actual results
It prints empty array
Proposed fix
https://github.com/zendframework/zend-db/blob/master/src/Sql/Expression.php#L59
In
Zend\Db\Sql\Expression
, update the constructor to explicitly check for '0' when setting parametersThe text was updated successfully, but these errors were encountered: