From 51660084497c38f167062706aa2a07c03aee9ec8 Mon Sep 17 00:00:00 2001 From: sunjun Date: Thu, 30 Jun 2022 03:42:34 +0000 Subject: [PATCH] fixbug_api --- module/api/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/api/model.php b/module/api/model.php index 539132b98a..4b121cc395 100644 --- a/module/api/model.php +++ b/module/api/model.php @@ -910,7 +910,7 @@ class apiModel extends model $this->config->api->search['module'] = 'api'; $this->config->api->search['queryID'] = $queryID; $this->config->api->search['actionURL'] = $actionURL; - $this->config->api->search['params']['lib']['values'] = array($lib->id => $lib->name) + array('all' => $this->lang->api->allLibs); + $this->config->api->search['params']['lib']['values'] = (!empty($lib)) ? array($lib->id => $lib->name) + array('all' => $this->lang->api->allLibs) : array('all' => $this->lang->api->allLibs); $this->loadModel('search')->setSearchParams($this->config->api->search); }