Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67898 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76848 invoked from network); 26 Jun 2013 16:30:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jun 2013 16:30:57 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:43438] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/4A-29746-F371BC15 for ; Wed, 26 Jun 2013 12:30:57 -0400 Received: from [192.168.2.20] (ppp-88-217-78-161.dynamic.mnet-online.de [88.217.78.161]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id EDAA165385; Wed, 26 Jun 2013 18:30:52 +0200 (CEST) To: "Ivan Enderlin @ Hoa" Cc: internals@lists.php.net In-Reply-To: <51CB1511.9050109@hoa-project.net> References: <51CB114C.5020606@hoa-project.net> <1372263564.2410.25.camel@guybrush> <51CB1511.9050109@hoa-project.net> Content-Type: text/plain; charset="UTF-8" Date: Wed, 26 Jun 2013 18:30:51 +0200 Message-ID: <1372264251.2410.27.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] UNKNOW:0, what is it? From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) 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) johannes