Skip to content

Commit

Permalink
bug fix:
Browse files Browse the repository at this point in the history
修正模板解析日期处理错误
feature:

version:
v3.1
  • Loading branch information
hainuo committed Sep 5, 2016
1 parent 2146ad1 commit 4efd4f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/lib/tpl.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public function compileDate(&$content)
$limit = '/{x2;date:([^,]+),([^}]+)}/';
$replace = "'<?php echo date(\${2},'.\$this->_compileArray('\${1}').'); ?>'";
$content = preg_replace_callback($limit,function($matches){
return '<?php echo date($'.$matches[2].','.$this->_compileArray($matches[1]).');?>';
return '<?php echo date('.$matches[2].','.$this->_compileArray($matches[1]).');?>';
},$content);
}

Expand Down

0 comments on commit 4efd4f1

Please sign in to comment.