RE: Patch for namespace (Image_JpegXmpReader)
| From: | Michael Gauthier | Date: | Tue, 31 Aug 2010 14:02:08 +0000 |
| Subject: | RE: Patch for namespace (Image_JpegXmpReader) | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-53742@lists.php.net to get a copy of this message | ||
Hi Tomek,
The PCRE syntax being used there is intentional. It is a named
back-reference used so the closing tag matches the opening tag. See the
end of http://www.php.net/manual/en/regexp.reference.back-references.php
Are you using a PHP < 5.2.2? The support for named back-references was
only added in 5.2.2.
Cheers,
Mike
On Mon, 2010-08-30 at 16:54 -0400, Tomek Kott wrote:
> Hi Mike,
>
> A user pointed out a potential bug that seemed to make things go wonky when using a piece of
> code I wrote that leverages your patch.
>
> It applies to line 257 of the JpegXMPReader, where the closing namespace match is
> \k<ns>
> The user said that this might be a leftover of .NET style RegExp matching, and that the PHP
> equivalent seems to be (or at least that change made things work for him).
> (?P=ns)
> (which seems to be partly what is being used in line 252).
>
> Does this make sense, or maybe the change should be (?P=</ns>)?
>
> Thanks in advance for your feedback.
>
> Tomek
>
> -----Original Message-----
> From: Michael Gauthier [mailto:mike@silverorange.com]
> Sent: Monday, July 26, 2010 11:49 AM
> To: Tomek Kott
> Subject: Re: Patch for namespace (Image_JpegXmpReader)
>
> Also, do you mind if I forward this thread to pear-dev?
>
>
> On Mon, 2010-07-26 at 12:47 -0300, Michael Gauthier wrote:
> > Hi Tomek,
> >
> > I didn't make a patch for the namespace designation because it was
> > difficult to separate from the cleanup patch until the cleanup patch was
> > applied to SVN.
> >
> > I've uploaded the combined patches at
> >
> > http://labs.silverorange.com/files/pear-patches/Image_JpegXmpReader/
> > and
> > will add that link to the bug report on PEAR as well.
> >
> > Good luck!
> >
> >
> > Mike
> >
> >
> > On Tue, 2010-07-13 at 20:43 +0000, Tomek Kott wrote:
> > > [This message has been brought to you via pear.php.net.]
> > >
> > > Hi Michael,
> > >
> > > I've applied your patch for the package: Image_JpegXmpReader and you had
> > > mentioned in
> > > http://pear.php.net/bugs/bug.php?id=16777 that you had
> > > another patch for adding the namespace designation.
> > >
> > > I can't seem to find that patch (I could very well be blind), and was
> > > hoping you would still have it.
> > >
> > > Many thanks,
> > >
> > > Tomek
> >
>
>
>