diff --git a/system/Database/Postgre/Builder.php b/system/Database/Postgre/Builder.php index 9cee16e1403a..8b2754a6c28f 100644 --- a/system/Database/Postgre/Builder.php +++ b/system/Database/Postgre/Builder.php @@ -357,11 +357,11 @@ protected function _upsertBatch(string $table, array $keys, array $values): stri // autoincrement identity field must use DEFAULT and not NULL // this could be removed in favour of leaving to developer but does make things easier and function like other DBMS foreach ($constraints as $constraint) { - $key = array_search(trim($constraint, '"'), $fieldNames, true); + $key = array_search(trim((string) $constraint, '"'), $fieldNames, true); if ($key !== false) { foreach ($values as $arrayKey => $value) { - if (strtoupper($value[$key]) === 'NULL') { + if (strtoupper((string) $value[$key]) === 'NULL') { $values[$arrayKey][$key] = 'DEFAULT'; } }