Issues

ZF-10595: Undefined property: Zend_Http_UserAgent_AbstractDevice::$_aGroup

Issue Type: Bug Created: 2010-10-24T15:01:13.000+0000 Last Updated: 2010-10-25T07:23:04.000+0000 Status: Resolved Fix version(s): - 1.11.0 (02/Nov/10)

Reporter: Maxell (maxell) Assignee: Marc Hodgins (mjh_ca) Tags: - Zend_Http_UserAgent

Related issues: Attachments: - ZF-10595.patch

Description

Zend_Http_UserAgent_AbstractDevice::$_aGroup isn't serialized, so after the first request you get the undefined property notice and all methods that access _aGroup return null.

<pre class="highlight">
In action controller
$bootstrap = $this->getInvokeArg('bootstrap');
$userAgent = $bootstrap->getResource('useragent');
$device    = $userAgent->getDevice();
Zend_Debug::dump($device->getAllGroups());

Output:
Notice: Undefined property: Zend_Http_UserAgent_Desktop::$_aGroup in /opt/ZendFramework-1.11/library/Zend/Http/UserAgent/AbstractDevice.php on line 269
NULL

Comments

Posted by Marc Hodgins (mjh_ca) on 2010-10-24T16:51:47.000+0000

Patch with unit test is attached.

Posted by Matthew Weier O'Phinney (matthew) on 2010-10-25T07:23:04.000+0000

Patch applied to trunk and 1.11 release branch -- thanks!

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts