From 10e70f02a5b0e3beb371e64374c0008d7bfdec49 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 19 Jun 2019 16:27:50 +0300 Subject: Fix #5774 --- system/database/DB_result.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/database/DB_result.php b/system/database/DB_result.php index 0dbac1633..ed5252d49 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -381,7 +381,7 @@ class CI_DB_result { */ public function custom_row_object($n, $type) { - isset($this->custom_result_object[$type]) OR $this->custom_result_object($type); + isset($this->custom_result_object[$type]) OR $this->custom_result_object[$type] = $this->custom_result_object($type); if (count($this->custom_result_object[$type]) === 0) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9df65756d..b64b8154a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -24,6 +24,7 @@ Bug fixes for 3.1.11 - Fixed a bug (#5755) - :doc:`Form Validation Library ` rule **valid_url** accepted digit-only domains due to a PHP bug. - Fixed a bug (#5753) - :doc:`Cache Library ` 'redis' driver methods ``increment()``, ``decrement()`` ignored their ``$offset`` parameter. - Fixed a bug (#5779) - :doc:`Session Library ` 'redis' only attempted to validate session IDs in case the connection to Redis failed. +- Fixed a bug (#5774) - :doc:`Database Results ` method ``custom_result_object()`` didn't properly handle empty result sets, triggering ``E_WARNING`` messages on PHP 7.2+. Version 3.1.10 ============== -- cgit v1.2.3-24-g4f1b