X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FPrefixSearch.php;h=10c8593055b824441f272b0c7d2ea5238f60cd50;hb=3141337d77504b52045406c540a371f3444d40fc;hp=a3ff05e25c735c79f72b8fd8a4057dbc718faa6a;hpb=d6fd8e7c1345052cfba0f396bbb65b4c93d11366;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php index a3ff05e25c..10c8593055 100644 --- a/includes/PrefixSearch.php +++ b/includes/PrefixSearch.php @@ -1,5 +1,12 @@ ucfirst( $search ); - } - $ns = array_shift($namespaces); // support only one namespace if( in_array(NS_MAIN,$namespaces)) $ns = NS_MAIN; // if searching on many always default to main @@ -132,7 +135,7 @@ class PrefixSearch { // Reformat useful data for future printing by JSON engine $srchres = array (); - foreach ($data['query']['allpages'] as & $pageinfo) { + foreach ((array)$data['query']['allpages'] as $pageinfo) { // Note: this data will no be printable by the xml engine // because it does not support lists of unnamed items $srchres[] = $pageinfo['title'];