mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-13 17:53:22 +00:00
Invalid argument supplied for foreach() in ApiQueryGadgets.php on line 58
Gadget::loadStructuredList() can return false Bug: 53829 Change-Id: I11f0531711cb431fa9f44c0fece527aea82f6a5a
This commit is contained in:
parent
bb874dad32
commit
12b2e7dd68
|
@ -54,6 +54,10 @@ class ApiQueryGadgets extends ApiQueryBase {
|
|||
private function getList() {
|
||||
$gadgets = Gadget::loadStructuredList();
|
||||
|
||||
if ( $gadgets === false ) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$result = array();
|
||||
foreach ( $gadgets as $category => $list ) {
|
||||
if ( $this->categories && !isset( $this->categories[$category] ) ) {
|
||||
|
|
Loading…
Reference in a new issue