1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[feature/sql-bool-builder] Adding the IS operator to predicted operators

PHPBB3-13652
This commit is contained in:
brunoais
2015-03-16 11:31:51 +00:00
parent bc6ea5796d
commit 576eaa0cff
2 changed files with 19 additions and 1 deletions

View File

@@ -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);