cdli / CdliUserProfile

THIS MODULE IS DEPRICATED - USE LdcUserProfile INSTEAD
16 stars 11 forks source link

Navigating to the profile path with no user in context throws an exception. #6

Closed generalredneck closed 10 years ago

generalredneck commented 11 years ago

I know this module is young and this may just sound like bitching, but I hope it's taken as just a means to an helping end.

This is by no means a high priority items but placing it here so it's documented.

When one navigates to user/profile and hasn't logged in, a Zend\Stdlib\Exception\BadMethodCallException is thrown.

File: vendor/zendframework/zendframework/library/Zend/Stdlib/Hydrator/ClassMethods.php:89
Message: Zend\Stdlib\Hydrator\ClassMethods::extract expects the provided $object to be a PHP object)
Stack trace:
#0 vendor/cdli/user-profile/src/CdliUserProfile/Integration/ZfcUser.php(71): Zend\Stdlib\Hydrator\ClassMethods->extract(NULL)
#1 [internal function]: CdliUserProfile\Integration\ZfcUser->addFormSection(Object(Zend\EventManager\Event))
#2 vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(464): call_user_func(Array, Object(Zend\EventManager\Event))
#3 vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(208): Zend\EventManager\EventManager->triggerListeners('getSections', Object(Zend\EventManager\Event), NULL)
#4 vendor/cdli/user-profile/src/CdliUserProfile/Service/Profile.php(32): Zend\EventManager\EventManager->trigger('getSections', Object(CdliUserProfile\Service\Profile))
#5 vendor/cdli/user-profile/src/CdliUserProfile/Controller/ProfileController.php(23): CdliUserProfile\Service\Profile->getSections()
#6 vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(90): CdliUserProfile\Controller\ProfileController->indexAction()
#7 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#8 vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(464): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#9 vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(208): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#10 vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(107): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#11 vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(113): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#12 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#13 vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(464): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#14 vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(208): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(297): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#16 public/index.php(12): Zend\Mvc\Application->run()
#17 {main}
joacub commented 10 years ago

a mi también me pasa

lukeocodes commented 10 years ago

I found the same problem.

Pull request here: https://github.com/cdli/CdliUserProfile/pull/11

adamlundrigan commented 10 years ago

Fixed in #11