facebook twitter hatena line email

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

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(SmartyBCについて)
 
(同じ利用者による、間の3版が非表示)
行4: 行4:
 
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について==
+
==バージョン3.1.48について==
 
php8だと2026/4時点の最新(3.1.48)は警告が出る。
 
php8だと2026/4時点の最新(3.1.48)は警告が出る。
  
行11: 行11:
  
 
==SmartyBCについて==
 
==SmartyBCについて==
*{php}たぐが使える。
+
*{php}タグが使える。
 
*SmartyBC.class.phpにis_cachedがあるが、Smarty.class.phpには無い。
 
*SmartyBC.class.phpにis_cachedがあるが、Smarty.class.phpには無い。
  
===SmartyBCで、is_cachedを使うとエラーになる==
+
===SmartyBCで、is_cachedを使うとエラーになる===
 
<pre>
 
<pre>
 
Message: undefined extension class 'Smarty_Internal_Method_Is_Cached'
 
Message: undefined extension class 'Smarty_Internal_Method_Is_Cached'
行20: 行20:
 
File: smarty-3.1.39/libs/sysplugins/smarty_internal_undefined.php(62)  
 
File: smarty-3.1.39/libs/sysplugins/smarty_internal_undefined.php(62)  
 
</pre>
 
</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 あたりにある。