bcit-ci / CodeIgniter

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
18.27k stars 7.6k forks source link

Codeigniter 3.1.4 and PHP 8.1 #6245

Closed yab86 closed 9 months ago

yab86 commented 1 year ago

I am getting several error messages while running my script. By far, I am not an expert but I am not able to fix it. It seems like an issue due to PHP 8.1 for me.

Severity: 8192 Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated Filename: /myproject/system/core/Output.php Line Number: 447

Backtrace: File: /myproject/index.php Line: 294 Function: require_once

PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /myproject/system/libraries/Profiler.php on line 108

Fatal error: Array and string offset access syntax with curly braces is no longer supported in /myproject/system/libraries/Profiler.php on line 108

A PHP Error was encountered

Severity: Compile Error Message: Array and string offset access syntax with curly braces is no longer supported Filename: /myproject/system/libraries/Profiler.php Line Number: 108

bunglegrind commented 1 year ago

https://github.com/bcit-ci/CodeIgniter/issues/5879

use CI latest version (3.1.13 at the moment)

rikrdolavin commented 1 year ago

Maybe it would be a good idea to migrate to CI4 since you are using PHP 8.1

mariolucasdev commented 9 months ago

the version 3.1.13 is compatible with php 8.1. I have 2 projects working very well with these especifications.

gxgpet commented 9 months ago

Sorry, but I can't locate any of the mentioned lines/function calls by using the code from the develop branch... If you will point them by using a GitHub link to the actual lines, I will have a look at them.