| @@ 4382-4396 (lines=15) @@ | ||
| 4379 | $cleaned_value = $this->_construct_between_value($value, $field_obj); |
|
| 4380 | return $operator . SP . $cleaned_value; |
|
| 4381 | } |
|
| 4382 | if (in_array($operator, $this->valid_null_style_operators())) { |
|
| 4383 | if ($value !== null) { |
|
| 4384 | throw new EE_Error( |
|
| 4385 | sprintf( |
|
| 4386 | __( |
|
| 4387 | "You attempted to give a value (%s) while using a NULL-style operator (%s). That isn't valid", |
|
| 4388 | "event_espresso" |
|
| 4389 | ), |
|
| 4390 | $value, |
|
| 4391 | $operator |
|
| 4392 | ) |
|
| 4393 | ); |
|
| 4394 | } |
|
| 4395 | return $operator; |
|
| 4396 | } |
|
| 4397 | if (in_array($operator, $this->valid_like_style_operators()) && ! is_array($value)) { |
|
| 4398 | // if the operator is 'LIKE', we want to allow percent signs (%) and not |
|
| 4399 | // remove other junk. So just treat it as a string. |
|
| @@ 4405-4416 (lines=12) @@ | ||
| 4402 | if (! in_array($operator, $this->valid_in_style_operators()) && ! is_array($value)) { |
|
| 4403 | return $operator . SP . $this->_wpdb_prepare_using_field($value, $field_obj); |
|
| 4404 | } |
|
| 4405 | if (in_array($operator, $this->valid_in_style_operators()) && ! is_array($value)) { |
|
| 4406 | throw new EE_Error( |
|
| 4407 | sprintf( |
|
| 4408 | __( |
|
| 4409 | "Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))", |
|
| 4410 | 'event_espresso' |
|
| 4411 | ), |
|
| 4412 | $operator, |
|
| 4413 | $operator |
|
| 4414 | ) |
|
| 4415 | ); |
|
| 4416 | } |
|
| 4417 | if (! in_array($operator, $this->valid_in_style_operators()) && is_array($value)) { |
|
| 4418 | throw new EE_Error( |
|
| 4419 | sprintf( |
|
| @@ 4417-4428 (lines=12) @@ | ||
| 4414 | ) |
|
| 4415 | ); |
|
| 4416 | } |
|
| 4417 | if (! in_array($operator, $this->valid_in_style_operators()) && is_array($value)) { |
|
| 4418 | throw new EE_Error( |
|
| 4419 | sprintf( |
|
| 4420 | __( |
|
| 4421 | "Operator '%s' must be used with a single value, not an array. Eg 'Registration.REG_ID => array('%s',23))", |
|
| 4422 | 'event_espresso' |
|
| 4423 | ), |
|
| 4424 | $operator, |
|
| 4425 | $operator |
|
| 4426 | ) |
|
| 4427 | ); |
|
| 4428 | } |
|
| 4429 | throw new EE_Error( |
|
| 4430 | sprintf( |
|
| 4431 | __( |
|