From: Alexandre Emsenhuber Date: Fri, 26 Jul 2013 06:24:06 +0000 (+0200) Subject: Special:PagesWithProp: Fix PHP notice if no page properties are present X-Git-Tag: 1.31.0-rc.0~19114 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=9b61538e92dc59ff7a24ca59a0e1e5d96ab85450;p=lhc%2Fweb%2Fwiklou.git Special:PagesWithProp: Fix PHP notice if no page properties are present Always declare $propnames as an array; do not assume that there will be a property to implicitly set it. Bug: 51891 Change-Id: I82c6b71a3283c7dc17e66873c2e54cea973c67c0 --- diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index f996204b85..d6204a7632 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -227,6 +227,8 @@ production. the function apache_request_headers() function is not available. * (bug 33399) LivePreview: Re-run wikipage content handlers (jquery.makeCollapsible, jquery.tablesorter) after preview content is loaded. +* (bug 51891) Fixed PHP notice on Special:PagesWithProp when no properties + are defined. === API changes in 1.22 === * (bug 25553) The JSON output formatter now leaves forward slashes unescaped diff --git a/includes/specials/SpecialPagesWithProp.php b/includes/specials/SpecialPagesWithProp.php index 27331e5d63..199c5cdeac 100644 --- a/includes/specials/SpecialPagesWithProp.php +++ b/includes/specials/SpecialPagesWithProp.php @@ -54,6 +54,7 @@ class SpecialPagesWithProp extends QueryPage { __METHOD__, array( 'DISTINCT', 'ORDER BY' => 'pp_propname' ) ); + $propnames = array(); foreach ( $res as $row ) { $propnames[$row->pp_propname] = $row->pp_propname; }