Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

プラグインでSC_Plugin_Baseを継承するとシステムエラーが発生する #551

Open
chihiro-adachi opened this issue Apr 19, 2022 · 0 comments
Milestone

Comments

@chihiro-adachi
Copy link
Contributor

概要

2.17.2で、SC_Plugin_Baseを継承したプラグインをインストール・有効化するとシステムエラーが発生する

Fatal error(E_COMPILE_ERROR): Cannot make static method SC_Plugin_Base::install() non static in class SamplePlugin on [/http://check/eccube-2.17.2-mysql/data/downloads/plugin/SamplePlugin/SamplePlugin.php(xx)] from xxx.xxx.xxx.xxx
login_id = testadmin(0)[eca3e814]

原因

以下の変更に起因するもの。

PHP8対応 #405

https://github.com/EC-CUBE/ec-cube2/pull/405/files#diff-e3893a4908e7945ee32224a3e23f4bd79752fd68785f97ad37246e1c115aff87

回避方法

SC_Plugin_Base を継承せずにマジックメソッドを使用することで回避が可能。
https://gist.github.com/nanasess/6447bfd9e3cd26815c9ce7d0e8b1cb71

@nanasess nanasess added this to the 2.x milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants