[php-maint] Bug#580383: Bug#580383: Bug#580383: php-xml-parser uses deprecated eregi and reference of new object

Thomas Goirand zigo at debian.org
Mon Aug 30 04:46:26 UTC 2010


Thijs Kinkhorst wrote:
> Hi,
> 
> On woansdei 5 Maaie 2010, Thomas Goirand wrote:
>> Replying to myself, as I didn't know it would go back to the list! :)
>>
>> My patch fixes the eregi calls, but not this one:
>>
>>         $err = &new XML_Parser_Error($msg, $ecode);
>>         return parent::raiseError($err);
>>
>> What's the way to fix for php 5.3.x?
> 
> Two questions:
> 
> 1) Why is it needed to pass the object by reference? It looks like it could 
> just as well be passed by value.

Are you saying that just removing the & sign will be enough to have it
100% working? I was feeling it was the case, but I wasn't sure that I
was right, and that this wouldn't create other issues. If that is the
case, then I can NMU a fix within few hours (this package is very
important for me). As for the other issue with the deprecated ereg
calls, it's trivial, and I already talked about it with upstream. I'll
generate a full patch and send it to him.

> 2) Why is this bug of grave severity? As I understand it, using this only 
> generates notices of level E_DEPRECATED. The code functions just as it did 
> before.

The thing is, this code is likely used when generating / parsing XML. In
few corner cases, having a big warning on top of an XML document can
totally break things, which is why I raised it to Grave (I have such an
issue). Also, despite my repeated calls for comments, nobody replied,
and I thought that the only way to bring attention was to promote it to
RC bug. Thanks for your comments, now I'll fix it.

Thomas Goirand (zigo)





More information about the pkg-php-maint mailing list