PHP 8 upgrade related issues
Upgrading php to version 8 causes the following problems:
-
Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given
- Description: This issue occurs after updating php to version 8.0 and when the Botany Pilot page is accessed.
- Background: Php version 8.0 dropped implode() signature implode(array $array, string $separator) which is used in the currently installed EasyRdf version 0.9.1.
- Signature implode(string $separator, array $array) is currently the only valid standard signature.
- Solution: Update EasyRdf to version 1.1.1 as this issue was fixed in that latest version.
- Upgrading EasyRdf may cause problem 2.
-
Fatal error: Uncaught Error: Class "EasyRdf_Namespace" not found in C:\xampp\htdocs\Botany-Pilot\botanypilot\cetaf_sparql.php:21 Stack trace: #0 C:\xampp\htdocs\Botany-Pilot\botanypilot\main.php(25): include() #1 {main} thrown in C:\xampp\htdocs\Botany-Pilot\botanypilot\cetaf_sparql.php on line 21
- Description: When accessing the Botany Pilot after EasyRdf was updated, this error is returned.
- Background: In EasyRdf 1.1.1 classes were renamed and calling object methods has been changed.
- Solution: Updating class method calls from e.g. EasyRdf_Namespace::set() to \EasyRdf\RdfNamespace::set()