From 7c94caa0cc88f7d473f16c32abe009d14eae4d86 Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Thu, 22 Dec 2011 15:33:11 +1300 Subject: [PATCH] BUGFIX: Fix TokenisedRegularExpression when matching expressions first element is an array --- core/manifest/TokenisedRegularExpression.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/manifest/TokenisedRegularExpression.php b/core/manifest/TokenisedRegularExpression.php index dba58e22a..0a7215b57 100644 --- a/core/manifest/TokenisedRegularExpression.php +++ b/core/manifest/TokenisedRegularExpression.php @@ -27,8 +27,8 @@ class TokenisedRegularExpression { $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(); foreach($startKeys as $startKey) {