Fixed PushNotification error

Robru

Well-known member
Affected version
v2.2.0 Release Candidate 1
Code:
Error: Call to a member function getStatusCode() on null src/XF/Service/PushNotification.php:211

Code:
Stack trace

#0 src/XF/Service/PushNotification.php(168): XF\Service\PushNotification->handleResults()
#1 src/XF/Service/PusherTrait.php(182): XF\Service\PushNotification->sendNotifications()
#2 src/XF/Repository/UserAlert.php(163): XF\Service\Alert\Pusher->push()
#3 src/XF/Repository/UserAlert.php(114): XF\Repository\UserAlert->insertAlert()
#4 src/XF/Notifier/AbstractNotifier.php(63): XF\Repository\UserAlert->alert()
#5 src/XF/Notifier/Post/ForumWatch.php(63): XF\Notifier\AbstractNotifier->basicAlert()
#6 src/XF/Service/AbstractNotifier.php(86): XF\Notifier\Post\ForumWatch->sendAlert()
#7 src/XF/Service/AbstractNotifier.php(44): XF\Service\AbstractNotifier->notifyType()
#8 src/XF/Service/AbstractNotifier.php(56): XF\Service\AbstractNotifier->notify()
#9 src/XF/Service/Thread/Creator.php(537): XF\Service\AbstractNotifier->notifyAndEnqueue()
#10 src/XF/Pub/Controller/Forum.php(704): XF\Service\Thread\Creator->sendNotifications()
#11 src/XF/Pub/Controller/Forum.php(903): XF\Pub\Controller\Forum->finalizeThreadCreate()
#12 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Forum->actionPostThread()
#13 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass()
#14 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch()
#15 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop()
#16 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#17 src/XF.php(464): XF\App->run()
#18 index.php(20): XF::runApp()
#19 {main}
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.0 RC2).

Change log:
Prevent an error if the push notification response is empty
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom