Debian Bug report logs -
#580383
php-xml-parser uses deprecated eregi and reference of new object
Reported by: Thomas Goirand <thomas@goirand.fr>
Date: Wed, 5 May 2010 16:39:01 UTC
Severity: grave
Tags: help
Found in versions php-xml-parser/1.3.2-1, php-xml-parser/1.3.0-1
Fixed in version php-xml-parser/1.3.2-3
Done: Thomas Goirand <thomas@goirand.fr>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#580383; Package php-xml-parser.
(Wed, 05 May 2010 16:39:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Thomas Goirand <thomas@goirand.fr>:
New Bug report received and forwarded. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Wed, 05 May 2010 16:39:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Subject: php-xml-parser uses deprecated eregi and reference of new object
Package: php-xml-parser
Version: 1.3.0-1
Severity: important
Hi,
As per subject and:
http://pear.php.net/bugs/bug.php?id=16567
I have written a small patch for replacing the eregi calls, and as the
author didn't want to break php4 compatibility, I did some version
checkings. As I'm also proposing to the upstream author to use the
patch, I have sent him as copy of this entry.
Note that the attached patch will fix the eregi calls, but NOT the
return by reference of a new object line 616 (on the 1.3.2) or 633 (on
version 1.3.0 that is currently packaged in Debian). This issue must be
solved too, I'll let the maintainer or the upstream find a solution.
Best would be that the upstream author fix his PEAR package and release
an 1.3.3, so that we could package it into Debian. But if this is not
done upstream, please have this fixed for Squeeze (at least the eregi
stuffs, the rest is just when there's errors, so it's less of an issue).
Thomas
-- System Information:
Debian Release: 5.0.4
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-4-xen-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
[Parser.php.eregi_removal.patch (text/x-diff, inline)]
--- Parser.php.orig 2010-05-05 23:48:46.000000000 +0800
+++ Parser.php 2010-05-06 00:10:04.000000000 +0800
@@ -417,7 +417,15 @@
/**
* check, if file is a remote file
*/
- if (eregi('^(http|ftp)://', substr($file, 0, 10))) {
+ $regexp = '^(http|ftp)://';
+ $file_start = substr($file, 0, 10);
+ if (version_compare( phpversion(), '5.3.0') >= 0){
+ $check_result = prereg_match( "/" . $regexp . "/i" , $file_start);
+ }else{
+ $check_result = eregi( $regexp , $file_start);
+ }
+
+ if ( $check_result ) {
if (!ini_get('allow_url_fopen')) {
return $this->
raiseError('Remote files cannot be parsed, as safe mode is enabled.',
@@ -474,16 +482,25 @@
if (is_resource($fp)) {
$this->fp = $fp;
return true;
- } elseif (eregi('^[a-z]+://', substr($fp, 0, 10))) {
- // see if it's an absolute URL (has a scheme at the beginning)
- return $this->setInputFile($fp);
- } elseif (file_exists($fp)) {
- // see if it's a local file
- return $this->setInputFile($fp);
- } else {
- // it must be a string
- $this->fp = $fp;
- return true;
+ }else{
+ $regexp = '^[a-z]+://';
+ $check_string = substr($fp, 0, 10);
+ if (version_compare( phpversion(), '5.3.0') >= 0){
+ $check_result = prereg_match( "/" . $regexp . "/i" , $check_string);
+ }else{
+ $check_result = eregi( $regexp , $check_string);
+ }
+ if ($check_result) {
+ // see if it's an absolute URL (has a scheme at the beginning)
+ return $this->setInputFile($fp);
+ } elseif (file_exists($fp)) {
+ // see if it's a local file
+ return $this->setInputFile($fp);
+ } else {
+ // it must be a string
+ $this->fp = $fp;
+ return true;
+ }
}
return $this->raiseError('Illegal input format',
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#580383; Package php-xml-parser.
(Wed, 05 May 2010 17:51:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Thomas Goirand <thomas@goirand.fr>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Wed, 05 May 2010 17:51:04 GMT) (full text, mbox, link).
Message #10 received at 580383@bugs.debian.org (full text, mbox, reply):
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?
Thomas
Severity set to 'grave' from 'important'
Request was from Thomas Goirand <zigo@debian.org>
to control@bugs.debian.org.
(Thu, 26 Aug 2010 10:54:07 GMT) (full text, mbox, link).
Added tag(s) help.
Request was from Thomas Goirand <zigo@debian.org>
to control@bugs.debian.org.
(Thu, 26 Aug 2010 10:57:03 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#580383; Package php-xml-parser.
(Sun, 29 Aug 2010 11:12:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Thijs Kinkhorst <thijs@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Sun, 29 Aug 2010 11:12:03 GMT) (full text, mbox, link).
Message #19 received at 580383@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
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.
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.
Cheers,
Thijs
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#580383; Package php-xml-parser.
(Mon, 30 Aug 2010 04:48:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Thomas Goirand <zigo@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Mon, 30 Aug 2010 04:48:03 GMT) (full text, mbox, link).
Message #24 received at 580383@bugs.debian.org (full text, mbox, reply):
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)
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#580383; Package php-xml-parser.
(Tue, 31 Aug 2010 18:21:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Thomas Goirand <thomas@goirand.fr>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Tue, 31 Aug 2010 18:21:03 GMT) (full text, mbox, link).
Message #29 received at 580383@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Thijs Kinkhorst wrote:
> 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.
>
> 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.
>
>
> Cheers,
> Thijs
Hi Thijs,
I have made the necessary corrections to the package. Attached is an
interdiff between the 2 versions. Please have a quick look/review, and
let me know if you think it's ok that I upload the amended version.
Also, I maintain all of my php PEAR packages in Git. Would it make sense
to add that one in /git/pkg-php as well? Do you want me to do so after
this upload?
Please let me know, this package really is a blocker for me.
Cheers,
Thomas Goirand (zigo)
[php-xml-parser_1.3.2-1_to_1.3.2-1.1.interdiff (text/plain, inline)]
diff -u php-xml-parser-1.3.2/debian/rules php-xml-parser-1.3.2/debian/rules
--- php-xml-parser-1.3.2/debian/rules
+++ php-xml-parser-1.3.2/debian/rules
@@ -1,5 +1,7 @@
#!/usr/bin/make -f
+include /usr/share/dpatch/dpatch.make
+
DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-)
DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
@@ -17,9 +19,10 @@
build-stamp: configure-stamp
dh_testdir
+ dpatch apply-all
touch build-stamp
-clean:
+clean: unpatch
dh_testdir
dh_testroot
if [ -f $(pear_pkg)/package.xml ]; then \
diff -u php-xml-parser-1.3.2/debian/control php-xml-parser-1.3.2/debian/control
--- php-xml-parser-1.3.2/debian/control
+++ php-xml-parser-1.3.2/debian/control
@@ -3,8 +3,8 @@
Priority: optional
Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Uploaders: Thijs Kinkhorst <thijs@debian.org>
-Build-Depends: debhelper (>= 7)
-Standards-Version: 3.8.4
+Build-Depends: debhelper (>= 7), dpatch
+Standards-Version: 3.9.1
Build-Depends-Indep: php-pear
Vcs-Svn: svn://svn.debian.org/pkg-php/pear/php-xml-parser/trunk
Vcs-Browser: http://svn.debian.org/wsvn/pkg-php/pear/php-xml-parser/trunk
diff -u php-xml-parser-1.3.2/debian/changelog php-xml-parser-1.3.2/debian/changelog
--- php-xml-parser-1.3.2/debian/changelog
+++ php-xml-parser-1.3.2/debian/changelog
@@ -1,3 +1,13 @@
+php-xml-parser (1.3.2-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Fixes PHP 5.3.x warning due to ereg() and return of a reference, which are
+ now deprecated (Closes: #580383).
+ * Bumps Standard-Version to 3.9.1.
+ * Added debian/source/format and debian/README.source
+
+ -- Thomas Goirand <zigo@debian.org> Wed, 01 Sep 2010 02:02:16 +0800
+
php-xml-parser (1.3.2-1) unstable; urgency=low
* New upstream release.
only in patch2:
unchanged:
--- php-xml-parser-1.3.2.orig/debian/README.source
+++ php-xml-parser-1.3.2/debian/README.source
@@ -0,0 +1,14 @@
+This package uses dpatch to maintain a Debian correction, so
+that XML_Parser can run in PHP 5.3.x without producing warnings.
+
+To apply all patches that have been added in Debian, just do:
+
+dpatch apply-all
+
+To remove these patches, do:
+
+dpatch deapply-all
+
+Enjoy!
+
+Thomas Goirand (zigo@debian.org)
only in patch2:
unchanged:
--- php-xml-parser-1.3.2.orig/debian/source/format
+++ php-xml-parser-1.3.2/debian/source/format
@@ -0,0 +1 @@
+1.0
only in patch2:
unchanged:
--- php-xml-parser-1.3.2.orig/debian/patches/001parser.php_compat_php_5.3.x.dpatch
+++ php-xml-parser-1.3.2/debian/patches/001parser.php_compat_php_5.3.x.dpatch
@@ -0,0 +1,74 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 001parser.php_compat_php_5.3.x.dpatch by Thomas Goirand <zigo@debian.org>
+##
+## DP: This patch makes php-xml-parser work with PHP 5.3.x that is
+## DP: currently the new version in Debian. It removes a return by
+## DP: reference, and replaces ereg() calls by preg, as both are
+## DP: deprecated in php 5.3.x, which makes PHP produces some nasty
+## DP: warnings that could be annoying when outputing XML documents.
+
+@DPATCH@
+--- php-xml-parser-1.3.2.orig/XML_Parser-1.3.2/Parser.php 2010-09-01 01:52:06.000000000 +0800
++++ php-xml-parser-1.3.2/XML_Parser-1.3.2/Parser.php 2010-09-01 01:52:58.000000000 +0800
+@@ -417,7 +417,15 @@
+ /**
+ * check, if file is a remote file
+ */
+- if (eregi('^(http|ftp)://', substr($file, 0, 10))) {
++ $regexp = '^(http|ftp)://';
++ $file_start = substr($file, 0, 10);
++ if (version_compare( phpversion(), '5.3.0') >= 0){
++ $check_result = prereg_match( "/" . $regexp . "/i" , $file_start);
++ }else{
++ $check_result = eregi( $regexp , $file_start);
++ }
++
++ if ( $check_result ) {
+ if (!ini_get('allow_url_fopen')) {
+ return $this->
+ raiseError('Remote files cannot be parsed, as safe mode is enabled.',
+@@ -474,16 +482,25 @@
+ if (is_resource($fp)) {
+ $this->fp = $fp;
+ return true;
+- } elseif (eregi('^[a-z]+://', substr($fp, 0, 10))) {
+- // see if it's an absolute URL (has a scheme at the beginning)
+- return $this->setInputFile($fp);
+- } elseif (file_exists($fp)) {
+- // see if it's a local file
+- return $this->setInputFile($fp);
+- } else {
+- // it must be a string
+- $this->fp = $fp;
+- return true;
++ }else{
++ $regexp = '^[a-z]+://';
++ $check_string = substr($fp, 0, 10);
++ if (version_compare( phpversion(), '5.3.0') >= 0){
++ $check_result = prereg_match( "/" . $regexp . "/i" , $check_string);
++ }else{
++ $check_result = eregi( $regexp , $check_string);
++ }
++ if ($check_result) {
++ // see if it's an absolute URL (has a scheme at the beginning)
++ return $this->setInputFile($fp);
++ } elseif (file_exists($fp)) {
++ // see if it's a local file
++ return $this->setInputFile($fp);
++ } else {
++ // it must be a string
++ $this->fp = $fp;
++ return true;
++ }
+ }
+
+ return $this->raiseError('Illegal input format',
+@@ -613,7 +630,7 @@
+ function &raiseError($msg = null, $ecode = 0)
+ {
+ $msg = !is_null($msg) ? $msg : $this->parser;
+- $err = &new XML_Parser_Error($msg, $ecode);
++ $err = new XML_Parser_Error($msg, $ecode);
+ return parent::raiseError($err);
+ }
+
only in patch2:
unchanged:
--- php-xml-parser-1.3.2.orig/debian/patches/00list
+++ php-xml-parser-1.3.2/debian/patches/00list
@@ -0,0 +1 @@
+001parser.php_compat_php_5.3.x.dpatch
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#580383; Package php-xml-parser.
(Tue, 31 Aug 2010 21:09:05 GMT) (full text, mbox, link).
Acknowledgement sent
to "Thijs Kinkhorst" <thijs@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Tue, 31 Aug 2010 21:09:06 GMT) (full text, mbox, link).
Message #34 received at 580383@bugs.debian.org (full text, mbox, reply):
On Tue, August 31, 2010 20:16, Thomas Goirand wrote:
> Thijs Kinkhorst wrote:
>> 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.
>>
>> 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.
>>
>>
>> Cheers,
>> Thijs
>
> Hi Thijs,
>
> I have made the necessary corrections to the package. Attached is an
> interdiff between the 2 versions. Please have a quick look/review, and
> let me know if you think it's ok that I upload the amended version.
You're using "prereg_match" which I think is a misspelling of the
"preg_match" function. Did you test it?
I was wondering apart from this why you keep the ereg(i) calls. All
versions of PHP also support preg_match, so you can just replace them with
preg_match calls unconditionally.
Cheers,
Thijs
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#580383; Package php-xml-parser.
(Tue, 31 Aug 2010 21:33:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Thomas Goirand <thomas@goirand.fr>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Tue, 31 Aug 2010 21:33:05 GMT) (full text, mbox, link).
Message #39 received at 580383@bugs.debian.org (full text, mbox, reply):
----- Original message -----
> You're using "prereg_match" which I think is a misspelling of the
> "preg_match" function. Did you test it?
Wooops!!! :(
> I was wondering apart from this why you keep the ereg(i) calls. All
> versions of PHP also support preg_match, so you can just replace them
> with preg_match calls unconditionally.
>
> Cheers,
> Thijs
Because of upstream insisting to support
ante-diluvian version of php, and my will to have
the patch upstreamed.
Thomas
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#580383; Package php-xml-parser.
(Wed, 01 Sep 2010 09:00:06 GMT) (full text, mbox, link).
Acknowledgement sent
to "Thijs Kinkhorst" <thijs@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Wed, 01 Sep 2010 09:00:06 GMT) (full text, mbox, link).
Message #44 received at 580383@bugs.debian.org (full text, mbox, reply):
On Tue, August 31, 2010 23:28, Thomas Goirand wrote:
> Because of upstream insisting to support
> ante-diluvian version of php, and my will to have
> the patch upstreamed.
preg_match has been available since PHP 3.0, relased 1998.
cheers,
Thijs
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#580383; Package php-xml-parser.
(Wed, 01 Sep 2010 15:09:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Thomas Goirand <thomas@goirand.fr>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Wed, 01 Sep 2010 15:09:03 GMT) (full text, mbox, link).
Message #49 received at 580383@bugs.debian.org (full text, mbox, reply):
Thijs Kinkhorst wrote:
> On Tue, August 31, 2010 23:28, Thomas Goirand wrote:
>> Because of upstream insisting to support
>> ante-diluvian version of php, and my will to have
>> the patch upstreamed.
>
> preg_match has been available since PHP 3.0, relased 1998.
>
>
> cheers,
> Thijs
Thanks for letting me know. I'll write a new patch then.
Thomas
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#580383; Package php-xml-parser.
(Fri, 03 Sep 2010 09:30:11 GMT) (full text, mbox, link).
Acknowledgement sent
to Thomas Goirand <thomas@goirand.fr>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Fri, 03 Sep 2010 09:30:11 GMT) (full text, mbox, link).
Message #54 received at 580383@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Thijs Kinkhorst wrote:
> On Tue, August 31, 2010 23:28, Thomas Goirand wrote:
>> Because of upstream insisting to support
>> ante-diluvian version of php, and my will to have
>> the patch upstreamed.
>
> preg_match has been available since PHP 3.0, relased 1998.
>
>
> cheers,
> Thijs
Hi,
I made a much much smaller patch for the package. Could you please have
a look at the interdiff, and let me know what you think before I upload?
Also, should I put myself in the Uploaders: list rather than doing it as
an NMU? Let me know.
Thomas Goirand
P.S: I've submit 2 other bugs for php-xml-serializer and libnusoap-php
that suffer from the same kind of issue (return of a new by reference).
These will have to be fixed as well. I'll *try* to find time to work on
them too.
[php-xml-parser_1.3.2-1_to_1.3.2-1.1.interdiff (text/plain, inline)]
diff -u php-xml-parser-1.3.2/debian/rules php-xml-parser-1.3.2/debian/rules
--- php-xml-parser-1.3.2/debian/rules
+++ php-xml-parser-1.3.2/debian/rules
@@ -1,5 +1,7 @@
#!/usr/bin/make -f
+include /usr/share/dpatch/dpatch.make
+
DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-)
DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
@@ -17,9 +19,10 @@
build-stamp: configure-stamp
dh_testdir
+ dpatch apply-all
touch build-stamp
-clean:
+clean: unpatch
dh_testdir
dh_testroot
if [ -f $(pear_pkg)/package.xml ]; then \
diff -u php-xml-parser-1.3.2/debian/control php-xml-parser-1.3.2/debian/control
--- php-xml-parser-1.3.2/debian/control
+++ php-xml-parser-1.3.2/debian/control
@@ -3,8 +3,8 @@
Priority: optional
Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Uploaders: Thijs Kinkhorst <thijs@debian.org>
-Build-Depends: debhelper (>= 7)
-Standards-Version: 3.8.4
+Build-Depends: debhelper (>= 7), dpatch
+Standards-Version: 3.9.1
Build-Depends-Indep: php-pear
Vcs-Svn: svn://svn.debian.org/pkg-php/pear/php-xml-parser/trunk
Vcs-Browser: http://svn.debian.org/wsvn/pkg-php/pear/php-xml-parser/trunk
diff -u php-xml-parser-1.3.2/debian/changelog php-xml-parser-1.3.2/debian/changelog
--- php-xml-parser-1.3.2/debian/changelog
+++ php-xml-parser-1.3.2/debian/changelog
@@ -1,3 +1,13 @@
+php-xml-parser (1.3.2-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Fixes PHP 5.3.x warning due to ereg() and return of a reference, which are
+ now deprecated (Closes: #580383).
+ * Bumps Standard-Version to 3.9.1.
+ * Added debian/source/format and debian/README.source
+
+ -- Thomas Goirand <zigo@debian.org> Wed, 01 Sep 2010 02:02:16 +0800
+
php-xml-parser (1.3.2-1) unstable; urgency=low
* New upstream release.
only in patch2:
unchanged:
--- php-xml-parser-1.3.2.orig/debian/README.source
+++ php-xml-parser-1.3.2/debian/README.source
@@ -0,0 +1,14 @@
+This package uses dpatch to maintain a Debian correction, so
+that XML_Parser can run in PHP 5.3.x without producing warnings.
+
+To apply all patches that have been added in Debian, just do:
+
+dpatch apply-all
+
+To remove these patches, do:
+
+dpatch deapply-all
+
+Enjoy!
+
+Thomas Goirand (zigo@debian.org)
only in patch2:
unchanged:
--- php-xml-parser-1.3.2.orig/debian/source/format
+++ php-xml-parser-1.3.2/debian/source/format
@@ -0,0 +1 @@
+1.0
only in patch2:
unchanged:
--- php-xml-parser-1.3.2.orig/debian/patches/001parser.php_compat_php_5.3.x.dpatch
+++ php-xml-parser-1.3.2/debian/patches/001parser.php_compat_php_5.3.x.dpatch
@@ -0,0 +1,39 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 001parser.php_compat_php_5.3.x.dpatch by Thomas Goirand <zigo@debian.org>
+##
+## DP: This patch makes php-xml-parser work with PHP 5.3.x that is
+## DP: currently the new version in Debian. It removes a return by
+## DP: reference, and replaces ereg() calls by preg, as both are
+## DP: deprecated in php 5.3.x, which makes PHP produces some nasty
+## DP: warnings that could be annoying when outputing XML documents.
+
+@DPATCH@
+--- php-xml-parser-1.3.2.orig/XML_Parser-1.3.2/Parser.php 2010-09-01 18:49:24.000000000 +0800
++++ php-xml-parser-1.3.2/XML_Parser-1.3.2/Parser.php 2010-09-03 17:04:52.000000000 +0800
+@@ -417,7 +417,7 @@
+ /**
+ * check, if file is a remote file
+ */
+- if (eregi('^(http|ftp)://', substr($file, 0, 10))) {
++ if (preg_match('/^(http|ftp):\/\//i', substr($file, 0, 10))) {
+ if (!ini_get('allow_url_fopen')) {
+ return $this->
+ raiseError('Remote files cannot be parsed, as safe mode is enabled.',
+@@ -474,7 +474,7 @@
+ if (is_resource($fp)) {
+ $this->fp = $fp;
+ return true;
+- } elseif (eregi('^[a-z]+://', substr($fp, 0, 10))) {
++ } elseif (preg_match('/^[a-z]+:\/\//i', substr($fp, 0, 10))) {
+ // see if it's an absolute URL (has a scheme at the beginning)
+ return $this->setInputFile($fp);
+ } elseif (file_exists($fp)) {
+@@ -613,7 +613,7 @@
+ function &raiseError($msg = null, $ecode = 0)
+ {
+ $msg = !is_null($msg) ? $msg : $this->parser;
+- $err = &new XML_Parser_Error($msg, $ecode);
++ $err = new XML_Parser_Error($msg, $ecode);
+ return parent::raiseError($err);
+ }
+
only in patch2:
unchanged:
--- php-xml-parser-1.3.2.orig/debian/patches/00list
+++ php-xml-parser-1.3.2/debian/patches/00list
@@ -0,0 +1 @@
+001parser.php_compat_php_5.3.x.dpatch
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#580383; Package php-xml-parser.
(Fri, 03 Sep 2010 09:45:03 GMT) (full text, mbox, link).
Acknowledgement sent
to "Thijs Kinkhorst" <thijs@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Fri, 03 Sep 2010 09:45:03 GMT) (full text, mbox, link).
Message #59 received at 580383@bugs.debian.org (full text, mbox, reply):
On Fri, September 3, 2010 11:28, Thomas Goirand wrote:
> I made a much much smaller patch for the package. Could you please have
> a look at the interdiff, and let me know what you think before I upload?
> Also, should I put myself in the Uploaders: list rather than doing it as
> an NMU? Let me know.
Diff looks fine. If you want to become responsible for the package please
add yourself as an Uploader.
> P.S: I've submit 2 other bugs for php-xml-serializer and libnusoap-php
> that suffer from the same kind of issue (return of a new by reference).
> These will have to be fixed as well. I'll *try* to find time to work on
> them too.
I still think it's debatable whether they're actually RC, but fixing is
obviously the best way out so I'll leave you to that for now.
Cheers,
Thijs
Reply sent
to Thomas Goirand <zigo@debian.org>:
You have taken responsibility.
(Sun, 05 Sep 2010 06:21:03 GMT) (full text, mbox, link).
Notification sent
to Thomas Goirand <thomas@goirand.fr>:
Bug acknowledged by developer.
(Sun, 05 Sep 2010 06:21:03 GMT) (full text, mbox, link).
Message #64 received at 580383-close@bugs.debian.org (full text, mbox, reply):
Source: php-xml-parser
Source-Version: 1.3.2-2
We believe that the bug you reported is fixed in the latest version of
php-xml-parser, which is due to be installed in the Debian FTP archive:
php-xml-parser_1.3.2-2.diff.gz
to main/p/php-xml-parser/php-xml-parser_1.3.2-2.diff.gz
php-xml-parser_1.3.2-2.dsc
to main/p/php-xml-parser/php-xml-parser_1.3.2-2.dsc
php-xml-parser_1.3.2-2_all.deb
to main/p/php-xml-parser/php-xml-parser_1.3.2-2_all.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 580383@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Thomas Goirand <zigo@debian.org> (supplier of updated php-xml-parser package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Wed, 01 Sep 2010 02:02:16 +0800
Source: php-xml-parser
Binary: php-xml-parser
Architecture: source all
Version: 1.3.2-2
Distribution: unstable
Urgency: low
Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Changed-By: Thomas Goirand <zigo@debian.org>
Description:
php-xml-parser - PHP PEAR module for parsing XML
Closes: 580383
Changes:
php-xml-parser (1.3.2-2) unstable; urgency=low
.
* Added myself as uploader.
* Fixes PHP 5.3.x warning due to ereg() and return of a reference, which are
now deprecated (Closes: #580383).
* Bumps Standard-Version to 3.9.1.
* Added debian/source/format and debian/README.source
Checksums-Sha1:
d857c212a109f9e215475d0bb19a910ab30f49ae 1329 php-xml-parser_1.3.2-2.dsc
8cf99c82760f95c28597840825581dfa0ce0dc5d 4067 php-xml-parser_1.3.2-2.diff.gz
4749fc28332f32dbdf21a985441e233902c54906 17806 php-xml-parser_1.3.2-2_all.deb
Checksums-Sha256:
9eef655f6b8955cd86ba199afdbff675a713e3b6e03a80c0d920dc115b709053 1329 php-xml-parser_1.3.2-2.dsc
d16313872e55ed05b35c5b9cc78ae3e761691ec93131220704fa627f1e0e6447 4067 php-xml-parser_1.3.2-2.diff.gz
0ca31d9b43e30a0b2f7c1ef6bd2e49c980e2ec514fafd6ac8a80fb6981af77fc 17806 php-xml-parser_1.3.2-2_all.deb
Files:
a08b7774f98cca6e0633df83fcccd593 1329 php optional php-xml-parser_1.3.2-2.dsc
f5cfd142e9d34436bf4e8e7f2cdef455 4067 php optional php-xml-parser_1.3.2-2.diff.gz
b1979583c86bac844c7de6ade894d650 17806 php optional php-xml-parser_1.3.2-2_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAkyDMmMACgkQl4M9yZjvmkkpdgCglY+BJKofq/nMi+GOr17UdSe7
lxUAnjHgFjz0U5IxCsBxzSsGRNoGKwHJ
=tMaV
-----END PGP SIGNATURE-----
Bug No longer marked as fixed in versions php-xml-parser/1.3.2-2 and reopened.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Thu, 09 Sep 2010 17:18:04 GMT) (full text, mbox, link).
Bug Marked as found in versions php-xml-parser/1.3.2-1.
Request was from Thomas Goirand <thomas@goirand.fr>
to control@bugs.debian.org.
(Thu, 09 Sep 2010 17:18:05 GMT) (full text, mbox, link).
Bug Marked as fixed in versions php-xml-parser/1.3.2-3.
Request was from Thomas Goirand <thomas@goirand.fr>
to control@bugs.debian.org.
(Thu, 09 Sep 2010 17:18:05 GMT) (full text, mbox, link).
Reply sent
to Thomas Goirand <thomas@goirand.fr>:
You have taken responsibility.
(Fri, 22 Oct 2010 17:15:03 GMT) (full text, mbox, link).
Notification sent
to Thomas Goirand <thomas@goirand.fr>:
Bug acknowledged by developer.
(Fri, 22 Oct 2010 17:15:04 GMT) (full text, mbox, link).
Message #75 received at 580383-done@bugs.debian.org (full text, mbox, reply):
This one has been fixed a long time ago. Sorry that I didn't look close
enough to the bug tracker.
Thomas
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Sat, 20 Nov 2010 07:33:54 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sun Jul 2 00:20:13 2023;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.