-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
patches/Codeigniter_Framework/v3.1.13/11-php84_support_E_STRICT.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Description: remove deprecation notice on php8.4 for E_STRICT | ||
From 831108645a2b68150471035a7e5ced5086da2c51 Mon Sep 17 00:00:00 2001 | ||
From: Bruno Moreira <git@pocketarc.com> | ||
From: Fab Stz <fabstz-it@yahoo.fr> | ||
Origin: https://github.com/pocketarc/codeigniter/commit/831108645a2b68150471035a7e5ced5086da2c51 | ||
Date: Tue, 29 Oct 2024 06:12:23 -0600 | ||
Bug: https://github.com/bcit-ci/CodeIgniter/issues/6301 | ||
|
||
--- a/index.php | ||
+++ b/index.php | ||
@@ -73,7 +73,11 @@ | ||
case 'testing': | ||
case 'production': | ||
ini_set('display_errors', 0); | ||
- if (version_compare(PHP_VERSION, '5.3', '>=')) | ||
+ if (version_compare(PHP_VERSION, '8.4', '>=')) | ||
+ { | ||
+ error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_USER_NOTICE & ~E_USER_DEPRECATED); | ||
+ } | ||
+ else if (version_compare(PHP_VERSION, '5.3', '>=')) | ||
{ | ||
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); | ||
} | ||
--- a/system/core/Exceptions.php | ||
+++ b/system/core/Exceptions.php | ||
@@ -73,7 +73,11 @@ | ||
E_USER_ERROR => 'User Error', | ||
E_USER_WARNING => 'User Warning', | ||
E_USER_NOTICE => 'User Notice', | ||
- E_STRICT => 'Runtime Notice' | ||
+ | ||
+ # 2048 is E_STRICT, but it's deprecated in PHP 8.4. | ||
+ # We're keeping this here for backwards compatibility. | ||
+ # If we're on older PHP, E_STRICT errors will be labelled correctly, and if we're on PHP 8.4+, this will be ignored. | ||
+ 2048 => 'Runtime Notice' | ||
); | ||
|
||
/** |
36 changes: 36 additions & 0 deletions
36
...hes/Codeigniter_Framework/v3.1.13/11-php84_support_fix_implicit_nullable_type_error.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Origin: https://github.com/pocketarc/codeigniter/commit/d310726565c12ba99b8037e8fb231ed739258e6e | ||
Bug: https://github.com/bcit-ci/CodeIgniter/issues/6302 | ||
From d310726565c12ba99b8037e8fb231ed739258e6e Mon Sep 17 00:00:00 2001 | ||
From: Bruno Moreira <git@pocketarc.com> | ||
Date: Tue, 29 Oct 2024 06:34:00 -0600 | ||
Subject: [PATCH] Fixes a few more PHP 8.4 compatibility issues. | ||
Last-Update: 2024-10-30 | ||
|
||
--- a/system/libraries/Encryption.php | ||
+++ b/system/libraries/Encryption.php | ||
@@ -366,10 +366,10 @@ | ||
* Encrypt | ||
* | ||
* @param string $data Input data | ||
- * @param array $params Input parameters | ||
+ * @param array|null $params Input parameters | ||
* @return string | ||
*/ | ||
- public function encrypt($data, array $params = NULL) | ||
+ public function encrypt($data, $params = NULL) | ||
{ | ||
if (($params = $this->_get_params($params)) === FALSE) | ||
{ | ||
@@ -501,10 +501,10 @@ | ||
* Decrypt | ||
* | ||
* @param string $data Encrypted data | ||
- * @param array $params Input parameters | ||
+ * @param array|null $params Input parameters | ||
* @return string | ||
*/ | ||
- public function decrypt($data, array $params = NULL) | ||
+ public function decrypt($data, $params = NULL) | ||
{ | ||
if (($params = $this->_get_params($params)) === FALSE) | ||
{ |
18 changes: 18 additions & 0 deletions
18
...ter_Framework/v3.1.13/11-php84_support_session.sid_length_INI_setting_is_deprecated.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Description: skip deprecated setting of session.sid_length on php8.4 | ||
On php 8.4, this will use the default values of php 8.4 | ||
as per the recommended way to do it. | ||
Bug: https://github.com/bcit-ci/CodeIgniter/issues/6300 | ||
Author: Fab Stz <fabstz-it@yahoo.fr> | ||
Last-Update: 2024-10-15 | ||
|
||
--- a/system/libraries/Session/Session.php | ||
+++ b/system/libraries/Session/Session.php | ||
@@ -419,7 +419,7 @@ | ||
{ | ||
$bits_per_character = (int) ini_get('session.sid_bits_per_character'); | ||
$sid_length = (int) ini_get('session.sid_length'); | ||
- if (($bits = $sid_length * $bits_per_character) < 160) | ||
+ if (($bits = $sid_length * $bits_per_character) < 160 && PHP_VERSION_ID < 80400) | ||
{ | ||
// Add as many more characters as necessary to reach at least 160 bits | ||
$sid_length += (int) ceil((160 % $bits) / $bits_per_character); |