Fix for php 5.3

This commit is contained in:
bzick 2014-10-05 22:01:11 +04:00
parent e55402c2f4
commit 4b65e80312

View File

@ -65,7 +65,7 @@ class Accessor {
* @return string
*/
public static function constant(Tokenizer $tokens) {
$const = [$tokens->skip('.')->need(Tokenizer::MACRO_STRING)->getAndNext()];
$const = array($tokens->skip('.')->need(Tokenizer::MACRO_STRING)->getAndNext());
while($tokens->is('.')) {
$const[] = $tokens->next()->need(Tokenizer::MACRO_STRING)->getAndNext();
}
@ -83,7 +83,7 @@ class Accessor {
* @return string
*/
public static function php(Tokenizer $tokens, Template $tpl) {
$callable = [$tokens->skip('.')->need(Tokenizer::MACRO_STRING)->getAndNext()];
$callable = array($tokens->skip('.')->need(Tokenizer::MACRO_STRING)->getAndNext());
while($tokens->is('.')) {
$callable[] = $tokens->next()->need(Tokenizer::MACRO_STRING)->getAndNext();
}