From 293e41784cf7b1b8ff8776df4d476191ecdea7ad Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Sat, 7 Oct 2023 08:47:46 +0800 Subject: [PATCH] * Fix error for zget param is bool. --- lib/zin/wg/dtable/v1.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/zin/wg/dtable/v1.php b/lib/zin/wg/dtable/v1.php index 1394c58c41..57e1545f91 100644 --- a/lib/zin/wg/dtable/v1.php +++ b/lib/zin/wg/dtable/v1.php @@ -22,15 +22,15 @@ class dtable extends wg { global $app; - $defaultID = "table-$app->rawModule-$app->rawMethod"; + $defaultID = "table-{$app->rawModule}-{$app->rawMethod}"; $this->setDefaultProps(array('id' => static::$dtableID ? ($defaultID . static::$dtableID) : $defaultID)); static::$dtableID++; $customColsProp = $this->prop('customCols'); if($customColsProp) { - $customUrl = zget($customColsProp, 'url', null); $app->loadLang('datatable'); + $customUrl = is_bool($customColsProp) || empty($customColsProp['url']) ? null : $customColsProp['url']; $this->setProp('customCols', array( 'custom' => array( 'url' => $customUrl ? $customUrl : createLink('datatable', 'ajaxcustom', "module=$app->moduleName&method=$app->methodName"),