Internal: OQL error reporting

SVN:trunk[4717]
This commit is contained in:
Guillaume Lajarige
2017-05-02 09:11:00 +00:00
parent 294964b227
commit f9ed88a084

View File

@@ -411,12 +411,14 @@ class DBObjectSearch extends DBSearch
case "IN":
if (!is_array($value)) $value = array($value);
if (count($value) === 0) throw new Exception('AddCondition '.$sOpCode.': Value cannot be an empty array.');
$sListExpr = '('.implode(', ', CMDBSource::Quote($value)).')';
$sOQLCondition = $oField->Render()." IN $sListExpr";
break;
case "NOTIN":
if (!is_array($value)) $value = array($value);
if (count($value) === 0) throw new Exception('AddCondition '.$sOpCode.': Value cannot be an empty array.');
$sListExpr = '('.implode(', ', CMDBSource::Quote($value)).')';
$sOQLCondition = $oField->Render()." NOT IN $sListExpr";
break;