php-5.4.0RC1(たぶんalpha1から)で,正常動作しない.
> php ./index.php PHP Fatal error: Cannot redeclare hex2bin() in /(some where)/pukiwiki/lib/func.php on line 317とりあえず,func.phpを以下のように書き換えることでhtmlファイルを出力するようになりました.lib/auth.phpで直接hex2bin()をコールしていたので,ついでにこれらをdecode()をコールするようにも変えたほうが良いでしょう.
// Decode page name function decode($key) { if (function_exists('hex2bin')) { return hex2bin($key); } else { return internal_hex2bin($key); } } // Inversion of bin2hex() function internal_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; }ただ,これでも日本語がちゃんと出てくれない(出るところと出ないところがあり,規則性が見いだせてない)ので,もうちょっと追ってみます. -- よっちい 2011-11-19 (土) 21:17:34
// hex2bin -- Converts the hex representation of data to binary // (PHP 5.4.0) // Inversion of bin2hex() if (! function_exists('hex2bin')) { 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; } }decode()は削除し,全てhex2bin()にしてしまいましょうか. -- よっちい 2011-11-20 (日) 17:39:33
#norelated [[FrontPage]] #ls2この#ls2の有無で挙動が変わります.もうちょっと追ってみます. -- よっちい 2011-11-23 (水) 11:13:06
> php plugin/ls2.php PHP Fatal error: Call-time pass-by-reference has been removed in /(some where)/pukiwiki/plugin/ls2.inc.php on line 69ちゃんとNEWSに過去機能の削除の件が書いてあります.
- Removed legacy features: : . allow_call_time_pass_reference. (Pierrick)そこでls2プラグインの以下の実装
array_walk($args, 'plugin_ls2_check_arg', & $params);の参照渡しのアンパサンドを削除することで,ls2プラグインが正常動作するようになりました.同じような実装がpcommentプラグインにもあるようです. -- よっちい 2011-11-23 (水) 11:42:15
> php ./index.php PHP Strict Standards: Declaration of Heading::canContain() should be compatible with Element::canContain($obj) in /(some where)/pukiwiki/lib/convert_html.php on line 264「引数の型は同じにせよ」ということのようです.なので,
function canContain(& $obj) { return FALSE; }の引数を参照型にしているのは親クラスの宣言と異なるので止めたほうが良いのでは,と. -- よっちい 2011-11-23 (水) 11:56:25
// Loading template if (isset($vars['template_page']) && is_page($vars['template_page'])) { $vars['msg'] = join('', get_source($vars['template_page'])); // Cut fixed anchors $vars['msg'] = preg_replace('/^(\*{1,3}.*)\[#[A-Za-z][\w-]+\](.*)$/m', '$1$2', $vars['msg']); }