- 追加された行はこの色です。
- 削除された行はこの色です。
*Strict Standards [#x66bf872]
&size(16){&font(b){Strict Standards: Non-static method XoopsErrorHandler::getInstance() should not be called statically in [wwwServerURL]/xoops/class/errorhandler.php on line 202};};
*File List [#bb1bb1f2]
-[[pukiwiki/lib/func.php>#func]]
-[[pukiwiki/plugin/ls2.inc.php>#ls2]]
~
php5.4を使用してxoopsを構築した際に発生。
php5.3の仕様とphp5.4の仕様では大きな違いがある為に発生する。(←インスタンスを“public static”にする必要がある為?)
一番楽なのはphp5.3を使用する事だが、それが出来ない場合には以下のxoopsソースの一部(具体的にはgetInstance()を使用する関数指定を変更)を書き換える事でエラーが出なくなる。
~
# vi [XOOPS_ROOT_PATH]/class/errorhandler.php
-&size(16){&font(b){クラス名:XoopsErrorHandler};};
- function &getInstance()
- {
- static $instance = null;
- if (empty($instance)) {
- $instance = new XoopsErrorHandler;
- }
- return $instance;
- }
*Fatal error [#g6990d68]
&aname(func);
&size(16){&font(b){Fatal error: Cannot redeclare hex2bin() in [DocumentRoot]/pukiwiki/lib/func.php on line "xxx"};};
# vi [DocumentRoot]/pukiwiki/lib/func.php
該当箇所をコメントアウトする
-&size(16){&font(b){関数:---};};
-// Inversion of bin2hex()
-function hex2bin($hex_string)
-{
- // preg_match : Avoid warning : pack(): Type H: illegal hex digit ...
- // (string) : Always treat as string (not int etc). See BugTrack2/31
- return preg_match('/^[0-9a-f]+$/i', $hex_string) ?
- pack('H*', (string)$hex_string) : $hex_string;
-}
_/_/_/_/_/
+ public static function &getInstance()
+ {
+ static $instance = null;
+ if (empty($instance)) {
+ $instance = new XoopsErrorHandler;
+ }
+ return $instance;
+ }
+// Inversion of bin2hex()
+/*
+function hex2bin($hex_string)
+{
+ // preg_match : Avoid warning : pack(): Type H: illegal hex digit ...
+ // (string) : Always treat as string (not int etc). See BugTrack2/31
+ return preg_match('/^[0-9a-f]+$/i', $hex_string) ?
+ pack('H*', (string)$hex_string) : $hex_string;
+}
+*/
~
# vi [XOOPS_ROOT_PATH]/class/database/database.php
-&size(16){&font(b){クラス名:Database};};
- function &getInstance()
- {
- $instance =& XoopsDatabaseFactory::getDatabaseConnection();
- return $instance;
- }
----
~
&aname(ls2);
&size(16){&font(b){Fatal error: Call-time pass-by-reference has been removed in [DocumentRoot]/pukiwiki/plugin/ls2.inc.php on line "xxx"};};
# vi [DocumentRoot]/pukiwiki/plugin/ls2.inc.php
-&size(16){&font(b){関数:plugin_ls2_convert()};};
- array_walk($args, 'plugin_ls2_check_arg', & $params);
_/_/_/_/_/
+ public static function &getInstance()
+ {
+ $instance =& XoopsDatabaseFactory::getDatabaseConnection();
+ return $instance;
+ }
+ array_walk($args, 'plugin_ls2_check_arg', $params);
~