@@ 518-520 (lines=3) @@ | ||
515 | $lookup_value = strtolower($lookup_value); |
|
516 | ||
517 | // lookup_value type has to be number, text, or logical values |
|
518 | if ((!is_numeric($lookup_value)) && (!is_string($lookup_value)) && (!is_bool($lookup_value))) { |
|
519 | return Functions::NA(); |
|
520 | } |
|
521 | ||
522 | // match_type is 0, 1 or -1 |
|
523 | if (($match_type !== 0) && ($match_type !== -1) && ($match_type !== 1)) { |
|
@@ 536-539 (lines=4) @@ | ||
533 | // lookup_array should contain only number, text, or logical values, or empty (null) cells |
|
534 | foreach ($lookup_array as $i => $lookupArrayValue) { |
|
535 | // check the type of the value |
|
536 | if ((!is_numeric($lookupArrayValue)) && (!is_string($lookupArrayValue)) && |
|
537 | (!is_bool($lookupArrayValue)) && (!is_null($lookupArrayValue))) { |
|
538 | return Functions::NA(); |
|
539 | } |
|
540 | // convert strings to lowercase for case-insensitive testing |
|
541 | if (is_string($lookupArrayValue)) { |
|
542 | $lookup_array[$i] = strtolower($lookupArrayValue); |