KSA
Well-known member
I tried to change privacy of an album > Change who can view media items and I get the server error shown below
Server error log
#0 src/XF/Repository/User.php(207): XF::handlePhpError(4096, 'Argument 1 pass...', '/home/almusaf/p...', 207, Array)
#1 src/addons/XFMG/Service/Album/SharedUserManager.php(47): XF\Repository\User->getUsersByNames(NULL, NULL, Array)
#2 src/addons/XFMG/Service/Album/SharedUserManager.php(29): XFMG\Service\Album\SharedUserManager->prepareUsers(NULL)
#3 src/XF/Container.php(276): XFMG\Service\Album\SharedUserManager->__construct(Object(XF\Pub\App), Object(XFMG\Entity\Album), NULL, 'add')
#4 src/XF/App.php(1322): XF\Container->createObject('XFMG\\Service\\Al...', Array)
#5 src/XF/Container.php(228): XF\App->XF\{closure}('XFMG:Album\\Shar...', Array, Object(XF\Container))
#6 src/XF/App.php(2466): XF\Container->create('service', 'XFMG:Album\\Shar...', Array)
#7 [internal function]: XF\App->service('XFMG:Album\\Shar...', Object(XFMG\Entity\Album), NULL, 'add')
#8 src/XF/Service/AbstractService.php(77): call_user_func_array(Array, Array)
#9 src/addons/XFMG/Service/Album/Editor.php(118): XF\Service\AbstractService->service('XFMG:Album\\Shar...', Object(XFMG\Entity\Album), NULL, 'add')
#10 src/XF/Service/ValidateAndSavableTrait.php(40): XFMG\Service\Album\Editor->_save()
#11 src/addons/XFMG/InlineMod/Album/ChangePrivacy.php(44): XFMG\Service\Album\Editor->save()
#12 src/XF/InlineMod/AbstractAction.php(87): XFMG\InlineMod\Album\ChangePrivacy->applyToEntity(Object(XFMG\Entity\Album), Array)
#13 src/XF/InlineMod/AbstractAction.php(80): XF\InlineMod\AbstractAction->applyInternal(Object(XF\Mvc\Entity\ArrayCollection), Array)
#14 src/XF/Pub/Controller/InlineMod.php(131): XF\InlineMod\AbstractAction->apply(Object(XF\Mvc\Entity\ArrayCollection), Array)
#15 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\InlineMod->actionPerform(Object(XF\Mvc\ParameterBag))
#16 src/XF/Mvc/Dispatcher.php(89): XF\Mvc\Dispatcher->dispatchClass('XF:InlineMod', 'perform', 'json', Object(XF\Mvc\ParameterBag), '', Object(XF\Pub\Controller\InlineMod), Object(XF\Mvc\Reply\Reroute))
#17 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#18 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#19 src/XF.php(328): XF\App->run()
#20 index.php(13): XF::runApp('XF\\Pub\\App')
#21 {main}
Server error log
- ErrorException: [E_RECOVERABLE_ERROR] Argument 1 passed to XF\Repository\User::getUsersByNames() must be of the type array, null given, called in /public_html/src/addons/XFMG/Service/Album/SharedUserManager.php on line 47 and defined
- src/XF/Repository/User.php:207
- Generated by:
- Mar 7, 2018 at 3:05 PM
#0 src/XF/Repository/User.php(207): XF::handlePhpError(4096, 'Argument 1 pass...', '/home/almusaf/p...', 207, Array)
#1 src/addons/XFMG/Service/Album/SharedUserManager.php(47): XF\Repository\User->getUsersByNames(NULL, NULL, Array)
#2 src/addons/XFMG/Service/Album/SharedUserManager.php(29): XFMG\Service\Album\SharedUserManager->prepareUsers(NULL)
#3 src/XF/Container.php(276): XFMG\Service\Album\SharedUserManager->__construct(Object(XF\Pub\App), Object(XFMG\Entity\Album), NULL, 'add')
#4 src/XF/App.php(1322): XF\Container->createObject('XFMG\\Service\\Al...', Array)
#5 src/XF/Container.php(228): XF\App->XF\{closure}('XFMG:Album\\Shar...', Array, Object(XF\Container))
#6 src/XF/App.php(2466): XF\Container->create('service', 'XFMG:Album\\Shar...', Array)
#7 [internal function]: XF\App->service('XFMG:Album\\Shar...', Object(XFMG\Entity\Album), NULL, 'add')
#8 src/XF/Service/AbstractService.php(77): call_user_func_array(Array, Array)
#9 src/addons/XFMG/Service/Album/Editor.php(118): XF\Service\AbstractService->service('XFMG:Album\\Shar...', Object(XFMG\Entity\Album), NULL, 'add')
#10 src/XF/Service/ValidateAndSavableTrait.php(40): XFMG\Service\Album\Editor->_save()
#11 src/addons/XFMG/InlineMod/Album/ChangePrivacy.php(44): XFMG\Service\Album\Editor->save()
#12 src/XF/InlineMod/AbstractAction.php(87): XFMG\InlineMod\Album\ChangePrivacy->applyToEntity(Object(XFMG\Entity\Album), Array)
#13 src/XF/InlineMod/AbstractAction.php(80): XF\InlineMod\AbstractAction->applyInternal(Object(XF\Mvc\Entity\ArrayCollection), Array)
#14 src/XF/Pub/Controller/InlineMod.php(131): XF\InlineMod\AbstractAction->apply(Object(XF\Mvc\Entity\ArrayCollection), Array)
#15 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\InlineMod->actionPerform(Object(XF\Mvc\ParameterBag))
#16 src/XF/Mvc/Dispatcher.php(89): XF\Mvc\Dispatcher->dispatchClass('XF:InlineMod', 'perform', 'json', Object(XF\Mvc\ParameterBag), '', Object(XF\Pub\Controller\InlineMod), Object(XF\Mvc\Reply\Reroute))
#17 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#18 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#19 src/XF.php(328): XF\App->run()
#20 index.php(13): XF::runApp('XF\\Pub\\App')
#21 {main}