mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-26 04:52:36 +01:00
[feature/sql-bool-builder] Adding the IS operator to predicted operators
PHPBB3-13652
This commit is contained in:
parent
bc6ea5796d
commit
576eaa0cff
@ -866,6 +866,24 @@ abstract class driver implements driver_interface
|
||||
|
||||
break;
|
||||
|
||||
case 'IS_NOT':
|
||||
|
||||
$condition[1] = 'IS NOT';
|
||||
|
||||
// no break
|
||||
case 'IS':
|
||||
|
||||
// If the value is NULL, the string of it is the empty string ('') which is not the intended result.
|
||||
// this should solve that
|
||||
if ($condition[2] === null)
|
||||
{
|
||||
$condition[2] = 'NULL';
|
||||
}
|
||||
|
||||
$condition = implode(' ', $condition);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
$condition = implode(' ', $condition);
|
||||
|
@ -153,7 +153,7 @@ class phpbb_boolean_processor_test extends phpbb_database_test_case
|
||||
),
|
||||
array('AND',
|
||||
array('ug.group_id', '=', 1),
|
||||
array('b.ban_id', 'IS NOT', NULL),
|
||||
array('b.ban_id', 'IS_NOT', NULL),
|
||||
),
|
||||
),
|
||||
array('u.user_id', '=', 'ug.user_id'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user