| @@ 3462-3476 (lines=15) @@ | ||
| 3459 | } | |
| 3460 | $cleaned_value = $this->_construct_between_value( $value, $field_obj ); | |
| 3461 | return $operator . SP . $cleaned_value; | |
| 3462 | 		} elseif ( in_array( $operator, $this->_null_style_operators ) ) { | |
| 3463 | 			if ( $value !== null ) { | |
| 3464 | throw new EE_Error( | |
| 3465 | sprintf( | |
| 3466 | __( | |
| 3467 | "You attempted to give a value (%s) while using a NULL-style operator (%s). That isn't valid", | |
| 3468 | "event_espresso" | |
| 3469 | ), | |
| 3470 | $value, | |
| 3471 | $operator | |
| 3472 | ) | |
| 3473 | ); | |
| 3474 | } | |
| 3475 | return $operator; | |
| 3476 | 		} elseif ( $operator === 'LIKE' && ! is_array( $value ) ) { | |
| 3477 | //if the operator is 'LIKE', we want to allow percent signs (%) and not | |
| 3478 | //remove other junk. So just treat it as a string. | |
| 3479 | return $operator . SP . $this->_wpdb_prepare_using_field( $value, '%s' ); | |
| @@ 3482-3484 (lines=3) @@ | ||
| 3479 | return $operator . SP . $this->_wpdb_prepare_using_field( $value, '%s' ); | |
| 3480 | 		} elseif ( ! in_array( $operator, $this->_in_style_operators ) && ! is_array( $value ) ) { | |
| 3481 | return $operator . SP . $this->_wpdb_prepare_using_field( $value, $field_obj ); | |
| 3482 | 		} elseif ( in_array( $operator, $this->_in_style_operators ) && ! is_array( $value ) ) { | |
| 3483 | throw new EE_Error( | |
| 3484 | sprintf( | |
| 3485 | __( | |
| 3486 | 						"Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))", | |
| 3487 | 'event_espresso' | |
| @@ 694-704 (lines=11) @@ | ||
| 691 | // get the file | |
| 692 | require_once( $path ); | |
| 693 | // if the class isn't already declared somewhere | |
| 694 | 			if ( class_exists( $class_name, false ) === false ) { | |
| 695 | // so sorry, not a class | |
| 696 | throw new EE_Error( | |
| 697 | sprintf( | |
| 698 | __( 'The %s file %s does not appear to contain the %s Class.', 'event_espresso' ), | |
| 699 | $type, | |
| 700 | $path, | |
| 701 | $class_name | |
| 702 | ) | |
| 703 | ); | |
| 704 | } | |
| 705 | ||
| 706 | 		} catch ( EE_Error $e ) { | |
| 707 | $e->get_error(); | |