skyline.
Customer
Received this error when I wanted to buy two items after each other for two different members.
Code:
TypeError: DBTech\Shop\Entity\Item::DBTech\Shop\Entity\{closure}(): Argument #2 ($k) must be of type int, string given, called in /home/admin1jq/public_html/src/XF/Mvc/Entity/AbstractCollection.php on line 142 src/addons/DBTech/Shop/Entity/Item.php:817
Generated by: CedricV Jan 18, 2024 at 7:25 PM
Stack trace
#0 src/XF/Mvc/Entity/AbstractCollection.php(142): DBTech\Shop\Entity\Item->DBTech\Shop\Entity\{closure}(Object(DBTech\Shop\Entity\Cart), '1-3-7')
#1 src/addons/DBTech/Shop/Entity/Item.php(817): XF\Mvc\Entity\AbstractCollection->pluck(Object(Closure))
#2 src/addons/DBTech/Shop/Pub/Controller/Item.php(224): DBTech\Shop\Entity\Item->canPurchaseForUser(Object(SV\DailyStatistics\XF\Entity\User), true, NULL)
#3 src/XF/Mvc/Dispatcher.php(352): DBTech\Shop\Pub\Controller\Item->actionPurchase(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(258): XF\Mvc\Dispatcher->dispatchClass('DBTech\\Shop:Ite...', 'Purchase', Object(XF\Mvc\RouteMatch), Object(DBTech\Shop\Pub\Controller\Item), NULL)
#5 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(DBTech\Shop\Pub\Controller\Item), NULL)
#6 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#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(45) "/shop/sticky-thread-link-directory.3/purchase"
["referrer"] => string(62) "https://admin-junkies.com/shop/sticky-thread-link-directory.3/"
["_GET"] => array(0) {
}
["_POST"] => array(8) {
["_xfToken"] => string(8) "********"
["is_gift"] => string(1) "1"
["recipient"] => string(8) "Sinistra"
["message"] => string(25) "A gift for your forum. ;)"
["_xfRedirect"] => string(62) "https://admin-junkies.com/shop/sticky-thread-link-directory.3/"
["_xfRequestUri"] => string(37) "/shop/sticky-thread-link-directory.3/"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
Last edited by a moderator: