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