Debian Bug report logs -
#618680
php-image-barcode: Uses depreciated methods
Reported by: Tobias Frost <tobi@frost.de>
Date: Thu, 17 Mar 2011 15:18:02 UTC
Severity: minor
Found in version php-image-barcode/1.1.1-1
Fixed in version 1.1.1-3+rm
Done: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>:
Bug#618680; Package php-image-barcode.
(Thu, 17 Mar 2011 15:18:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Tobias Frost <tobi@frost.de>:
New Bug report received and forwarded. Copy sent to PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>.
(Thu, 17 Mar 2011 15:18:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: php-image-barcode
Version: 1.1.1-1
Severity: minor
My php script on my debuggin machine tells me:
Deprecated: Assigning the return value of new by reference is deprecated in /usr/share/php/Image/Barcode.php on line 80
and later
Notice: Only variable references should be returned by reference in /usr/share/php/Image/Barcode.php on line 112
I think generally not a big deal (therfore minor) but when using a high verbosity level on php, my browser tells me:
The image “http://localhost/barcode_img.php” cannot be displayed, because it contains errors.
NB: the barcode_img.php is the exact copy of the file in the examples...
--e System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.37-2-686 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages php-image-barcode depends on:
ii php-compat 1.6.0a2-1 Provides missing functionality for
ii php-pear 5.3.5-1 PEAR - PHP Extension and Applicati
ii php5-gd 5.3.5-1 GD module for php5
php-image-barcode recommends no packages.
php-image-barcode suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>:
Bug#618680; Package php-image-barcode.
(Thu, 17 Mar 2011 15:57:07 GMT) (full text, mbox, link).
Acknowledgement sent
to Thomas Goirand <thomas@goirand.fr>:
Extra info received and forwarded to list. Copy sent to PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>.
(Thu, 17 Mar 2011 15:57:07 GMT) (full text, mbox, link).
Message #10 received at 618680@bugs.debian.org (full text, mbox, reply):
On 03/17/2011 11:14 PM, Tobias Frost wrote:
> Package: php-image-barcode
> Version: 1.1.1-1
> Severity: minor
>
> My php script on my debuggin machine tells me:
>
> Deprecated: Assigning the return value of new by reference is deprecated in /usr/share/php/Image/Barcode.php on line 80
>
> and later
>
> Notice: Only variable references should be returned by reference in /usr/share/php/Image/Barcode.php on line 112
>
> I think generally not a big deal (therfore minor) but when using a high verbosity level on php, my browser tells me:
> The image “http://localhost/barcode_img.php” cannot be displayed, because it contains errors.
>
> NB: the barcode_img.php is the exact copy of the file in the examples...
Hi,
Thanks for this report. FYI, I did at least 5 corrections to existing
PEAR packages before the release of Squeeze for that exact issue. The
patch should be fairly simple, and I will work on a new package for SID,
in order to fix the issue.
IMHO, this issue deserves a severity higher than just "minor" though, as
this is a "deprecated" issue that PHP is complaining about. Under
certain circumstances (eg: with verbosity set to high, which often many
people do in order to solve issues), the fact that the script does some
error message can destroy your image output headers, which can be very
annoying.
As I've been updating all of my packages one by one, this one will go on
top of the todo.
Thanks again for your bug report,
Thomas Goirand (zigo)
Information forwarded
to debian-bugs-dist@lists.debian.org, PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>:
Bug#618680; Package php-image-barcode.
(Thu, 17 Mar 2011 18:15:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Tobias Frost <tobi@frost.de>:
Extra info received and forwarded to list. Copy sent to PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>.
(Thu, 17 Mar 2011 18:15:03 GMT) (full text, mbox, link).
Message #15 received at 618680@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hallo Thomas,
here's some additional info which might save you some work
(but I suppose you already know it)
Upstream has already some suggestions in their bug tracking system which
solves the issues.
I saw this after posting the bug report:
http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Image_Barcode
namely 10594, 17531
Note: Also bug 17353 is annoying -- if you use Code 39 barcodes.)
The fix also works.
I attach a diff against the debian version. (If you have use for it)
coldtobi
Am Donnerstag, den 17.03.2011, 23:54 +0800 schrieb Thomas Goirand:
> On 03/17/2011 11:14 PM, Tobias Frost wrote:
> > Package: php-image-barcode
> > Version: 1.1.1-1
> > Severity: minor
> >
> > My php script on my debuggin machine tells me:
> >
> > Deprecated: Assigning the return value of new by reference is deprecated in /usr/share/php/Image/Barcode.php on line 80
> >
> > and later
> >
> > Notice: Only variable references should be returned by reference in /usr/share/php/Image/Barcode.php on line 112
> >
> > I think generally not a big deal (therfore minor) but when using a high verbosity level on php, my browser tells me:
> > The image “http://localhost/barcode_img.php” cannot be displayed, because it contains errors.
> >
> > NB: the barcode_img.php is the exact copy of the file in the examples...
>
> Hi,
>
> Thanks for this report. FYI, I did at least 5 corrections to existing
> PEAR packages before the release of Squeeze for that exact issue. The
> patch should be fairly simple, and I will work on a new package for SID,
> in order to fix the issue.
>
> IMHO, this issue deserves a severity higher than just "minor" though, as
> this is a "deprecated" issue that PHP is complaining about. Under
> certain circumstances (eg: with verbosity set to high, which often many
> people do in order to solve issues), the fact that the script does some
> error message can destroy your image output headers, which can be very
> annoying.
>
> As I've been updating all of my packages one by one, this one will go on
> top of the todo.
>
> Thanks again for your bug report,
>
> Thomas Goirand (zigo)
[618680.patch (text/x-patch, attachment)]
[618680_2.patch (text/x-patch, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org, PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>:
Bug#618680; Package php-image-barcode.
(Fri, 18 Mar 2011 05:57:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Thomas Goirand <thomas@goirand.fr>:
Extra info received and forwarded to list. Copy sent to PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>.
(Fri, 18 Mar 2011 05:57:03 GMT) (full text, mbox, link).
Message #20 received at 618680@bugs.debian.org (full text, mbox, reply):
On 03/18/2011 02:03 AM, Tobias Frost wrote:
> Hallo Thomas,
>
> here's some additional info which might save you some work
> (but I suppose you already know it)
>
> Upstream has already some suggestions in their bug tracking system which
> solves the issues.
>
> I saw this after posting the bug report:
> http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Image_Barcode
> namely 10594, 17531
>
> Note: Also bug 17353 is annoying -- if you use Code 39 barcodes.)
> The fix also works.
>
> I attach a diff against the debian version. (If you have use for it)
>
> coldtobi
Hi,
I have pushed the fixes in the Git repository of the package (branches
debian-sid and upstream-sid). Can you please test the result, and
confirm that my work fixes the issues? Here's how to build:
git clone http://git.debian.org/git/pkg-php/php-image-barcode.git
cd php-image-barcode
git checkout -b upstream-sid origin/upstream-sid
git checkout debian-sid
git-buildpackage --git-upstream-branch=upstream-sid \
--git-debian-branch=debian-sid
When I have your confirmation that it fixes your issues, I'll upload to
SID with this change.
Thomas
Information forwarded
to debian-bugs-dist@lists.debian.org, PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>:
Bug#618680; Package php-image-barcode.
(Sat, 19 Mar 2011 09:30:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Tobias Frost <tobi@frost.de>:
Extra info received and forwarded to list. Copy sent to PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>.
(Sat, 19 Mar 2011 09:30:03 GMT) (full text, mbox, link).
Message #25 received at 618680@bugs.debian.org (full text, mbox, reply):
Yes, it works.
Thank you!
Am Freitag, den 18.03.2011, 13:54 +0800 schrieb Thomas Goirand:
> On 03/18/2011 02:03 AM, Tobias Frost wrote:
> > Hallo Thomas,
> >
> > here's some additional info which might save you some work
> > (but I suppose you already know it)
> >
> > Upstream has already some suggestions in their bug tracking system which
> > solves the issues.
> >
> > I saw this after posting the bug report:
> > http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Image_Barcode
> > namely 10594, 17531
> >
> > Note: Also bug 17353 is annoying -- if you use Code 39 barcodes.)
> > The fix also works.
> >
> > I attach a diff against the debian version. (If you have use for it)
> >
> > coldtobi
>
> Hi,
>
> I have pushed the fixes in the Git repository of the package (branches
> debian-sid and upstream-sid). Can you please test the result, and
> confirm that my work fixes the issues? Here's how to build:
>
> git clone http://git.debian.org/git/pkg-php/php-image-barcode.git
> cd php-image-barcode
> git checkout -b upstream-sid origin/upstream-sid
> git checkout debian-sid
> git-buildpackage --git-upstream-branch=upstream-sid \
> --git-debian-branch=debian-sid
>
> When I have your confirmation that it fixes your issues, I'll upload to
> SID with this change.
>
> Thomas
Information forwarded
to debian-bugs-dist@lists.debian.org, PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>:
Bug#618680; Package php-image-barcode.
(Sat, 19 Mar 2011 11:15:10 GMT) (full text, mbox, link).
Acknowledgement sent
to Thomas Goirand <thomas@goirand.fr>:
Extra info received and forwarded to list. Copy sent to PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>.
(Sat, 19 Mar 2011 11:15:10 GMT) (full text, mbox, link).
Message #30 received at 618680@bugs.debian.org (full text, mbox, reply):
On 03/19/2011 05:26 PM, Tobias Frost wrote:
> Yes, it works.
>
> Thank you!
Thanks for testing, I've just uploaded the resulting package to SID.
Thomas
Information forwarded
to debian-bugs-dist@lists.debian.org, PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>:
Bug#618680; Package php-image-barcode.
(Mon, 18 Jul 2011 10:51:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Martin Schulze <joey@infodrom.org>:
Extra info received and forwarded to list. Copy sent to PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>.
(Mon, 18 Jul 2011 10:51:36 GMT) (full text, mbox, link).
Message #35 received at 618680@bugs.debian.org (full text, mbox, reply):
Hi!
Tobias Frost wrote:
> --- alt/Barcode.php 2011-03-17 18:54:24.000000000 +0100
> +++ barcode/Barcode.php 2011-03-17 17:23:02.000000000 +0100
> @@ -77,7 +77,10 @@
> return PEAR::raiseError("Unable to find draw method in '$classname' class");
> }
>
> - @$obj =& new $classname();
> + @$obj = new $classname();
>
> $img = &$obj->draw($text, $imgtype);
>
> @@ -107,8 +110,9 @@
> break;
> }
> } else {
> - return $img;
> + $img = null;
> }
> + return $img;
> }
> }
> ?>
I wonder if you are aware that this patch effectively results in the
function returning NULL when $bSendToBrowser is set to false (e.g. if
the programmer would like to store the image into a file instead of
sending it to the browser directly).
Regards,
Joey
--
Unix is user friendly ... It's just picky about its friends.
Please always Cc to me when replying to me on the lists.
Information forwarded
to debian-bugs-dist@lists.debian.org, PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>:
Bug#618680; Package php-image-barcode.
(Tue, 19 Jul 2011 17:57:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Tobias Frost <tobi@frost.de>:
Extra info received and forwarded to list. Copy sent to PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>.
(Tue, 19 Jul 2011 17:57:03 GMT) (full text, mbox, link).
Message #40 received at 618680@bugs.debian.org (full text, mbox, reply):
Am Montag, den 18.07.2011, 12:14 +0200 schrieb Martin Schulze:
Well, I only use the return-to-webbrowser feature....
Looking back, I can only quote the one who wrote the patch:
See http://pear.php.net/bugs/bug.php?id=10594.
However, looking at the code I have to assume that you are right.
It should probably be...
> + return null;
> } else {
> + return $img;
> - $img = null;
> }
> + return $img;
Tobi
> Hi!
> I wonder if you are aware that this patch effectively results in the
> function returning NULL when $bSendToBrowser is set to false (e.g. if
> the programmer would like to store the image into a file instead of
> sending it to the browser directly).
>
> Regards,
>
> Joey
>
Information forwarded
to debian-bugs-dist@lists.debian.org, PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>:
Bug#618680; Package php-image-barcode.
(Tue, 19 Jul 2011 20:30:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Martin Schulze <joey@infodrom.org>:
Extra info received and forwarded to list. Copy sent to PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>.
(Tue, 19 Jul 2011 20:30:03 GMT) (full text, mbox, link).
Message #45 received at 618680@bugs.debian.org (full text, mbox, reply):
Hi!
Tobias Frost wrote:
> Am Montag, den 18.07.2011, 12:14 +0200 schrieb Martin Schulze:
>
> Well, I only use the return-to-webbrowser feature....
>
> Looking back, I can only quote the one who wrote the patch:
> See http://pear.php.net/bugs/bug.php?id=10594.
>
>
> However, looking at the code I have to assume that you are right.
> It should probably be...
>
> > + return null;
> > } else {
> > + return $img;
> > - $img = null;
> > }
> > + return $img;
That looks a lot better to me.
(the final return seems to be never reached btw.)
Regards,
Joey
--
Whenever you meet yourself you're in a time loop or in front of a mirror.
Please always Cc to me when replying to me on the lists.
Information forwarded
to debian-bugs-dist@lists.debian.org, PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>:
Bug#618680; Package php-image-barcode.
(Wed, 20 Jul 2011 05:30:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Tobias Frost <tobi@frost.de>:
Extra info received and forwarded to list. Copy sent to PKG-PHP team <pkg-php-maint@lists.alioth.debian.org>.
(Wed, 20 Jul 2011 05:30:03 GMT) (full text, mbox, link).
Message #50 received at 618680@bugs.debian.org (full text, mbox, reply):
Am Dienstag, den 19.07.2011, 22:21 +0200 schrieb Martin Schulze:
> That looks a lot better to me.
>
> (the final return seems to be never reached btw.)
No, this one is reached when $bSendToBrowser is true. It is needed, as
the function has to return a reference! (This is the bug reported in the
first place)
However, as $img is destroyed, it would indeed make more sense to return
null in this case, not $img.
BUT this will again emit the warning from php [see below], so I think
returning an invalid reference is in this case less evil.
Notice: Only variable references should be returned by reference
in /usr/share/php/Image/Barcode.php on line 115
> Regards,
>
> Joey
>
Reply sent
to Debian FTP Masters <ftpmaster@ftp-master.debian.org>:
You have taken responsibility.
(Tue, 31 Jan 2012 19:27:15 GMT) (full text, mbox, link).
Notification sent
to Tobias Frost <tobi@frost.de>:
Bug acknowledged by developer.
(Tue, 31 Jan 2012 19:27:15 GMT) (full text, mbox, link).
Message #55 received at 618680-done@bugs.debian.org (full text, mbox, reply):
Version: 1.1.1-3+rm
Dear submitter,
as the package php-image-barcode has just been removed from the Debian archive
unstable we hereby close the associated bug reports. We are sorry
that we couldn't deal with your issue properly.
For details on the removal, please see http://bugs.debian.org/657778
The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.
This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@debian.org.
Debian distribution maintenance software
pp.
Luca Falavigna (the ftpmaster behind the curtain)
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Wed, 29 Feb 2012 07:45:22 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 01:46:15 2023;
Machine Name:
buxtehude
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.