| @@ 3510-3524 (lines=15) @@ | ||
| 3507 | } | |
| 3508 | $cleaned_value = $this->_construct_between_value( $value, $field_obj ); | |
| 3509 | return $operator . SP . $cleaned_value; | |
| 3510 | 		} elseif ( in_array( $operator, $this->_null_style_operators ) ) { | |
| 3511 | 			if ( $value !== null ) { | |
| 3512 | throw new EE_Error( | |
| 3513 | sprintf( | |
| 3514 | __( | |
| 3515 | "You attempted to give a value (%s) while using a NULL-style operator (%s). That isn't valid", | |
| 3516 | "event_espresso" | |
| 3517 | ), | |
| 3518 | $value, | |
| 3519 | $operator | |
| 3520 | ) | |
| 3521 | ); | |
| 3522 | } | |
| 3523 | return $operator; | |
| 3524 | 		} elseif ( $operator === 'LIKE' && ! is_array( $value ) ) { | |
| 3525 | //if the operator is 'LIKE', we want to allow percent signs (%) and not | |
| 3526 | //remove other junk. So just treat it as a string. | |
| 3527 | return $operator . SP . $this->_wpdb_prepare_using_field( $value, '%s' ); | |
| @@ 3530-3541 (lines=12) @@ | ||
| 3527 | return $operator . SP . $this->_wpdb_prepare_using_field( $value, '%s' ); | |
| 3528 | 		} elseif ( ! in_array( $operator, $this->_in_style_operators ) && ! is_array( $value ) ) { | |
| 3529 | return $operator . SP . $this->_wpdb_prepare_using_field( $value, $field_obj ); | |
| 3530 | 		} elseif ( in_array( $operator, $this->_in_style_operators ) && ! is_array( $value ) ) { | |
| 3531 | throw new EE_Error( | |
| 3532 | sprintf( | |
| 3533 | __( | |
| 3534 | 						"Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))", | |
| 3535 | 'event_espresso' | |
| 3536 | ), | |
| 3537 | $operator, | |
| 3538 | $operator | |
| 3539 | ) | |
| 3540 | ); | |
| 3541 | 		} elseif ( ! in_array( $operator, $this->_in_style_operators ) && is_array( $value ) ) { | |
| 3542 | throw new EE_Error( | |
| 3543 | sprintf( | |
| 3544 | __( | |
| @@ 765-775 (lines=11) @@ | ||
| 762 | // get the file | |
| 763 | require_once( $path ); | |
| 764 | // if the class isn't already declared somewhere | |
| 765 | 			if ( class_exists( $class_name, false ) === false ) { | |
| 766 | // so sorry, not a class | |
| 767 | throw new EE_Error( | |
| 768 | sprintf( | |
| 769 | __( 'The %s file %s does not appear to contain the %s Class.', 'event_espresso' ), | |
| 770 | $type, | |
| 771 | $path, | |
| 772 | $class_name | |
| 773 | ) | |
| 774 | ); | |
| 775 | } | |
| 776 | ||
| 777 | 		} catch ( EE_Error $e ) { | |
| 778 | $e->get_error(); | |