fix: when create separate extarfields, if already exists always return false error (#32103)
This commit is contained in:
parent
c83d362bc1
commit
96d60b92f4
1 changed files with 3 additions and 1 deletions
|
|
@ -177,7 +177,9 @@ class ExtraFields
|
|||
// Add declaration of field into table
|
||||
$result2 = $this->create_label($attrname, $label, $type, $pos, $size, $elementtype, $unique, $required, $param, $alwayseditable, $perms, $list, $help, $default_value, $computed, $entity, $langfile, $enabled, $totalizable, $printable, $moreparams);
|
||||
$err2 = $this->errno;
|
||||
if ($result2 > 0 || ($err1 == 'DB_ERROR_COLUMN_ALREADY_EXISTS' && $err2 == 'DB_ERROR_RECORD_ALREADY_EXISTS')) {
|
||||
if ($result2 > 0
|
||||
|| ($err1 == 'DB_ERROR_COLUMN_ALREADY_EXISTS' && $err2 == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
|| ($type == 'separate' && $err2 == 'DB_ERROR_RECORD_ALREADY_EXISTS')) {
|
||||
$this->error = '';
|
||||
$this->errno = '0';
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue