Re: UNKNOW:0, what is it?

From: Date: Thu, 27 Jun 2013 04:40:03 +0000
Subject: Re: UNKNOW:0, what is it?
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-67918@lists.php.net to get a copy of this message
On Thu, Jun 27, 2013 at 12:47 AM, Ivan Enderlin @ Hoa <ivan.enderlin@hoa-project.net> wrote: > > On 26/06/13 18:30, Johannes Schlüter wrote: >> >> On Wed, 2013-06-26 at 18:21 +0200, Ivan Enderlin @ Hoa wrote: >>> >>> On 26/06/13 18:19, Johannes Schlüter wrote: >>>> >>>> On Wed, 2013-06-26 at 18:05 +0200, Ivan Enderlin @ Hoa wrote: >>>>> >>>>> Hello, >>>>> >>>>> Again, I have a segfault with RecursiveDirectoryIterator when I extend >>>>> it. This time, I have a very strange value on my SplFileInfo extension >>>>> (subclass). When I var_dump the value, I have UNKNOWN:0. This is not a >>>>> string, not null, not false, just UNKNOW:0, without type. Any idea of >>>>> what is it? >>>>> >>>>> Thanks :-). >>>> >>>> Unknown is an unknown value in a structure when a zval is not properly >>>> set. Most likely you didn't call the parent's constructor. >>> >>> To bad, the constructor has been called :-(. >>> The error is here: >>> >>> >>> https://github.com/hoaproject/Iterator/blob/master/Recursive/Directory.php#L125. >>> This is a line that causes the segfault. And at line 109, >>> $this->getRelativePath() returns UNKNOWN:0. But if I var_dump >>> $this->_relativePath directly (without using the method), I have a real >>> value. I can't explain this. >> >> Try calling the parent ctor before doing anything with properties (i.e. >> setting _splFileInfoClass) >> >> If it doesn't fit please provide a complete reproduce script (and report >> a bug in any case) > > https://bugs.php.net/65136 here we are :-). thanks for the report, fixed in https://github.com/php/php-src/commit/fa8611c81ee72839cdff3e72b18cc586feb4aa29 thanks > > > -- > Ivan Enderlin > Developer of Hoa > http://hoa-project.net/ > > PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis) > http://disc.univ-fcomte.fr/ and > http://www.inria.fr/ > > Member of HTML and WebApps Working Group of W3C > http://w3.org/ > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Laruence Xinchen Hui http://www.laruence.com/

« previous php.internals (#67918) next »