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
$origvalue = 0;
$e = new Xyster_Data_Expression('field', '=', $origvalue);
$value = $e->getRight();
if ($value != $origvalue) die("The expression value changed!\n");
The problem lies within the __constructor() method of Xyster_Data_Expression:
if ( $value == "NULL" ) {
$value = null;
}
That should be at least $value === "NULL" to prevent a zero from being translated into NULL. Arguably, this kind of check should not be in this constructor at all, since this case would break too:
// I checked and on my website I *do* have a user that goes by this name ;-)
$e = new Xyster_Data_Expression('name', '=', 'NULL');
If this is in here for support in XSQL, I suggest to fully remove the check and let the decision to search for a NULL value to the XSQL parsing process. Reporter: Maurice Makaay Begin: 2009-08-24 Completed: 0
The text was updated successfully, but these errors were encountered:
First of all: thank you for building Xyster!
Problem case:
The problem lies within the __constructor() method of Xyster_Data_Expression:
That should be at least $value === "NULL" to prevent a zero from being translated into NULL. Arguably, this kind of check should not be in this constructor at all, since this case would break too:
If this is in here for support in XSQL, I suggest to fully remove the check and let the decision to search for a NULL value to the XSQL parsing process.
Reporter: Maurice Makaay
Begin: 2009-08-24
Completed: 0
The text was updated successfully, but these errors were encountered: