Skip to content

Commit

Permalink
* Judgment of multi-select fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
qqphp committed Sep 15, 2023
1 parent 8c21e10 commit ebd31dd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion module/common/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -3725,7 +3725,12 @@ public function checkValidRow($objectType, $postData = array(), $index = 0)
foreach($postData as $key => $value)
{
if(!is_array($value) or strpos($this->config->$objectType->excludeCheckFileds, ",$key,") !== false) continue;
if(isset($value[$index]) and !empty($value[$index]) and $value[$index] != 'ditto') return true;
if(isset($value[$index]) and !empty($value[$index]) and $value[$index] != 'ditto')
{
/* Judgment of multi-select fields. */
if(is_array($value[$index]) and join(',', $value[$index]) == '') continue;
return true;
}
}

return false;
Expand Down

0 comments on commit ebd31dd

Please sign in to comment.