I had this same issue and your suggestion fixed the problem. When in the
bootstrap, you should use the existing userAgent created when the
application.ini file was parsed and not declare a new one. A new userAgent
would not have the settings from the application.ini file. To get the
existing userAgent created by the application.ini file use:
$userAgent = $this->getPluginResource('useragent')->getUserAgent();
Apparently, you can use a different process to get the correct userAgent
when you are in a plugin controller:
$viewRenderer =
Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
if (null === $viewRenderer->view) {
$viewRenderer->initView();
}
$view = $viewRenderer->view;
$userAgent = $view->userAgent();
I suppose the reason that this code doesn't work in the bootstrap is because
the viewRenderer hasn't yet been created, so it will instantiate a new one
that won't have the correct view and userAgent attached to it.
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/Exception-when-Setting-up-WURFL-tp3354409p3753436.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]