| @@ 3513-3527 (lines=15) @@ | ||
| 3510 | } | |
| 3511 | $cleaned_value = $this->_construct_between_value( $value, $field_obj ); | |
| 3512 | return $operator . SP . $cleaned_value; | |
| 3513 | 		} elseif ( in_array( $operator, $this->_null_style_operators ) ) { | |
| 3514 | 			if ( $value !== null ) { | |
| 3515 | throw new EE_Error( | |
| 3516 | sprintf( | |
| 3517 | __( | |
| 3518 | "You attempted to give a value (%s) while using a NULL-style operator (%s). That isn't valid", | |
| 3519 | "event_espresso" | |
| 3520 | ), | |
| 3521 | $value, | |
| 3522 | $operator | |
| 3523 | ) | |
| 3524 | ); | |
| 3525 | } | |
| 3526 | return $operator; | |
| 3527 | 		} elseif ( $operator === 'LIKE' && ! is_array( $value ) ) { | |
| 3528 | //if the operator is 'LIKE', we want to allow percent signs (%) and not | |
| 3529 | //remove other junk. So just treat it as a string. | |
| 3530 | return $operator . SP . $this->_wpdb_prepare_using_field( $value, '%s' ); | |
| @@ 3533-3544 (lines=12) @@ | ||
| 3530 | return $operator . SP . $this->_wpdb_prepare_using_field( $value, '%s' ); | |
| 3531 | 		} elseif ( ! in_array( $operator, $this->_in_style_operators ) && ! is_array( $value ) ) { | |
| 3532 | return $operator . SP . $this->_wpdb_prepare_using_field( $value, $field_obj ); | |
| 3533 | 		} elseif ( in_array( $operator, $this->_in_style_operators ) && ! is_array( $value ) ) { | |
| 3534 | throw new EE_Error( | |
| 3535 | sprintf( | |
| 3536 | __( | |
| 3537 | 						"Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))", | |
| 3538 | 'event_espresso' | |
| 3539 | ), | |
| 3540 | $operator, | |
| 3541 | $operator | |
| 3542 | ) | |
| 3543 | ); | |
| 3544 | 		} elseif ( ! in_array( $operator, $this->_in_style_operators ) && is_array( $value ) ) { | |
| 3545 | throw new EE_Error( | |
| 3546 | sprintf( | |
| 3547 | __( | |
| @@ 697-707 (lines=11) @@ | ||
| 694 | // get the file | |
| 695 | require_once( $path ); | |
| 696 | // if the class isn't already declared somewhere | |
| 697 | 			if ( class_exists( $class_name, false ) === false ) { | |
| 698 | // so sorry, not a class | |
| 699 | throw new EE_Error( | |
| 700 | sprintf( | |
| 701 | __( 'The %s file %s does not appear to contain the %s Class.', 'event_espresso' ), | |
| 702 | $type, | |
| 703 | $path, | |
| 704 | $class_name | |
| 705 | ) | |
| 706 | ); | |
| 707 | } | |
| 708 | ||
| 709 | 		} catch ( EE_Error $e ) { | |
| 710 | $e->get_error(); | |