ZF-12346: PHP Indirect modification of overloaded property

Issue Type: Bug Created: 2012-07-24T12:46:07.000+0000 Last Updated: 2012-07-24T12:54:56.000+0000 Status: Open Fix version(s): Reporter: Maksim (maxxx1313) Assignee: Wade Arnold (wadearnold) Tags: - Zend_Amf

  • amf
  • php

Related issues: Attachments:


I'm using zendAMF 1.11.12 Release (r24992) with Yii 1.1.10.r3566 Indirect modification of overloaded property Client::$id has no effect occure at Zend\Amf\Parse\Amf3\Serializer.php(499)

FILE \Zend\Amf\Parse\Amf3\Serializer.php

495 switch($encoding) { 496 case Zend_Amf_Constants::ET_PROPLIST: 497 //Write the sealed values to the output stream. 498 foreach ($propertyNames as $key) { 499 $this->writeTypeMarker($object->$key); // THIS LINE HAS BUG 500 } 501 break;

Error occure because __get method return object read-only, but foreach require read-write mode. So, i've fixed it simply:

498 foreach ($propertyNames as $key) { 499 $data = $object->$key; 500 $this->writeTypeMarker($data); // fixed bug 501 } But i think that's not best experience.


No comments to display

Have you found an issue?

See the Overview section for more details.


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

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