Skip to content

Commit

Permalink
Correct order of creating references
Browse files Browse the repository at this point in the history
git-svn-id: http://sabreamf.googlecode.com/svn/trunk@226 4d1502ab-f33c-0410-ba90-8f7d5a69d0d2
  • Loading branch information
evert committed Jun 26, 2009
1 parent 3c1174a commit fb0f644
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SabreAMF/AMF0/Deserializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public function readAMFData($settype = null,$newscope = false) {
public function readObject() {

$object = array();
$this->refList[] =& $object;
while (true) {
$key = $this->readString();
$vartype = $this->stream->readByte();
Expand All @@ -93,7 +94,6 @@ public function readObject() {
if (defined('SABREAMF_OBJECT_AS_ARRAY')) {
$object = (object)$object;
}
$this->refList[] = $object;
return $object;

}
Expand Down Expand Up @@ -198,6 +198,7 @@ public function readTypedObject() {

$classname = $this->readString();
$object = array();
$this->refList[] =& $object;
while (true) {
$key = $this->readString();
$vartype = $this->stream->readByte();
Expand All @@ -209,7 +210,6 @@ public function readTypedObject() {
// AAARRRGGGH
} else {
$object = new SabreAMF_TypedObject($classname,$object);
$this->refList[] = $object;
}
return $object;

Expand Down

0 comments on commit fb0f644

Please sign in to comment.