From 89288a4ad3411b597eb1e7041660e912c611cfb0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 11 Sep 2018 17:29:56 +0300 Subject: [ci skip] Fix #5587 --- system/database/DB_forge.php | 5 ++++- user_guide_src/source/changelog.rst | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index 152f8f651..4d23e4e7b 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -348,7 +348,10 @@ abstract class CI_DB_forge { if (($result = $this->db->query($sql)) !== FALSE) { - isset($this->db->data_cache['table_names']) && $this->db->data_cache['table_names'][] = $table; + if (isset($this->db->data_cache['table_names'])) + { + $this->db->data_cache['table_names'][] = $table; + } // Most databases don't support creating indexes from within the CREATE TABLE statement if ( ! empty($this->keys)) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index af32fe882..aa0eae7e0 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -17,6 +17,7 @@ Bug fixes for 3.1.10 - Fixed a bug (#5561) - :doc:`Database Library ` didn't allow SSL connection configuration with only the 'ssl_verify' option when using the 'mysqli' driver. - Fixed a bug (#5545) - :doc:`Session Library ` crashed due to a caching-related error with the 'files' driver. - Fixed a bug (#5571) - :doc:`XML-RPC Library ` had a typo that triggered an ``E_WARNING`` message on PHP 7.2. +- Fixed a bug (#5587) - :doc:`Database Forge ` method ``create_table()`` generated an ``E_WARNING`` message. Version 3.1.9 ============= -- cgit v1.2.3-24-g4f1b