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