You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discoverd a weird bug on a PHP 5.6 system, when I ran Wonolog within a complete site stack using wp cli:
$ wp site list
PHP Fatal error: Cannot instantiate abstract class Inpsyde\Wonolog\Data\Log in /.../vendor/inpsyde/wonolog/src/PhpErrorController.php on line 73
It turned out that the error that is actually triggering Wonolog's error handler has the following message:
Inpsyde\Wonolog\Data\Log and Inpsyde\Wonolog\Data\LogDataTrait define the same property ($message) in the composition of Inpsyde\Wonolog\Data\Log. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed
This E_STRICT error causes that PHP handles the Log class as abstract one, obviously.
However, here's how you can reproduce it (in PHP 5.6):
I discoverd a weird bug on a PHP 5.6 system, when I ran Wonolog within a complete site stack using wp cli:
It turned out that the error that is actually triggering Wonolog's error handler has the following message:
This E_STRICT error causes that PHP handles the Log class as abstract one, obviously.
However, here's how you can reproduce it (in PHP 5.6):
Running this script via CLI will give you this error:
The solution is to remove any duplicate declaration of properties in classes, that was declared by any used trait.
The text was updated successfully, but these errors were encountered: