From 8211e0a8e302cb3db55055fc5ee19a42aae222e5 Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 29 Mar 2023 22:32:04 +0200 Subject: [PATCH] fix PHP Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated --- api/src/Db/Schema.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Db/Schema.php b/api/src/Db/Schema.php index 7b4051f434..8ec20f0a7c 100644 --- a/api/src/Db/Schema.php +++ b/api/src/Db/Schema.php @@ -1157,7 +1157,7 @@ class Schema case 'date': $ado_col = 'D'; // allow to use now() beside current_date, as Postgres backups contain it and it's easier to remember anyway - if (in_array(strtolower($col_data['default']), self::DEFAULT_TIMESTAMPS)) + if (isset($col_data['default']) && in_array(strtolower($col_data['default']), self::DEFAULT_TIMESTAMPS)) { $ado_col .= ' DEFDATE'; unset($col_data['default']); @@ -1192,7 +1192,7 @@ class Schema case 'timestamp': $ado_col = 'T'; // allow to use now() beside current_timestamp, as Postgres backups contain it and it's easier to remember anyway - if (in_array(strtolower($col_data['default']) , self::DEFAULT_TIMESTAMPS)) + if (isset($col_data['default']) && in_array(strtolower($col_data['default']) , self::DEFAULT_TIMESTAMPS)) { $ado_col .= ' DEFTIMESTAMP'; unset($col_data['default']);