Fixed Call to a member function getCookieThirdParties() on null

Status
Not open for further replies.

NikitOS

Well-known member
Affected version
2.2.12
If an add-on that adds a payment provider was installed, and then it was deleted along with the files, but the payment profiles associated with this provider were not deleted, an exception occurs:
Code:
An exception occurred: [Error] Call to a member function getCookieThirdParties() on null in src/XF/App.php on line 1895

    XF\App->setupCookieConsent() in src/XF/Admin/App.php at line 44
    XF\Admin\App->setupCookieConsent() in src/XF/App.php at line 346
    XF\App->XF\{closure}() in src/XF/Container.php at line 31
    XF\Container->offsetGet() in src/XF/App.php at line 2609
    XF\App->cookieConsent() in src/XF/App.php at line 2154
    XF\App->getGlobalTemplateData() in src/XF/App.php at line 2077
    XF\App->preRender() in src/XF/Admin/App.php at line 114
    XF\Admin\App->preRender() in src/XF/Mvc/Dispatcher.php at line 397
    XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 60
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2483
    XF\App->run() in src/XF.php at line 524
    XF::runApp() in admin.php at line 13

The XF\Repository\Payment::getPaymentProviderHandler method may return null. It seems worth adding an appropriate check to avoid such errors.
 
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.13).

Change log:
Don't attempt to access `getCookieThirdParties` on payment providers which may no longer exist.
There may be a delay before changes are rolled out to the XenForo Community.
 
how to solve this problem with 2.2.11 we have the same problem i need a solution and don't tell me that i shoud to upgrade .
 
No the only viable solution is to upgrade. The fix may involve changes in numerous files. Upgrading is the only supported solution.
 
Last edited:
Probably not an issue with the add-on. The issue is within that version of XenForo which is fixed in 2.2.13.
 
I think the position is clear.

To fix this bug, upgrade to the version that fixed it (or later version).

If you have questions about a specific add-on, direct them towards the add-on.

This is a fixed bug report thread so this isn't the right place for such discussions.
 
Status
Not open for further replies.
Back
Top Bottom