Permalink
Browse files

PHP7修正

  • Loading branch information...
logue committed Jul 5, 2017
1 parent aea4d9b commit 716025f6ebcaf3617beb1dc591d6f1e3e31c0ce8
Showing with 5 additions and 8 deletions.
  1. +3 −6 wiki-common/lib/PukiWiki/Router.php
  2. +2 −2 wiki-common/lib/PukiWiki/Utility.php
@@ -169,7 +169,7 @@ public static function get_page_uri($page, $path_reference='rel', $query='', $fr
* @param string $fragment アンカーを指定
* @return string
*/
public static function get_resolve_uri($cmd='read', $page=null, $path_reference='rel', $query=array('cmd'=>'read'), $fragment=null)
public static function get_resolve_uri($cmd='read', $page=null, $path_reference='rel', $query=array('cmd'=>'read', 'page' => null), $fragment=null)
{
global $static_url, $url_suffix;
@@ -179,7 +179,7 @@ public static function get_resolve_uri($cmd='read', $page=null, $path_reference=
// $queryが時々string型になるのでそれの修正
if (!empty($query) && is_string($query)){
$page = $query;
$query = array();
$query = array('cmd'=>'read', 'page' => $page);
}
if (empty($cmd) || $cmd === 'read' ) {
@@ -192,10 +192,7 @@ public static function get_resolve_uri($cmd='read', $page=null, $path_reference=
$ret .= '?' . rawurlencode($page);
}
}else{
$query['cmd'] = $cmd;
if (! empty($page)) {
$query['page'] = $page;
}
$query = array('cmd' => $cmd, 'page' => $page);
$ret .= '?' . http_build_query($query);
}
@@ -170,10 +170,10 @@ public static function parseArguments(){
// 全体を見てコード検出すると、機種依存文字や、妙なバイナリ
// コードが混入した場合に、コード検出に失敗する恐れがある。
$encode = mb_detect_encoding($vars['encode_hint']);
mb_convert_variables(SOURCE_ENCODING, $encode, $vars);
// mb_convert_variables(SOURCE_ENCODING, $encode, $vars);
} else {
// 全部まとめて、自動検出/変換
mb_convert_variables(SOURCE_ENCODING, 'auto', $vars);
// mb_convert_variables(SOURCE_ENCODING, 'auto', $vars);
}
// 環境変数のチェック

0 comments on commit 716025f

Please sign in to comment.