#28335 [Opn->Fbk]: wddx_serialize_value returns empty string
| From: | sniper@php.net | Date: | Wed, 26 Jan 2005 03:57:27 +0000 |
| Subject: | #28335 [Opn->Fbk]: wddx_serialize_value returns empty string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-72848@lists.php.net to get a copy of this message | ||
ID: 28335
Updated by: sniper@php.net
Reported By: antonr at game dot permonline dot ru
-Status: Open
+Status: Feedback
Bug Type: WDDX related
Operating System: Win32
PHP Version: 5CVS-2004-05-09 (dev)
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2004-06-30 15:45:01] antonr at game dot permonline dot ru
Probably you should part the objects themselves and links to these
objects. And then serialize them separately.
------------------------------------------------------------------------
[2004-06-30 12:56:54] moriyoshi@php.net
A quotation from "The WDDX DTD" bundled in the WDDX SDK 10a.
---------------------------------------------
Serialization model-
WDDX serializes data using a model of pure aggregation. It has no
mechanism for handling object references. Aliased references will
result in multiple object instances being deserialized. WDDX
serialization applied to a data structure that has cyclical references
will most likely result in infinite iteration/recursion, depending on
the serializer implementation. Object references support is another
area of
future investigation.
---------------------------------------------
Since WDDX instances are not designed to hold references as stated in
the documentation, circular references doesn't make sense with it. It
works differently from the serialize() function in essence. But,
segfault should be prevented in a manner that wouldn't serialize
objects referenced that way.
Patch can be found here:
http://www.voltex.jp/patches/bug28335-preliminary.patch.diff
------------------------------------------------------------------------
[2004-06-21 12:46:20] clemens at gutweiler dot net
This example segfaults with PHP-5-RC3.
It contains recursive objects and should be solved like the 'r:123'-way
in serialize().
------------------------------------------------------------------------
[2004-05-09 09:16:16] antonr at game dot permonline dot ru
Description:
------------
In some cases wddx_serialize_value returns empty string.
Reproduce code:
---------------
<?php
class MyClass1
{ public $myclass2;
}
class MyClass2
{ public $myclass1;
}
$a = new MyClass1;
$a->number = 1;
$a->myclass2 = new MyClass2;
$a->myclass2->myclass1 = $a;
echo wddx_serialize_value($a);
?>
Actual result:
--------------
empty string
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28335&edit=1