mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 09:39:00 +01:00
fix Undefined array key warning
This commit is contained in:
parent
74dbdc30fb
commit
77900b09b3
@ -1630,9 +1630,10 @@ class Db
|
|||||||
$not_null = is_array($column_definitions) && isset($column_definitions[$col]['nullable']) ? !$column_definitions[$col]['nullable'] : false;
|
$not_null = is_array($column_definitions) && isset($column_definitions[$col]['nullable']) ? !$column_definitions[$col]['nullable'] : false;
|
||||||
|
|
||||||
$maxlength = null;
|
$maxlength = null;
|
||||||
if ($truncate_varchar)
|
if ($truncate_varchar && !is_int($col) && isset($column_definitions[$col]) &&
|
||||||
|
in_array($column_definitions[$col]['type'], ['varchar','ascii']))
|
||||||
{
|
{
|
||||||
$maxlength = in_array($column_definitions[$col]['type'], array('varchar','ascii')) ? $column_definitions[$col]['precision'] : null;
|
$maxlength = $column_definitions[$col]['precision'];
|
||||||
}
|
}
|
||||||
// dont use IN ( ), if there's only one value, it's slower for MySQL
|
// dont use IN ( ), if there's only one value, it's slower for MySQL
|
||||||
if (is_array($data) && count($data) <= 1)
|
if (is_array($data) && count($data) <= 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user