エラーの発生条件
- EC-CUBE2.13.2
- PHP5.4
管理画面で、「コンテンツ管理」→「ファイル管理」を開くと、下記のエラーがでる。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
Strict Standards: Redefining already defined constructor for class Net_URL in /var/www/vhosts/***.com/httpdocs/data/module/Net/URL.php on line 124 Strict Standards: Non-static method SC_Display::detectDevice() should not be called statically in /var/www/vhosts/***.com/httpdocs/require.php on line 39 Warning: ob_start(): non-static method SC_MobileEmoji::handler() should not be called statically in /var/www/vhosts/***.com/httpdocs/require.php on line 45 Strict Standards: Declaration of LC_Page_Error::doValidToken() should be compatible with LC_Page::doValidToken($is_admin = false) in /var/www/vhosts/***.com/httpdocs/data/class/pages/error/LC_Page_Error.php on line 34 Strict Standards: Non-static method SC_Utils::sfIsAdminFunction() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/class/pages/error/LC_Page_Error_SystemError.php on line 94 Strict Standards: Non-static method SC_Query::getSingletonInstance() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/class/helper/SC_Helper_DB.php on line 172 Strict Standards: Non-static method MDB2::singleton() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/class/SC_Query.php on line 76 Strict Standards: Non-static method MDB2::parseDSN() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/module/MDB2.php on line 487 Strict Standards: Non-static method MDB2::factory() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/module/MDB2.php on line 503 Strict Standards: Non-static method MDB2::parseDSN() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/module/MDB2.php on line 379 Strict Standards: Non-static method MDB2::loadClass() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/module/MDB2.php on line 388 Strict Standards: Non-static method MDB2::classExists() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/module/MDB2.php on line 330 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/module/MDB2.php on line 389 Strict Standards: Non-static method MDB2::parseDSN() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/module/MDB2.php on line 2353 Strict Standards: Non-static method MDB2::setOptions() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/module/MDB2.php on line 395 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/module/MDB2.php on line 287 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/module/MDB2.php on line 287 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/module/MDB2.php on line 287 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/module/MDB2.php on line 396 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/class/SC_Query.php on line 78 Strict Standards: Non-static method MDB2::areEquals() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/module/MDB2/Driver/mysql.php on line 563 Strict Standards: Non-static method SC_DB_DBFactory_Ex::getInstance() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/***.com/httpdocs/data/class/SC_Query.php on line 82 Strict Standards: Only variables should be assigned by reference in /var/www/vhosts/***.com/httpdocs/data/class/helper/SC_Helper_DB.php on line 172 |
どうやらPHP5.4から、関数のパラメータにスーパーグローバル変数と同じ名前の変数を使用することができなくなったことが原因らしい。
「data/class/pages/admin/contents/LC_Page_Admin_Contents_FileManager.php」を修正して対処する。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
// 270行目あたり /** * テンプレートに渡す値を整形する * * @param array $_POST $_POST * @return array $setParam テンプレートに渡す値 */ // ↓ここを修正 /////////////////// //function createSetParam($_POST) { //$setParam = $_POST; function createSetParam($fnc) { $setParam = $fnc; // ↑ここを修正 /////////////////// // Windowsの場合は, ディレクトリの区切り文字を\から/に変換する $setParam['top_dir'] = (strpos(PHP_OS, 'WIN') === false) ? USER_REALDIR : str_replace('\\', '/', USER_REALDIR); // 初期表示はルートディレクトリ(user_data/)を表示 if (SC_Utils_Ex::isBlank($this->getMode())) { $setParam['now_dir'] = $setParam['top_dir']; } return $setParam; } |
(参考サイト:https://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=10792&forum=9&post_id=50986)