OSDN Git Service

BugTrack2/106: Only variables can be passed by reference from PHP 5.0.5
authorhenoheno <henoheno>
Tue, 4 Oct 2005 14:31:22 +0000 (23:31 +0900)
committerhenoheno <henoheno>
Tue, 4 Oct 2005 14:31:22 +0000 (23:31 +0900)
plugin/counter.inc.php
plugin/pcomment.inc.php
plugin/popular.inc.php

index 27c822f..d4ac8c2 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-// $Id: counter.inc.php,v 1.16 2005/04/09 03:08:09 henoheno Exp $
+// $Id: counter.inc.php,v 1.17 2005/10/04 14:31:22 henoheno Exp $
 //
 // PukiWiki counter plugin
 //
@@ -14,7 +14,10 @@ function plugin_counter_inline()
 {
        global $vars;
 
-       $arg = strtolower(array_shift(func_get_args()));
+       // BugTrack2/106: Only variables can be passed by reference from PHP 5.0.5
+       $args = func_get_args(); // with array_shift()
+
+       $arg = strtolower(array_shift($args));
        switch ($arg) {
        case ''     : $arg = 'total'; /*FALLTHROUGH*/
        case 'total': /*FALLTHROUGH*/
index 234227d..96518c8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone
-// $Id: pcomment.inc.php,v 1.42 2005/05/29 10:49:59 henoheno Exp $
+// $Id: pcomment.inc.php,v 1.43 2005/10/04 14:31:22 henoheno Exp $
 //
 // pcomment plugin - Show/Insert comments into specified (another) page
 //
@@ -77,7 +77,10 @@ function plugin_pcomment_convert()
                'reply' =>FALSE,
                '_args' =>array()
        );
-       array_walk(func_get_args(), 'plugin_pcomment_check_arg', & $params);
+
+       // BugTrack2/106: Only variables can be passed by reference from PHP 5.0.5
+       $args = func_get_args(); // with array_walk()
+       array_walk($args, 'plugin_pcomment_check_arg', & $params);
 
        $vars_page = isset($vars['page']) ? $vars['page'] : '';
        $page  = (isset($params['_args'][0]) && $params['_args'][0] != '') ? $params['_args'][0] :
index 1995a76..588c8bf 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone
-// $Id: popular.inc.php,v 1.14 2005/04/09 03:18:06 henoheno Exp $
+// $Id: popular.inc.php,v 1.15 2005/10/04 14:31:22 henoheno Exp $
 //
 // Popular pages plugin: Show an access ranking of this wiki
 // -- like recent plugin, using counter plugin's count --
@@ -65,7 +65,10 @@ function plugin_popular_convert()
        }
 
        asort($counters, SORT_NUMERIC);
-       $counters = array_splice(array_reverse($counters, TRUE), 0, $max);
+
+       // BugTrack2/106: Only variables can be passed by reference from PHP 5.0.5
+       $counters = array_reverse($counters, TRUE); // with array_splice()
+       $counters = array_splice($counters, 0, $max);
 
        $items = '';
        if (! empty($counters)) {