facebook twitter hatena line email

「Php/Smarty/smarty3」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(ページの作成:「==smarty3== php8だと2026/4時点の最新(3.1.48)は警告が出る。 https://github.com/smarty-php/smarty/releases/tag/v3.1.39 php8 https://github.com/smarty-php/sm...」)
 
(SmartyBCについて)
 
(同じ利用者による、間の4版が非表示)
行1: 行1:
==smarty3==
+
==Smarty3のDL==
php8だと2026/4時点の最新(3.1.48)は警告が出る。
+
 
+
 
https://github.com/smarty-php/smarty/releases/tag/v3.1.39 php8
 
https://github.com/smarty-php/smarty/releases/tag/v3.1.39 php8
  
 
https://github.com/smarty-php/smarty/releases/tag/v3.1.48 2026/4最新
 
https://github.com/smarty-php/smarty/releases/tag/v3.1.48 2026/4最新
 +
 +
==バージョン3.1.48について==
 +
php8だと2026/4時点の最新(3.1.48)は警告が出る。
  
 
警告詳細
 
警告詳細
 
  Fatal error: Type of SmartyCompilerException::$line must be int (as in class Exception) in smarty-3.1.48/libs/sysplugins/smartycompilerexception.php on line 8
 
  Fatal error: Type of SmartyCompilerException::$line must be int (as in class Exception) in smarty-3.1.48/libs/sysplugins/smartycompilerexception.php on line 8
 +
 +
==SmartyBCについて==
 +
*{php}タグが使える。
 +
*SmartyBC.class.phpにis_cachedがあるが、Smarty.class.phpには無い。
 +
 +
===SmartyBCで、is_cachedを使うとエラーになる===
 +
<pre>
 +
Message: undefined extension class 'Smarty_Internal_Method_Is_Cached'
 +
Class: SmartyException
 +
File: smarty-3.1.39/libs/sysplugins/smarty_internal_undefined.php(62)
 +
</pre>
 +
 +
修正前
 +
$smarty->is_cached($tpl_file, $cache_id = null, $compile_id = null)
 +
修正後
 +
$smarty->isCached($template = null, $cache_id = null, $compile_id = null, $parent = null)
 +
 +
本体処理は、
 +
library/smarty-3.1.39/libs/sysplugins/smarty_internal_templatebase.php
 +
あたりにある。

2026年4月23日 (木) 11:00時点における最新版

Smarty3のDL

https://github.com/smarty-php/smarty/releases/tag/v3.1.39 php8

https://github.com/smarty-php/smarty/releases/tag/v3.1.48 2026/4最新

バージョン3.1.48について

php8だと2026/4時点の最新(3.1.48)は警告が出る。

警告詳細

Fatal error: Type of SmartyCompilerException::$line must be int (as in class Exception) in smarty-3.1.48/libs/sysplugins/smartycompilerexception.php on line 8

SmartyBCについて

  • {php}タグが使える。
  • SmartyBC.class.phpにis_cachedがあるが、Smarty.class.phpには無い。

SmartyBCで、is_cachedを使うとエラーになる

Message: undefined extension class 'Smarty_Internal_Method_Is_Cached'
Class: SmartyException
File: smarty-3.1.39/libs/sysplugins/smarty_internal_undefined.php(62) 

修正前

$smarty->is_cached($tpl_file, $cache_id = null, $compile_id = null)

修正後

$smarty->isCached($template = null, $cache_id = null, $compile_id = null, $parent = null)

本体処理は、 library/smarty-3.1.39/libs/sysplugins/smarty_internal_templatebase.php あたりにある。