Updated \RTEX\Objects\Program\Instructions > ArrayGet
This commit is contained in:
parent
cf36d18612
commit
cfb55fd7df
1 changed files with 2 additions and 2 deletions
|
@ -122,9 +122,9 @@
|
||||||
$array = $engine->eval($this->Array);
|
$array = $engine->eval($this->Array);
|
||||||
|
|
||||||
if (!is_array($array))
|
if (!is_array($array))
|
||||||
throw new KeyException(sprintf('Cannot read from non-array value of type %s', Utilities::getType($array)));
|
throw new KeyException(sprintf('Cannot read from non-array value of type %s', Utilities::getType($array, true)));
|
||||||
if(!is_string($value) && !is_int($value))
|
if(!is_string($value) && !is_int($value))
|
||||||
throw new TypeException(sprintf('Cannot read from array with non-string value %s', Utilities::getType($value)));
|
throw new TypeException(sprintf('Cannot read from array with non-string value %s', Utilities::getType($value, true)));
|
||||||
if(!Validate::validateRegex($value, RegexPatterns::ArrayQuery))
|
if(!Validate::validateRegex($value, RegexPatterns::ArrayQuery))
|
||||||
throw new KeyException(sprintf('Cannot read from array with invalid query %s', $value));
|
throw new KeyException(sprintf('Cannot read from array with invalid query %s', $value));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue