From 7c68c379f554d8c53e8ccc1ec4660c4928c1d53a Mon Sep 17 00:00:00 2001 From: Jamie Burchell Date: Tue, 1 Feb 2022 14:24:04 +0000 Subject: Fix PHP 8.1 deprecation --- system/database/DB_utility.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'system/database') diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index a843754b4..95230aa7d 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -257,6 +257,10 @@ abstract class CI_DB_utility { $line = array(); foreach ($row as $item) { + if (is_null($item)) + { + $item = ''; + } $line[] = $enclosure.str_replace($enclosure, $enclosure.$enclosure, $item).$enclosure; } $out .= implode($delim, $line).$newline; -- cgit v1.2.3-24-g4f1b From ad86fa92cd59ac1255af1dd5170919f6fbf73786 Mon Sep 17 00:00:00 2001 From: Jamie Burchell Date: Tue, 1 Feb 2022 16:57:24 +0000 Subject: Typecast to string --- system/database/DB_utility.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'system/database') diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index 95230aa7d..dc733ebc8 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -257,11 +257,7 @@ abstract class CI_DB_utility { $line = array(); foreach ($row as $item) { - if (is_null($item)) - { - $item = ''; - } - $line[] = $enclosure.str_replace($enclosure, $enclosure.$enclosure, $item).$enclosure; + $line[] = $enclosure.str_replace($enclosure, $enclosure.$enclosure, (string) $item).$enclosure; } $out .= implode($delim, $line).$newline; } -- cgit v1.2.3-24-g4f1b From 6846d26d7b8d7a05d98bf2020f9348beb63d97d7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Feb 2022 16:38:58 +0200 Subject: [ci skip] Merge pull request #6098 from totoprayogo1916/indent-whitespaces Minor indentation & whitespace corrections --- system/database/drivers/mysql/mysql_forge.php | 1 - 1 file changed, 1 deletion(-) (limited to 'system/database') diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php index e59366bed..85101bdd9 100644 --- a/system/database/drivers/mysql/mysql_forge.php +++ b/system/database/drivers/mysql/mysql_forge.php @@ -185,7 +185,6 @@ class CI_DB_mysql_forge extends CI_DB_forge { $extra_clause = ' FIRST'; } - return $this->db->escape_identifiers($field['name']) .(empty($field['new_name']) ? '' : ' '.$this->db->escape_identifiers($field['new_name'])) .' '.$field['type'].$field['length'] -- cgit v1.2.3-24-g4f1b