* [bug #58329, done, 0.3h] fix php error in api view page.

This commit is contained in:
sunhao
2024-12-19 09:14:39 +08:00
committed by 丁永亮
parent bd8cb238a6
commit 593eda4e60
+5 -1
View File
@@ -237,7 +237,11 @@ class apiModel extends model
public function getStructListByLibID(int $id): array
{
$structList = $this->dao->select('*')->from(TABLE_APISTRUCT)->where('lib')->eq($id)->fetchAll();
foreach($structList as $struct) $struct->attribute = json_decode($struct->attribute, true);
foreach($structList as $struct)
{
if(!isset($struct->attribute)) continue;
$struct->attribute = json_decode($struct->attribute, true);
}
return $structList;
}