BUGFIX: Fix TokenisedRegularExpression when matching expressions first element is an array

This commit is contained in:
Hamish Friedlander 2011-12-22 15:33:11 +13:00
parent 4315e51358
commit 7c94caa0cc

View File

@ -27,8 +27,8 @@ class TokenisedRegularExpression {
$tokens[$i] = array($token, $token); $tokens[$i] = array($token, $token);
} }
} }
$startKeys = array_keys($tokenTypes, $this->expression[0]); $startKeys = array_keys($tokenTypes, is_array($this->expression[0]) ? $this->expression[0][0] : $this->expression[0]);
$allMatches = array(); $allMatches = array();
foreach($startKeys as $startKey) { foreach($startKeys as $startKey) {