Skip to content

Commit

Permalink
fix error exporting LDAP accounts to SQL: array_key_exits parameter #2
Browse files Browse the repository at this point in the history
…must be of type array, bool given
  • Loading branch information
ralfbecker committed Jan 25, 2023
1 parent 07d6488 commit e725961
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/src/Storage/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ function save($keys=null,$extra_where=null)
{
if (!$this->autoinc_id || $db_col != $this->autoinc_id) // not write auto-inc-id
{
if (!array_key_exists($col,$this->data) && // handling of unset columns in $this->data
if (!array_key_exists($col,$this->data ?: []) && // handling of unset columns in $this->data
(isset($this->table_def['fd'][$db_col]['default']) || // we have a default value
!isset($this->table_def['fd'][$db_col]['nullable']) || $this->table_def['fd'][$db_col]['nullable'])) // column is nullable
{
Expand Down

0 comments on commit e725961

Please sign in to comment.