Deprecation warning in \Honeypot\Honeypot.php - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Deprecation warning in \Honeypot\Honeypot.php (/showthread.php?tid=88952) |
Deprecation warning in \Honeypot\Honeypot.php - objecttothis - 12-08-2023 PHP 8.2.12 CI 4.4.3 I have the following code PHP Code: public function getCsv(): DownloadResponse When executed it produces the following deprecation warning. This warning is not present in PHP 8.0.x Code: WARNING - 2023-12-08 17:21:12 --> [DEPRECATED] str_ireplace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in SYSTEMPATH\Honeypot\Honeypot.php on line 93. RE: Deprecation warning in \Honeypot\Honeypot.php - kenjis - 12-09-2023 Try this: Code: --- a/system/Honeypot/Honeypot.php RE: Deprecation warning in \Honeypot\Honeypot.php - objecttothis - 12-09-2023 Yep, that fixes it! RE: Deprecation warning in \Honeypot\Honeypot.php - kenjis - 12-09-2023 I sent a PR to fix: https://github.com/codeigniter4/CodeIgniter4/pull/8316 The PR was merged. So this bug will be fixed in v4.4.4. |