summaryrefslogtreecommitdiff
path: root/extensions/Gadgets/ApiQueryGadgets.php
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/Gadgets/ApiQueryGadgets.php')
-rw-r--r--extensions/Gadgets/ApiQueryGadgets.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/extensions/Gadgets/ApiQueryGadgets.php b/extensions/Gadgets/ApiQueryGadgets.php
index 90e77a3b..a529daf0 100644
--- a/extensions/Gadgets/ApiQueryGadgets.php
+++ b/extensions/Gadgets/ApiQueryGadgets.php
@@ -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] ) ) {