core/Field/Field.php 1 location
|
@@ 931-936 (lines=6) @@
|
928 |
|
'value' => '', |
929 |
|
), $rule ); |
930 |
|
|
931 |
|
if ( ! in_array( $rule['compare'], $allowed_operators ) ) { |
932 |
|
Incorrect_Syntax_Exception::raise( 'Invalid conditional logic compare operator: <code>' . $rule['compare'] . '</code><br>Allowed operators are: <code>' . |
933 |
|
implode( ', ', $allowed_operators ) . '</code>' ); |
934 |
|
return array(); |
935 |
|
} |
936 |
|
|
937 |
|
if ( in_array( $rule['compare'], array( 'IN', 'NOT IN' ) ) && ! is_array( $rule['value'] ) ) { |
938 |
|
Incorrect_Syntax_Exception::raise( 'Invalid conditional logic value format. An array is expected, when using the "' . $rule['compare'] . '" operator.' ); |
939 |
|
return array(); |
core/Field/Complex_Field.php 1 location
|
@@ 595-601 (lines=7) @@
|
592 |
|
static::LAYOUT_TABBED_VERTICAL, |
593 |
|
); |
594 |
|
|
595 |
|
if ( ! in_array( $layout, $available_layouts ) ) { |
596 |
|
$error_message = 'Incorrect layout ``' . $layout . '" specified. ' . |
597 |
|
'Available layouts: ' . implode( ', ', $available_layouts ); |
598 |
|
|
599 |
|
Incorrect_Syntax_Exception::raise( $error_message ); |
600 |
|
return $this; |
601 |
|
} |
602 |
|
|
603 |
|
$this->layout = $layout; |
604 |
|
|
core/Helper/Helper.php 1 location
|
@@ 239-242 (lines=4) @@
|
236 |
|
$relation = strtoupper( $array[ $relation_key ] ); |
237 |
|
} |
238 |
|
|
239 |
|
if ( ! in_array( $relation, $allowed_relations ) ) { |
240 |
|
Incorrect_Syntax_Exception::raise( 'Invalid relation type ' . $relation . '. ' . |
241 |
|
'The rule should be one of the following: "' . implode( '", "', $allowed_relations ) . '"' ); |
242 |
|
} |
243 |
|
|
244 |
|
return $relation; |
245 |
|
} |