Re: severe serialize problem

From: Date: Thu, 22 May 2003 21:44:00 +0000
Subject: Re: severe serialize problem
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-1914@lists.php.net to get a copy of this message
On Wed, 2003-05-21 at 21:46, Dmitriy Myshkin wrote: > an object that is in a namespaced class that is serialized and then > deserialized becomes a "__PHP_Incomplete_Class Object ( > [__PHP_Incomplete_Class_Name]". It seems serialize/deserialize don't > understand namespaces. These patches to php_incomplete_class.h and var_unserializer.re, though not thoroughly tested, fix this. Test script: <?php namespace Foo:Baz { class Bar { } } class Baz { } $bar= new Foo:Baz::Bar(); var_dump($bar, serialize($bar), unserialize(serialize($bar))); $baz= new Baz(); var_dump(serialize($baz), unserialize(serialize($baz))); ?> You will need re2c to compile, see http://www.tildeslash.org/re2c/ - Timm

Attachment: [text/x-patch] php_incomplete_class.h.diff
Attachment: [text/x-patch] var_unserializer.re.diff
« previous php.internals (#1914) next »