From 81e1c4bf66262f83854dae898801383ef493e3a8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 5 Jan 2021 14:10:20 +0200 Subject: [ci skip] Close #6005: Fix typos in email helper docs --- user_guide_src/source/helpers/email_helper.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user_guide_src/source/helpers/email_helper.rst b/user_guide_src/source/helpers/email_helper.rst index 1ee97d902..e0b2e4eab 100644 --- a/user_guide_src/source/helpers/email_helper.rst +++ b/user_guide_src/source/helpers/email_helper.rst @@ -35,8 +35,8 @@ The following functions are available: :returns: TRUE if a valid email is supplied, FALSE otherwise :rtype: bool - Checks if the input is a correctly formatted e-mail address. Note that is - doesn't actually prove that the address will be able recieve mail, but + Checks if the input is a correctly formatted e-mail address. Note that it + doesn't actually prove that the address will be able to receive mail, but simply that it is a validly formed address. Example:: @@ -72,4 +72,4 @@ The following functions are available: mail($recipient, $subject, $message); For a more robust email solution, see CodeIgniter's :doc:`Email Library - <../libraries/email>`. \ No newline at end of file + <../libraries/email>`. -- cgit v1.2.3-24-g4f1b From eaa697a7ba856b886d1acad7038495200c3fdcea Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 5 Jan 2021 14:31:59 +0200 Subject: [ci skip] Merge pull request #5980 from devnetkc/docs-5761 chore: Add to main readme contribute guide link --- readme.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.rst b/readme.rst index bd9bca716..63a55c3f4 100644 --- a/readme.rst +++ b/readme.rst @@ -54,6 +54,7 @@ Resources ********* - `User Guide `_ +- `Contributing Guide `_ - `Language File Translations `_ - `Community Forums `_ - `Community Wiki `_ -- cgit v1.2.3-24-g4f1b From 73d119ba24b3667857b47f3811116ad17494be7e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 5 Jan 2021 14:38:18 +0200 Subject: [ci skip] Close #5973 --- system/database/DB_query_builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 4acc014c8..52538c695 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1119,7 +1119,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { /** * GROUP BY * - * @param string $by + * @param mixed $by * @param bool $escape * @return CI_DB_query_builder */ -- cgit v1.2.3-24-g4f1b From 68ecbb692a2b19b0f0d11b57f0276cdc95637298 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Feb 2021 16:27:56 +0200 Subject: [ci skip] Merge pull request #6013 from 1stwebdesigns/new_branch Fix Flashdata time comparison for PHP 8 --- system/libraries/Session/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 87b769ff5..f872d5325 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -417,7 +417,7 @@ class CI_Session { } // Hacky, but 'old' will (implicitly) always be less than time() ;) // DO NOT move this above the 'new' check! - elseif ($value < $current_time) + elseif ($value === 'old' || $value < $current_time) { unset($_SESSION[$key], $_SESSION['__ci_vars'][$key]); } -- cgit v1.2.3-24-g4f1b From d3d274b4bd46be966b519e1e6cb8f3f61d4ef898 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Feb 2021 16:29:36 +0200 Subject: [ci skip] Remove a comment made obsolete by PR #6013 --- system/libraries/Session/Session.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index f872d5325..06b953ab2 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -415,8 +415,6 @@ class CI_Session { { $_SESSION['__ci_vars'][$key] = 'old'; } - // Hacky, but 'old' will (implicitly) always be less than time() ;) - // DO NOT move this above the 'new' check! elseif ($value === 'old' || $value < $current_time) { unset($_SESSION[$key], $_SESSION['__ci_vars'][$key]); -- cgit v1.2.3-24-g4f1b From 751a2e364131a67ec64f783003866c0fe2df78e0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Feb 2021 16:31:47 +0200 Subject: [ci skip] Add changelog entry for #6013 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9ca8f19b4..55ebb9319 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -27,6 +27,7 @@ Bug fixes for 3.1.12 - Fixed a bug (#5901) - :doc:`Database Library ` methods ``list_fields()`` and ``field_data()`` ignored the configured table schema on PostgreSQL. - Fixed a bug (#5906) - :doc:`Database Library ` 'postgre' driver couldn't use the failover feature without a ``$config['dsn']``. - Fixed a bug (#5903) - :doc:`common function ` :php:func:`set_status_header()` didn't recognize 'HTTP/2.0' as a valid ``$_SERVER['SERVER_PROTOCOL']``. +- Fixed a bug (#6013) - :doc:`Session ` flashdata didn't work on PHP 8. Version 3.1.11 ============== -- cgit v1.2.3-24-g4f1b From 0925b5099919300a239909588351a6482c5e792d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Feb 2021 17:32:53 +0200 Subject: [ci skip] Fix is_callable()-reliant logic broken by PHP 8 Close #6006, #6007 --- system/core/CodeIgniter.php | 2 +- system/libraries/Migration.php | 2 +- system/libraries/Xmlrpcs.php | 2 +- user_guide_src/source/changelog.rst | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 2a231ad46..120dba599 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -434,7 +434,7 @@ if ( ! is_php('5.4')) * ReflectionMethod::isConstructor() is the ONLY reliable check, * knowing which method will be executed as a constructor. */ - elseif ( ! is_callable(array($class, $method))) + else { $reflection = new ReflectionMethod($class, $method); if ( ! $reflection->isPublic() OR $reflection->isConstructor()) diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php index 1b7808923..915d4e453 100644 --- a/system/libraries/Migration.php +++ b/system/libraries/Migration.php @@ -288,7 +288,7 @@ class CI_Migration { $this->_error_string = sprintf($this->lang->line('migration_class_doesnt_exist'), $class); return FALSE; } - elseif ( ! is_callable(array($class, $method))) + elseif ( ! method_exists($class, $method) OR ! (new ReflectionMethod($class, $method))->isPublic()) { $this->_error_string = sprintf($this->lang->line('migration_missing_'.$method.'_method'), $class); return FALSE; diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php index ad767eabe..e20bf4836 100644 --- a/system/libraries/Xmlrpcs.php +++ b/system/libraries/Xmlrpcs.php @@ -348,7 +348,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc { return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']); } } - elseif (($objectCall && ! is_callable(array($method_parts[0], $method_parts[1]))) + elseif (($objectCall && ( ! method_exists($method_parts[0], $method_parts[1]) OR ! (new ReflectionMethod($method_parts[0], $method_parts[1]))->isPublic())) OR ( ! $objectCall && ! is_callable($this->methods[$methName]['function'])) ) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 55ebb9319..4c081ad84 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -28,6 +28,7 @@ Bug fixes for 3.1.12 - Fixed a bug (#5906) - :doc:`Database Library ` 'postgre' driver couldn't use the failover feature without a ``$config['dsn']``. - Fixed a bug (#5903) - :doc:`common function ` :php:func:`set_status_header()` didn't recognize 'HTTP/2.0' as a valid ``$_SERVER['SERVER_PROTOCOL']``. - Fixed a bug (#6013) - :doc:`Session ` flashdata didn't work on PHP 8. +- Fixed a bug (#6006) - ``is_callable()`` change in PHP 8 broke :doc:`Migrations `, a part of :doc:`XML-RPC ` and an edge case in 404 detection logic. Version 3.1.11 ============== -- cgit v1.2.3-24-g4f1b