Commit 98acd147 authored by Jeremy Mikola's avatar Jeremy Mikola

Rewind is_first_key_operator() param before checking key

parent 6590854b
...@@ -77,9 +77,10 @@ function is_first_key_operator($document) ...@@ -77,9 +77,10 @@ function is_first_key_operator($document)
throw InvalidArgumentException::invalidType('$document', $document, 'array or object'); throw InvalidArgumentException::invalidType('$document', $document, 'array or object');
} }
reset($document);
$firstKey = (string) key($document); $firstKey = (string) key($document);
return (isset($firstKey[0]) && $firstKey[0] == '$'); return (isset($firstKey[0]) && $firstKey[0] === '$');
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment