|
@@ 4172-4186 (lines=15) @@
|
| 4169 |
|
} |
| 4170 |
|
$cleaned_value = $this->_construct_between_value($value, $field_obj); |
| 4171 |
|
return $operator . SP . $cleaned_value; |
| 4172 |
|
} elseif (in_array($operator, $this->_null_style_operators)) { |
| 4173 |
|
if ($value !== null) { |
| 4174 |
|
throw new EE_Error( |
| 4175 |
|
sprintf( |
| 4176 |
|
__( |
| 4177 |
|
"You attempted to give a value (%s) while using a NULL-style operator (%s). That isn't valid", |
| 4178 |
|
"event_espresso" |
| 4179 |
|
), |
| 4180 |
|
$value, |
| 4181 |
|
$operator |
| 4182 |
|
) |
| 4183 |
|
); |
| 4184 |
|
} |
| 4185 |
|
return $operator; |
| 4186 |
|
} elseif ($operator === 'LIKE' && ! is_array($value)) { |
| 4187 |
|
//if the operator is 'LIKE', we want to allow percent signs (%) and not |
| 4188 |
|
//remove other junk. So just treat it as a string. |
| 4189 |
|
return $operator . SP . $this->_wpdb_prepare_using_field($value, '%s'); |
|
@@ 4192-4203 (lines=12) @@
|
| 4189 |
|
return $operator . SP . $this->_wpdb_prepare_using_field($value, '%s'); |
| 4190 |
|
} elseif (! in_array($operator, $this->_in_style_operators) && ! is_array($value)) { |
| 4191 |
|
return $operator . SP . $this->_wpdb_prepare_using_field($value, $field_obj); |
| 4192 |
|
} elseif (in_array($operator, $this->_in_style_operators) && ! is_array($value)) { |
| 4193 |
|
throw new EE_Error( |
| 4194 |
|
sprintf( |
| 4195 |
|
__( |
| 4196 |
|
"Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))", |
| 4197 |
|
'event_espresso' |
| 4198 |
|
), |
| 4199 |
|
$operator, |
| 4200 |
|
$operator |
| 4201 |
|
) |
| 4202 |
|
); |
| 4203 |
|
} elseif (! in_array($operator, $this->_in_style_operators) && is_array($value)) { |
| 4204 |
|
throw new EE_Error( |
| 4205 |
|
sprintf( |
| 4206 |
|
__( |