バージョン選択

フォーラム

メニュー

オンライン状況

95 人のユーザが現在オンラインです。 (81 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 95
もっと...

サイト内検索

その他 > バージョンアップ > EC-CUBE2.17.2をPHP8で設定

バージョンアップ

新規スレッドを追加する

スレッド表示 | 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
ctdev
投稿日時: 2023/2/3 17:08
対応状況: −−−
新米
登録日: 2023/2/3
居住地:
投稿: 4
EC-CUBE2.17.2をPHP8で設定
お疲れ様です。

今、私のECサイトのバージョンは2.17.1です。PHP7を使っています。
PHP8に変更したいですので、2.17.1から2.17.2へアップグレードしています。

ただし、アップグレード中に、以下のエラーが発生されています。

何か原因がわかりますか。
教えていただけませんか。

宜しくお願い致します。
Fatal error(E_ERROR): Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method plg_AddSearchItem_LC_Template_Ex::prefilterTransform() cannot be called statically in D:\laragon\www\ec-cube2\data\class\helper\SC_Helper_Plugin.php:147
red
投稿日時: 2023/2/3 17:18
対応状況: −−−
登録日: 2010/2/15
居住地: 東京都
投稿: 1568
Re: EC-CUBE2.17.2をPHP8で設定
プラグインが対応してないと思うのでエラーメッセージを見て直すといいかと思います


----------------
EC-CUBEのカスタマイズ、トラブル解決承ります
お気軽にお問い合わせ下さい
https://www.ec-cube.net/integrate/partner/partner.php?partner_id=690

ctdev
投稿日時: 2023/2/3 17:48
対応状況: −−−
新米
登録日: 2023/2/3
居住地:
投稿: 4
Re: EC-CUBE2.17.2をPHP8で設定
ありがとうございます。
エラーログを以下となりますが、プラグイン関係がありますか。
そうすると、どのように修正したほうがいいですか。
EC-CUBE2.17.2もPHP8で稼働ですね。なぜか動かないかわからないです。
2023/02/03 17:44:42 [/user_data/shopping_guide.php] Fatal error(E_ERROR): Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in D:\laragon\www\ec-cube2\data\Smarty\templates_c\production\0d9a588a4a3948ef778c2847f0f7c1c27a8690dc_0.file.site_main.tpl.php:63
Stack trace:
#0 D:\laragon\www\ec-cube2\data\vendor\smarty\smarty\libs\sysplugins\smarty_template_resource_base.php(123): content_63dcc7b2953b48_03779781(Object(Smarty_Internal_Template))
#1 D:\laragon\www\ec-cube2\data\vendor\smarty\smarty\libs\sysplugins\smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#2 D:\laragon\www\ec-cube2\data\vendor\smarty\smarty\libs\sysplugins\smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#3 D:\laragon\www\ec-cube2\data\vendor\smarty\smarty\libs\sysplugins\smarty_internal_template.php(385): Smarty_Internal_Template->render()
#4 D:\laragon\www\ec-cube2\data\Smarty\templates_c\production\02b44be89f725bf624afd44db953c76a9f72612e_0.file.site_frame.tpl.php(213): Smarty_Internal_Template->_subTemplateRender('file:./site_mai...', NULL, NULL, 0, 3600, Array, 0, false)
#5 D:\laragon\www\ec-cube2\data\vendor\smarty\smarty\libs\sysplugins\smarty_template_resource_base.php(123): content_63dcb3d04dbd84_37446717(Object(Smarty_Internal_Template))
#6 D:\laragon\www\ec-cube2\data\vendor\smarty\smarty\libs\sysplugins\smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#7 D:\laragon\www\ec-cube2\data\vendor\smarty\smarty\libs\sysplugins\smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#8 D:\laragon\www\ec-cube2\data\vendor\smarty\smarty\libs\sysplugins\smarty_internal_templatebase.php(232): Smarty_Internal_Template->render(false, 0)
#9 D:\laragon\www\ec-cube2\data\vendor\smarty\smarty\libs\sysplugins\smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 0)
#10 D:\laragon\www\ec-cube2\data\class\SC_View.php(113): Smarty_Internal_TemplateBase->fetch('site_frame.tpl')
#11 D:\laragon\www\ec-cube2\data\class\SC_Display.php(80): SC_View->getResponse('site_frame.tpl')
#12 D:\laragon\www\ec-cube2\data\class\pages\LC_Page.php(411): SC_Display->prepare(Object(LC_Page_User))
#13 D:\laragon\www\ec-cube2\user_data\shopping_guide.php(31): LC_Page->sendResponse()
#14 D:\laragon\www\ec-cube2\user_data\shopping_guide.php(56): LC_Page_User->process()
#15 {main}
  thrown on [D:\laragon\www\ec-cube2\data\Smarty\templates_c\production\0d9a588a4a3948ef778c2847f0f7c1c27a8690dc_0.file.site_main.tpl.php(63)] from 127.0.0.1
customer_id =
nanasess
投稿日時: 2023/2/6 12:02
対応状況: −−−
登録日: 2006/9/9
居住地:
投稿: 2303
Re: EC-CUBE2.17.2をPHP8で設定
ご利用中のデザインテンプレートの site_main.tpl で count 関数を使用しているためのエラーのようです。

EC-CUBE2.17.2自体は、 PHP8に対応していますが、デザインテンプレートは独自に修正する必要があります。

以下を参考に empty に置き換えると良いと思います
https://github.com/EC-CUBE/ec-cube2/blob/c1afad17442ec607cc943c10a86a09ae7fa345d2/data/Smarty/templates/default/site_main.tpl#L34
スレッド表示 | 新しいものから 前のトピック | 次のトピック | トップ


 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,297名です
総投稿数は109,692件です

投稿数ランキング

1
seasoft
7365
2
468
3217
3
AMUAMU
2712
4
nanasess
2303
5
umebius
2085
6
yuh
1818
7
h_tanaka
1610
8
red
1568
9
mcontact
1240
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
796
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.