From bda8f7434fb407a7acc5cb2c39bfee281938d787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=94=E5=93=A5?= Date: Fri, 17 Nov 2017 15:02:26 +0800 Subject: [PATCH] * Fix bug in php7.1 --- module/tree/model.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/tree/model.php b/module/tree/model.php index 86accc9394..3687157c8e 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -676,7 +676,12 @@ class treeModel extends model if(!$hasObjects) return; } - if(is_array($extra) or empty($extra)) $extra['branchID'] = $branch; + if(is_array($extra)) $extra['branchID'] = $branch; + if(empty($extra)) + { + $extra = array(); + $extra['branchID'] = $branch; + } $linkHtml = call_user_func($userFunc, $type, $module, $extra); if(isset($treeMenu[$module->id]) and !empty($treeMenu[$module->id]))