spatie / wordpress-ray

Debug with Ray to fix problems faster in WordPress apps
https://myray.app
MIT License
73 stars 14 forks source link

Fatal error: Return value #67

Closed carstenjaksch closed 1 year ago

carstenjaksch commented 1 year ago

I have a weird error. Just installed Ray to debug an issue. But didn't expect that the debugger needs debugging. 😁

ray('test'); // After that, this error comes in WP All Export:
// Fatal error: Uncaught Error: Spatie\WordPressRay\Spatie\Ray\Payloads\Payload::getOrigin(): Return value must be of type Spatie\WordPressRay\Spatie\Ray\Origin\Origin, Spatie\Ray\Origin\Origin returned

Installed is WordPress 6.1.1 and PHP 8.0 – tested with PHP 8.1 too.

I tried to debug the code inside an action called pmxe_after_export within the functions.php – which I was debugging multiple times in the past and deinstalled Ray afterwards.

jeffreyvr commented 1 year ago

How did you install Ray and what version are using? I've tried to reproduce the error with WP All Export and the hook you are using, but I'm not getting this error.

carstenjaksch commented 1 year ago

I installed Ray the default way – with the WordPress plugin directory. It is the newest version.

jeffreyvr commented 1 year ago

That's what I did too. To be sure, I'm using v1.7.4 and use PHP 8.1. Can you provide the full stack trace of the error?

carstenjaksch commented 1 year ago

Well I installed it with PHP 8.0 active. Maybe that is the issue? A stack trace was not displayed.

jeffreyvr commented 1 year ago

I've tested both PHP 8.0 (including re-install of the plugin) and 8.1 but I don't have the error occurring. Perhaps you can turn on the debug log. That should provide a stack trace..

spatie-bot commented 1 year ago

Dear contributor,

because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.