Closed KazeroG closed 6 years ago
I have no idea what Flarum is, but the problem lies there, and not with Diactoros, based on the last line of the trace:
Output has been emitted previously; cannot emit response
I'm assuming you're using something like Zend\Diactoros\Server
and/or Zend\Diactoros\Response\SapiEmitter
. This latter requires that the application ensure no headers have been sent previously. This includes ensuring that no echo
, print
, printf
, var_dump
, or other similar statements that emit content to the output buffer are called, as doing so implicitly causes PHP to send headers so that it can begin sending the buffer contents to the client.
This has happened in the application you are executing, and happened when an argument was omitted when instantiating a class, as indicated by the first line of the trace you provided:
Warning: Missing argument 2 for Zurtr\OneSignal\OneSignalAPI::__construct(), called in /home/u857997072/public_html/forum/v2/vendor/zurtr/flarum-ext-onesignal/src/Listener/SendWebPushNotification.php on line 21 and defined in /home/u857997072/public_html/forum/v2/vendor/zurtr/flarum-ext-onesignal/src/OneSignalAPI.php on line 9
My guess is that the SendWebPushNotification
listener is not properly instantiating a OneSignalAPI
instance. This is not a problem in Diactoros.
One of the extensions is for beta 7
EDIT: I meant beta 6.
@weierophinney thanks for jumping in, my apologies for drawing unwanted attention. Please ignore the report files on the diactoros repository.
@KazeroG next time, as suggested on the forums, ask for confirmation first before reporting a possible (for you) huge issue like this. Also, as @datitisev and the answer on this issue points out is the issue caused by an outdated extension.
Big Issue
No Compatibilities between Ext or just big error in ...
Log :
php flarum info