Skip to content
Permalink
Browse files

MDL-47509 Profile restriction: Broken Oracle causes problem

  • Loading branch information...
sammarshallou authored and stronk7 committed Oct 2, 2014
1 parent 6597413 commit 9634c60e7b45bbcd36e86f0e1ed339b3094a9a0d
Showing with 4 additions and 2 deletions.
  1. +4 −2 availability/condition/profile/classes/condition.php
@@ -538,10 +538,12 @@ private function get_condition_sql($field, $field2 = null) {
break;
case self::OP_IS_EMPTY:
// Mimic PHP empty() behaviour for strings, '0' or ''.
$sql = '(' . $field . " IN ('0', '') OR $field2 IS NULL)";
$emptystring = self::unique_sql_parameter($params, '');
$sql = '(' . $field . " IN ('0', $emptystring) OR $field2 IS NULL)";
break;
case self::OP_IS_NOT_EMPTY:
$sql = '(' . $field . " NOT IN ('0', '') AND $field2 IS NOT NULL)";
$emptystring = self::unique_sql_parameter($params, '');
$sql = '(' . $field . " NOT IN ('0', $emptystring) AND $field2 IS NOT NULL)";
break;
}
return array($sql, $params);

0 comments on commit 9634c60

Please sign in to comment.
You can’t perform that action at this time.