| @@ 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(); |
|
| @@ 3500-3514 (lines=15) @@ | ||
| 3497 | } |
|
| 3498 | $cleaned_value = $this->_construct_between_value( $value, $field_obj ); |
|
| 3499 | return $operator . SP . $cleaned_value; |
|
| 3500 | } elseif ( in_array( $operator, $this->_null_style_operators ) ) { |
|
| 3501 | if ( $value !== null ) { |
|
| 3502 | throw new EE_Error( |
|
| 3503 | sprintf( |
|
| 3504 | __( |
|
| 3505 | "You attempted to give a value (%s) while using a NULL-style operator (%s). That isn't valid", |
|
| 3506 | "event_espresso" |
|
| 3507 | ), |
|
| 3508 | $value, |
|
| 3509 | $operator |
|
| 3510 | ) |
|
| 3511 | ); |
|
| 3512 | } |
|
| 3513 | return $operator; |
|
| 3514 | } elseif ( $operator === 'LIKE' && ! is_array( $value ) ) { |
|
| 3515 | //if the operator is 'LIKE', we want to allow percent signs (%) and not |
|
| 3516 | //remove other junk. So just treat it as a string. |
|
| 3517 | return $operator . SP . $this->_wpdb_prepare_using_field( $value, '%s' ); |
|
| @@ 3520-3531 (lines=12) @@ | ||
| 3517 | return $operator . SP . $this->_wpdb_prepare_using_field( $value, '%s' ); |
|
| 3518 | } elseif ( ! in_array( $operator, $this->_in_style_operators ) && ! is_array( $value ) ) { |
|
| 3519 | return $operator . SP . $this->_wpdb_prepare_using_field( $value, $field_obj ); |
|
| 3520 | } elseif ( in_array( $operator, $this->_in_style_operators ) && ! is_array( $value ) ) { |
|
| 3521 | throw new EE_Error( |
|
| 3522 | sprintf( |
|
| 3523 | __( |
|
| 3524 | "Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))", |
|
| 3525 | 'event_espresso' |
|
| 3526 | ), |
|
| 3527 | $operator, |
|
| 3528 | $operator |
|
| 3529 | ) |
|
| 3530 | ); |
|
| 3531 | } elseif ( ! in_array( $operator, $this->_in_style_operators ) && is_array( $value ) ) { |
|
| 3532 | throw new EE_Error( |
|
| 3533 | sprintf( |
|
| 3534 | __( |
|