【PHP】Smarty【Template】

このエントリーをはてなブックマークに追加
984$default_modifiers、$debuggingの設定でparse error
$default_modifiers、$debuggingを設定して、テンプレートで{if empty($hoge)}を使うと
debug.tpl.phpがParse errorになるのですが、
最後に述べる解決方法でより良いものを知っている人が教えてください。
問題の発端は{$hoge}でParse errorになったのですが、そちらは解決できました。
(PHP 4.3.9とSmarty 2.6.9を使用
・hello.php
<?php
require_once("libs/Smarty.class.php");
$o_smarty=new Smarty();
$o_smarty->default_modifiers=array("upper");
$o_smarty->assign("hoge","abc");
$o_smarty->debugging=true;
$o_smarty->display("hello.tpl");
?>
・hello.tpl
<html><head><title></title></head><body>
{$hoge}</body></html>
・出力
ABC
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
(中略)templates_c(中略)debug.tpl.php on line 10
・debug.tpl.php 10行目
<?php if (isset ( ((is_array($_tmp=$this->_tpl_vars['_smarty_debug_output'])) ?
$this->_run_mod_handler('upper', true, $_tmp) : smarty_modifier_upper($_tmp)) ) && ((is_array($_tmp=$this->_tpl_vars['_smarty_debug_output'])) ? $this->_run_mod_handler('upper', true, $_tmp) : smarty_modifier_upper($_tmp)) == 'html'): ?>
・解決方法
core.display_debug_console.phpを修正
http://www.phpinsider.com/smarty-forum/viewtopic.php?t=5179&highlight=expecting+tvariable
件の解決策は以下を考えました。
・if empty($hoge|smarty:nodefaults)と書いてParse errorを避ける。
・またはデバッグの時は、default_modifiersをコメントにする。
根本的な解決策はSmarty側のどこかのソースを修正しなければならないのでしょうか?
(できればhello.tpl、phpは修正したくないです。)