From ea2280da59ef51a317ae588b45f2389e840040e9 Mon Sep 17 00:00:00 2001 From: zenggang Date: Tue, 14 Jun 2022 06:56:01 +0000 Subject: [PATCH] * Adjust code --- framework/router.class.php | 2 +- module/custom/control.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/router.class.php b/framework/router.class.php index f4d2bc9545..456845c4cc 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -119,7 +119,7 @@ class router extends baseRouter if(isset($nullKey))$lang->{$moduleName}->{$section}[$nullKey] = $nullValue; foreach($fields as $key => $value) { - if($section == 'priList' and $key > 0 and $value === '') continue; // Fix bug #23538. + if($section == 'priList' and $key > 0 and trim($value) === '') continue; // Fix bug #23538. if(!isset($lang->{$moduleName})) $lang->{$moduleName} = new stdclass(); if(!isset($lang->{$moduleName}->{$section})) $lang->{$moduleName}->{$section} = array(); diff --git a/module/custom/control.php b/module/custom/control.php index 68327343fc..3f991dbaa2 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -236,7 +236,7 @@ class custom extends control $value = $data->values[$index]; $system = $data->systems[$index]; - if($key and $value === '') return $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->valueEmpty)); // Fix bug #23538. + if($key and trim($value) === '') return $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->valueEmpty)); // Fix bug #23538. $this->custom->setItem("{$lang}.{$module}.{$field}.{$key}.{$system}", $value); }