|
@@ 3236-3241 (lines=6) @@
|
3233 |
|
throw new EE_Error( sprintf( __("The '%s' operator must be used with an array of values and there must be exactly TWO values in that array.", 'event_espresso'), "BETWEEN" ) ); |
3234 |
|
$cleaned_value = $this->_construct_between_value( $value, $field_obj ); |
3235 |
|
return $operator.SP.$cleaned_value; |
3236 |
|
} elseif( in_array( $operator, $this->_null_style_operators ) ) { |
3237 |
|
if($value != NULL){ |
3238 |
|
throw new EE_Error(sprintf(__("You attempted to give a value (%s) while using a NULL-style operator (%s). That isn't valid", "event_espresso"),$value,$operator)); |
3239 |
|
} |
3240 |
|
return $operator; |
3241 |
|
}elseif( $operator == 'LIKE' && ! is_array($value)){ |
3242 |
|
//if the operator is 'LIKE', we want to allow percent signs (%) and not |
3243 |
|
//remove other junk. So just treat it as a string. |
3244 |
|
return $operator.SP.$this->_wpdb_prepare_using_field($value, '%s'); |
|
@@ 3247-3249 (lines=3) @@
|
3244 |
|
return $operator.SP.$this->_wpdb_prepare_using_field($value, '%s'); |
3245 |
|
}elseif( ! in_array($operator, $this->_in_style_operators) && ! is_array($value)){ |
3246 |
|
return $operator.SP.$this->_wpdb_prepare_using_field($value,$field_obj); |
3247 |
|
}elseif(in_array($operator, $this->_in_style_operators) && ! is_array($value)){ |
3248 |
|
throw new EE_Error(sprintf(__("Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))",'event_espresso'),$operator, $operator)); |
3249 |
|
}elseif( ! in_array($operator, $this->_in_style_operators) && is_array($value)){ |
3250 |
|
throw new EE_Error(sprintf(__("Operator '%s' must be used with a single value, not an array. Eg 'Registration.REG_ID => array('%s',23))",'event_espresso'),$operator,$operator)); |
3251 |
|
}else{ |
3252 |
|
throw new EE_Error(sprintf(__("It appears you've provided some totally invalid query parameters. Operator and value were:'%s', which isn't right at all", "event_espresso"), http_build_query($op_and_value))); |