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(+) 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(-) 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