| @@ 4102-4116 (lines=15) @@ | ||
| 4099 | } |
|
| 4100 | $cleaned_value = $this->_construct_between_value($value, $field_obj); |
|
| 4101 | return $operator . SP . $cleaned_value; |
|
| 4102 | } elseif (in_array($operator, $this->_null_style_operators)) { |
|
| 4103 | if ($value !== null) { |
|
| 4104 | throw new EE_Error( |
|
| 4105 | sprintf( |
|
| 4106 | __( |
|
| 4107 | "You attempted to give a value (%s) while using a NULL-style operator (%s). That isn't valid", |
|
| 4108 | "event_espresso" |
|
| 4109 | ), |
|
| 4110 | $value, |
|
| 4111 | $operator |
|
| 4112 | ) |
|
| 4113 | ); |
|
| 4114 | } |
|
| 4115 | return $operator; |
|
| 4116 | } elseif ($operator === 'LIKE' && ! is_array($value)) { |
|
| 4117 | //if the operator is 'LIKE', we want to allow percent signs (%) and not |
|
| 4118 | //remove other junk. So just treat it as a string. |
|
| 4119 | return $operator . SP . $this->_wpdb_prepare_using_field($value, '%s'); |
|
| @@ 4122-4133 (lines=12) @@ | ||
| 4119 | return $operator . SP . $this->_wpdb_prepare_using_field($value, '%s'); |
|
| 4120 | } elseif (! in_array($operator, $this->_in_style_operators) && ! is_array($value)) { |
|
| 4121 | return $operator . SP . $this->_wpdb_prepare_using_field($value, $field_obj); |
|
| 4122 | } elseif (in_array($operator, $this->_in_style_operators) && ! is_array($value)) { |
|
| 4123 | throw new EE_Error( |
|
| 4124 | sprintf( |
|
| 4125 | __( |
|
| 4126 | "Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))", |
|
| 4127 | 'event_espresso' |
|
| 4128 | ), |
|
| 4129 | $operator, |
|
| 4130 | $operator |
|
| 4131 | ) |
|
| 4132 | ); |
|
| 4133 | } elseif (! in_array($operator, $this->_in_style_operators) && is_array($value)) { |
|
| 4134 | throw new EE_Error( |
|
| 4135 | sprintf( |
|
| 4136 | __( |
|
| @@ 811-821 (lines=11) @@ | ||
| 808 | // get the file |
|
| 809 | require_once($path); |
|
| 810 | // if the class isn't already declared somewhere |
|
| 811 | if (class_exists($class_name, false) === false) { |
|
| 812 | // so sorry, not a class |
|
| 813 | throw new EE_Error( |
|
| 814 | sprintf( |
|
| 815 | __('The %s file %s does not appear to contain the %s Class.', 'event_espresso'), |
|
| 816 | $type, |
|
| 817 | $path, |
|
| 818 | $class_name |
|
| 819 | ) |
|
| 820 | ); |
|
| 821 | } |
|
| 822 | } catch (EE_Error $e) { |
|
| 823 | $e->get_error(); |
|
| 824 | return false; |
|