User tests: Successful: Unsuccessful:
Pull Request for Issue #37035 . 404 pages throw a blank page / 500 status code instead of displaying the default 404 page. This is due to a compile time error in the legacy exception class used internally to create the 404 error page.
The legacy extension class re-declares properties already declared in PHP's default exception class.
Starting with PHP 8.1, all the protected properties got type hints in the upstream definition and thus cannot be redeclared without specifying type hints in the overriding class. Adding those type hints would be of course no viable solution, as this is not possible with php 5.x (no type hint support) and would even be a compile time error on all PHP versions up to PHP 8.0.
(This is a b/c break between PHP 8.0 and 8.1, though this should not occur between two minor versions. In the relevant discussion on the PHP mailing list, the re-declaration of already defined core properties was just defined as unsupported...)
Removing the re-declared properties from Joomla's legacy exception class should fix the issue. After some research, this fix should work on all PHP versions supported by Joomla 3.10, but I did not test old PHP versions manually.
Accessing a non-existent page in the frontend displays a white page / 500 error instead of a 404 page.
Accessing a non-existent page in the frontend displays a standard 404 page.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Will merge here as I have just tested the change on PHP 5.3.10 which also has the variables declared :)
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-03-17 17:26:05 |
Closed_By | ⇒ | zero-24 | |
Labels |
Added:
?
?
|
Thanks you @ManuelHu will take later a look here on the older PHP versions too.