Attempt to log a WP_Error object that doesn't contain a $data property, for example by using the following PHP code:
do_action( 'wonolog.log.error', new \WP_Error( 'hello', 'world' ) );
What I Expected
The WP_Error object gets logged.
What Happened Instead
A fatal error is triggered by Wonolog:
Uncaught TypeError: Argument 4 passed to Inpsyde\Wonolog\Data\Log::__construct() must be of the type array, null given, called in src/Data/Log.php on line 74
Version Information
Steps to Reproduce
Attempt to log a
WP_Error
object that doesn't contain a$data
property, for example by using the following PHP code:What I Expected
The
WP_Error
object gets logged.What Happened Instead
A fatal error is triggered by Wonolog: