Skip to content

Commit

Permalink
Smarty のコンパイル出力ファイルは E_WARNING 及び E_NOTICE を抑制する
Browse files Browse the repository at this point in the history
- see
smarty-php/smarty#605 (comment)
- Smarty のテストケースでも抑制している(https://github.com/smarty-php/smarty/pull/608/files)
  • Loading branch information
nanasess committed Feb 1, 2021
1 parent 1c71ac4 commit ce8445d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/class/SC_View.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public function init()
{
// include_phpの利用のためSmartyBCを呼び出す、ホントはinclude_phpをなくしたいそうすれば、blank.tplもなくせる
$this->_smarty = new SmartyBC;

// see https://github.com/smarty-php/smarty/issues/605#issuecomment-742832333
$this->_smarty->setErrorReporting(E_ALL & ~E_WARNING & ~E_NOTICE);
$this->_smarty->left_delimiter = '<!--{';
$this->_smarty->right_delimiter = '}-->';
$this->_smarty->registerPlugin('modifier', 'sfDispDBDate', function ($dbdate, $time = true) { return SC_Utils_Ex::sfDispDBDate($dbdate, $time); });
Expand Down

0 comments on commit ce8445d

Please sign in to comment.