| @@ 4106-4120 (lines=15) @@ | ||
| 4103 | } | |
| 4104 | $cleaned_value = $this->_construct_between_value($value, $field_obj); | |
| 4105 | return $operator . SP . $cleaned_value; | |
| 4106 |         } elseif (in_array($operator, $this->_null_style_operators)) { | |
| 4107 |             if ($value !== null) { | |
| 4108 | throw new EE_Error( | |
| 4109 | sprintf( | |
| 4110 | __( | |
| 4111 | "You attempted to give a value (%s) while using a NULL-style operator (%s). That isn't valid", | |
| 4112 | "event_espresso" | |
| 4113 | ), | |
| 4114 | $value, | |
| 4115 | $operator | |
| 4116 | ) | |
| 4117 | ); | |
| 4118 | } | |
| 4119 | return $operator; | |
| 4120 |         } elseif ($operator === 'LIKE' && ! is_array($value)) { | |
| 4121 | //if the operator is 'LIKE', we want to allow percent signs (%) and not | |
| 4122 | //remove other junk. So just treat it as a string. | |
| 4123 | return $operator . SP . $this->_wpdb_prepare_using_field($value, '%s'); | |
| @@ 4126-4137 (lines=12) @@ | ||
| 4123 | return $operator . SP . $this->_wpdb_prepare_using_field($value, '%s'); | |
| 4124 |         } elseif (! in_array($operator, $this->_in_style_operators) && ! is_array($value)) { | |
| 4125 | return $operator . SP . $this->_wpdb_prepare_using_field($value, $field_obj); | |
| 4126 |         } elseif (in_array($operator, $this->_in_style_operators) && ! is_array($value)) { | |
| 4127 | throw new EE_Error( | |
| 4128 | sprintf( | |
| 4129 | __( | |
| 4130 |                         "Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))", | |
| 4131 | 'event_espresso' | |
| 4132 | ), | |
| 4133 | $operator, | |
| 4134 | $operator | |
| 4135 | ) | |
| 4136 | ); | |
| 4137 |         } elseif (! in_array($operator, $this->_in_style_operators) && is_array($value)) { | |
| 4138 | throw new EE_Error( | |
| 4139 | sprintf( | |
| 4140 | __( | |
| @@ 886-896 (lines=11) @@ | ||
| 883 | // get the file | |
| 884 | require_once($path); | |
| 885 | // if the class isn't already declared somewhere | |
| 886 |             if (class_exists($class_name, false) === false) { | |
| 887 | // so sorry, not a class | |
| 888 | throw new EE_Error( | |
| 889 | sprintf( | |
| 890 |                         __('The %s file %s does not appear to contain the %s Class.', 'event_espresso'), | |
| 891 | $type, | |
| 892 | $path, | |
| 893 | $class_name | |
| 894 | ) | |
| 895 | ); | |
| 896 | } | |
| 897 |         } catch (EE_Error $e) { | |
| 898 | $e->get_error(); | |
| 899 | return false; | |