mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-16 06:31:21 +00:00
setRegex() checks regex only if not ''
This commit is contained in:
parent
f1db74929c
commit
16da190e06
|
@ -803,7 +803,7 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
|
||||||
$db = $this->_dms->getDB();
|
$db = $this->_dms->getDB();
|
||||||
|
|
||||||
$regex = trim($regex);
|
$regex = trim($regex);
|
||||||
if(@preg_match($regex, '') === false)
|
if($regex && @preg_match($regex, '') === false)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$queryStr = "UPDATE `tblAttributeDefinitions` SET `regex` =".$db->qstr($regex)." WHERE `id` = " . $this->_id;
|
$queryStr = "UPDATE `tblAttributeDefinitions` SET `regex` =".$db->qstr($regex)." WHERE `id` = " . $this->_id;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user