Fixed XF\CookieConsent::addConsentedGroups(): Argument #1 ($groups) must be of type array, null given

Nirjonadda

Well-known member
Affected version
2.2.12
Getting lof of Server error log:

Code:
TypeError: XF\CookieConsent::addConsentedGroups(): Argument #1 ($groups) must be of type array, null given, called in /home/user/public_html/src/XF/App.php on line 1910 src/XF/CookieConsent.php:298

Generated by: Unknown account Dec 21, 2022 at 8:55 AM

Stack trace

#0 src/XF/App.php(1910): XF\CookieConsent->addConsentedGroups(NULL)
#1 src/XF/App.php(346): XF\App->setupCookieConsent(Object(XF\CookieConsent))
#2 src/XF/Container.php(31): XF\App->XF\{closure}(Object(XF\Container))
#3 src/XF/App.php(2609): XF\Container->offsetGet('cookieConsent')
#4 src/XF/Http/Request.php(1338): XF\App->cookieConsent()
#5 src/XF/Pub/App.php(359): XF\Http\Request->populateFromSearch(Object(XF\Http\Response))
#6 src/XF/Pub/App.php(156): XF\Pub\App->onSessionCreation(Object(DBTech\Security\XF\Session\Session))
#7 src/XF/App.php(2479): XF\Pub\App->start(true)
#8 src/XF.php(524): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}

Request state

array(4) {
  ["url"] => string(330) "/misc/cookies?update=1&accept=1&t=1671591307%2C86eaa98e81e1badf8a7769b77ea04158&_xfRequestUri=%2Fthreads%2Fprajakta-dusane-18june-s.91818%2F&_xfWithData=1&_xfToken=1671591307%2C86eaa98e81e1badf8a7769b77ea04158&_xfResponseType=json"
  ["referrer"] => string(162) "/threads/s.91818/"
  ["_GET"] => array(7) {
    ["update"] => string(1) "1"
    ["accept"] => string(1) "1"
    ["t"] => string(43) "1671591307,86eaa98e81e1badf8a7769b77ea04158"
    ["_xfRequestUri"] => string(140) "/threads/s.91818/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "1671591307,86eaa98e81e1badf8a7769b77ea04158"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}
 
Receiving this as well, now 18,323 items within 24 hours.

Code:
TypeError: XF\CookieConsent::addConsentedGroups(): Argument #1 ($groups) must be of type array, null given, called in **path**\src\XF\App.php on line 1910 src\XF\CookieConsent.php:298
Generated by: Unknown account 5 Apr 2023 at 11:11
Stack trace
#0 src\XF\App.php(1910): XF\CookieConsent->addConsentedGroups(NULL)
#1 src\XF\App.php(346): XF\App->setupCookieConsent(Object(XF\CookieConsent))
#2 src\XF\Container.php(31): XF\App->XF\{closure}(Object(XF\Container))
#3 src\XF\App.php(2609): XF\Container->offsetGet('cookieConsent')
#4 src\XF\Http\Request.php(1338): XF\App->cookieConsent()
#5 src\XF\Pub\App.php(359): XF\Http\Request->populateFromSearch(Object(XF\Http\Response))
#6 src\XF\Pub\App.php(156): XF\Pub\App->onSessionCreation(Object(DBTech\Security\XF\Session\Session))
#7 src\XF\App.php(2479): XF\Pub\App->start(true)
#8 src\XF.php(524): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}
Code:
array(4) {
  ["url"] => string(34) "/forums/news-und-ankuendigungen/.2"
  ["referrer"] => string(45) "https://www.google.com/search?hl=en&q=testing"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
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:
Fix error thrown when xf_consent cookie has an invalid value
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom