bcosca / fatfree

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!
2.66k stars 446 forks source link

FFF 3.8.0, PHP 8.1 deprecated #1252

Closed olaulau closed 2 years ago

olaulau commented 2 years ago

Hi ;

works correctly on PHP 8.1 here is my error stack :

Internal Server Error

str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

[<project_root>/vendor/bcosca/fatfree-core/base.php:2375] Base->error()
[<project_root>/vendor/bcosca/fatfree-core/db/sql.php:128] str_replace()
[<project_root>/vendor/bcosca/fatfree-core/db/sql/mapper.php:101] DB\SQL->value()
[<project_root>/vendor/bcosca/fatfree-core/magic.php:76] DB\SQL\Mapper->set()
[<project_root>/vendor/bcosca/fatfree-core/magic.php:122] Magic->offsetset()
[<project_root>/vendor/bcosca/fatfree-core/base.php:885] Magic->__set()
[<project_root>/vendor/bcosca/fatfree-core/base.php:893] Base->recursive()
[<project_root>/vendor/bcosca/fatfree-core/base.php:2891] Base->recursive()
[<project_root>/vendor/bcosca/fatfree-core/base.php:2928] View->esc()
[<project_root>/vendor/bcosca/fatfree-core/base.php:2962] View->sandbox()
[<project_root>/php/controller/Ctrl.php:44] View->render()
[<project_root>/php/controller/ListCtrl.php:76] controller\Ctrl::renderPage()
[<project_root>/vendor/bcosca/fatfree-core/base.php:1984] controller\ListCtrl::operationEditGET()
[<project_root>/vendor/bcosca/fatfree-core/base.php:1783] Base->call()
[<project_root>/index.php:8] Base->run()

I can provide more details on involved code if needed. best regards ;

ikkez commented 2 years ago

Please check latest commit https://github.com/bcosca/fatfree-core/commit/4e46ebadecd2fe4aa0f05658858db51b7dccd06c if that solves your issue. thank you.

olaulau commented 2 years ago

seems to solve the issue, thanks.

olaulau commented 2 years ago

any idea of when it will be released ? do you have a simple tip to use this commit via composer ?

ikkez commented 2 years ago

@olaulau You can pin a commit as another version like this: "bcosca/fatfree-core": "dev-master#4e46ebadecd2fe4aa0f05658858db51b7dccd06c as 3.8.2",