From 193df886a54e0cac8416327f763a1e61dc2a3053 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 1 Feb 2022 15:24:27 +0200 Subject: Merge pull request #6090 from jamieburchell/patch-1 Default $final_output to string instead of NULL for PHP 8.1 compatibility --- system/core/Output.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Output.php b/system/core/Output.php index 8e3245b79..1f3038fc0 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -55,7 +55,7 @@ class CI_Output { * * @var string */ - public $final_output; + public $final_output = ''; /** * Cache expiration time -- cgit v1.2.3-24-g4f1b 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 From 6db00c58bdd75e20ea58f6a1a5efe5f86ff4c2d7 Mon Sep 17 00:00:00 2001 From: Jamie Burchell Date: Fri, 4 Feb 2022 12:34:13 +0000 Subject: Fix passing NULL to setcookie value parameter Fixes Passing null to parameter #2 ($value) of type string is deprecated --- system/libraries/Session/Session_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Session/Session_driver.php b/system/libraries/Session/Session_driver.php index b1b1b073e..ec4b76841 100644 --- a/system/libraries/Session/Session_driver.php +++ b/system/libraries/Session/Session_driver.php @@ -153,7 +153,7 @@ abstract class CI_Session_driver { return setcookie( $this->_config['cookie_name'], - NULL, + '', array( 'expires' => 1, 'path' => $this->_config['cookie_path'], -- 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/core/Security.php | 1 - system/database/drivers/mysql/mysql_forge.php | 1 - system/helpers/html_helper.php | 1 - system/libraries/Session/drivers/Session_files_driver.php | 2 +- system/libraries/Xmlrpc.php | 2 +- 5 files changed, 2 insertions(+), 5 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index d1d4f8432..4ff9ac5aa 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -655,7 +655,6 @@ class CI_Security { return $output; } - if (is_readable('/dev/urandom') && ($fp = fopen('/dev/urandom', 'rb')) !== FALSE) { // Try not to waste entropy ... 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'] diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index d0a0e7d48..4c54588ef 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -133,7 +133,6 @@ if ( ! function_exists('_list')) // Write the opening list tag .'<'.$type._stringify_attributes($attributes).">\n"; - // Cycle through the list elements. If an array is // encountered we will recursively call _list() diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index 4b7b9878b..c912fc71d 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -35,7 +35,7 @@ * @link https://codeigniter.com * @since Version 3.0.0 * @filesource -*/ + */ defined('BASEPATH') OR exit('No direct script access allowed'); /** diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index d500bcf87..531b62841 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -1911,7 +1911,7 @@ class XML_RPC_Values extends CI_Xmlrpc * @param int unix timestamp * @param bool * @return string - */ + */ public function iso8601_encode($time, $utc = FALSE) { return ($utc) ? date('Ymd\TH:i:s', $time) : gmdate('Ymd\TH:i:s', $time); -- cgit v1.2.3-24-g4f1b From 444f7977a82c09a00db8a74e9472d80fd4f50487 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 11 Feb 2022 16:47:00 +0200 Subject: [ci skip] chmod -x index.php (fix #6101) --- index.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 index.php diff --git a/index.php b/index.php old mode 100755 new mode 100644 -- cgit v1.2.3-24-g4f1b