| @@ 4350-4364 (lines=15) @@ | ||
| 4347 | $cleaned_value = $this->_construct_between_value($value, $field_obj); |
|
| 4348 | return $operator . SP . $cleaned_value; |
|
| 4349 | } |
|
| 4350 | if (in_array($operator, $this->valid_null_style_operators())) { |
|
| 4351 | if ($value !== null) { |
|
| 4352 | throw new EE_Error( |
|
| 4353 | sprintf( |
|
| 4354 | __( |
|
| 4355 | "You attempted to give a value (%s) while using a NULL-style operator (%s). That isn't valid", |
|
| 4356 | "event_espresso" |
|
| 4357 | ), |
|
| 4358 | $value, |
|
| 4359 | $operator |
|
| 4360 | ) |
|
| 4361 | ); |
|
| 4362 | } |
|
| 4363 | return $operator; |
|
| 4364 | } |
|
| 4365 | if (in_array($operator, $this->valid_like_style_operators()) && ! is_array($value)) { |
|
| 4366 | //if the operator is 'LIKE', we want to allow percent signs (%) and not |
|
| 4367 | //remove other junk. So just treat it as a string. |
|
| @@ 4373-4384 (lines=12) @@ | ||
| 4370 | if (! in_array($operator, $this->valid_in_style_operators()) && ! is_array($value)) { |
|
| 4371 | return $operator . SP . $this->_wpdb_prepare_using_field($value, $field_obj); |
|
| 4372 | } |
|
| 4373 | if (in_array($operator, $this->valid_in_style_operators()) && ! is_array($value)) { |
|
| 4374 | throw new EE_Error( |
|
| 4375 | sprintf( |
|
| 4376 | __( |
|
| 4377 | "Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))", |
|
| 4378 | 'event_espresso' |
|
| 4379 | ), |
|
| 4380 | $operator, |
|
| 4381 | $operator |
|
| 4382 | ) |
|
| 4383 | ); |
|
| 4384 | } |
|
| 4385 | if (! in_array($operator, $this->valid_in_style_operators()) && is_array($value)) { |
|
| 4386 | throw new EE_Error( |
|
| 4387 | sprintf( |
|
| @@ 4385-4396 (lines=12) @@ | ||
| 4382 | ) |
|
| 4383 | ); |
|
| 4384 | } |
|
| 4385 | if (! in_array($operator, $this->valid_in_style_operators()) && is_array($value)) { |
|
| 4386 | throw new EE_Error( |
|
| 4387 | sprintf( |
|
| 4388 | __( |
|
| 4389 | "Operator '%s' must be used with a single value, not an array. Eg 'Registration.REG_ID => array('%s',23))", |
|
| 4390 | 'event_espresso' |
|
| 4391 | ), |
|
| 4392 | $operator, |
|
| 4393 | $operator |
|
| 4394 | ) |
|
| 4395 | ); |
|
| 4396 | } |
|
| 4397 | throw new EE_Error( |
|
| 4398 | sprintf( |
|
| 4399 | __( |
|