Closed wildtierschweiz closed 2 years ago
Hi. I wasn't able to reproduce this. Perhaps a minor version issue or something. However, since https://github.com/bcosca/fatfree/issues/1252 also reported this same behaviour, I tried to patch this part slightly. Can you have a look at the latest commit and see if this solves the issue? thank you.
https://github.com/bcosca/fatfree-core/blob/ee8ad6460ff33514a6b705cc8bff57e2b5048e3b/db/sql.php#L128
fatfree-core 3.8.0 / PHP 8.1 / MySQL-MariaDB
This code uses an Ad-Hoc field "max_sortorder"
The Problem is, when the Ad-Hoc field results in NULL, when no record hydrades the mapper. The code fails in PHP 8.1, because the str_replace() call somehow gets passed NULL as the third parameter, which is depricated.
str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
I tried this to work around, but did not succeed:
My current work around that works is this: