Debian Bug report logs -
#670242
php-db: Warnings about static calls to non-static methods from common.php
Reported by: TreeBoy <debbugs@petethetree.co.uk>
Date: Tue, 24 Apr 2012 11:15:01 UTC
Severity: minor
Found in version php-db/1.7.13-2
Fixed in version php-db/1.7.14-1
Done: Thomas Goirand <zigo@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, debbugs@petethetree.co.uk, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#670242; Package php-db.
(Tue, 24 Apr 2012 11:15:04 GMT) (full text, mbox, link).
Acknowledgement sent
to TreeBoy <debbugs@petethetree.co.uk>:
New Bug report received and forwarded. Copy sent to debbugs@petethetree.co.uk, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Tue, 24 Apr 2012 11:15:13 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: php-db
Version: 1.7.13-2
Severity: minor
Dear Maintainer,
When running PHP in strict mode, I get lots of warnings from the parser telling me that there are non-static functions in DB.php that are being called statically from common.php.
Although the code appears to work, it makes catching problems in our apache logs very difficult.
These functions are isManip and isError.
I have altered the declaration of these two functions and I no longer get the warnings filling my apache error logs and my code still works as expected: would you be able make the same changes to the real code, please ?
My changes are:
592c592
< static function isError($value)
---
> function isError($value)
628c628
< static function isManip($query)
---
> function isManip($query)
Many thanks,
-- System Information:
Debian Release: wheezy/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages php-db depends on:
ii php-pear 5.4.1~rc1-1
php-db recommends no packages.
php-db suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#670242; Package php-db.
(Wed, 25 Apr 2012 03:00: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, 25 Apr 2012 03:00:03 GMT) (full text, mbox, link).
Message #10 received at 670242@bugs.debian.org (full text, mbox, reply):
On 04/24/2012 07:13 PM, TreeBoy wrote:
> My changes are:
>
> 592c592
> < static function isError($value)
> ---
>> function isError($value)
> 628c628
> < static function isManip($query)
> ---
>> function isManip($query)
Hi,
I did some greps in the code, and didn't see any function declared as
static at all. Are you sure that this is coming from this package?
Cheers,
Thomas
Information forwarded
to debian-bugs-dist@lists.debian.org, debbugs@petethetree.co.uk, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#670242; Package php-db.
(Wed, 25 Apr 2012 09:09:09 GMT) (full text, mbox, link).
Acknowledgement sent
to TreeBoy <debbugs@petethetree.co.uk>:
Extra info received and forwarded to list. Copy sent to debbugs@petethetree.co.uk, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Wed, 25 Apr 2012 09:09:13 GMT) (full text, mbox, link).
Message #15 received at 670242@bugs.debian.org (full text, mbox, reply):
Package: php-db
Version: 1.7.13-2
Followup-For: Bug #670242
Dear Maintainer,
I'm sorry, I did the diff after I had made the changes: I added the static in order to remove the problems about calls to DB::isManip() and DB::isError().
So the diff is of the altered file.
(As an aside, I should have said that my error_reporting is as follows:
error_reporting = E_ALL
)
Regards,
Peter
-- System Information:
Debian Release: wheezy/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages php-db depends on:
ii php-pear 5.4.1~rc1-1
php-db recommends no packages.
php-db suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#670242; Package php-db.
(Thu, 26 Apr 2012 08:39:26 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>.
(Thu, 26 Apr 2012 08:39:27 GMT) (full text, mbox, link).
Message #20 received at 670242@bugs.debian.org (full text, mbox, reply):
On 04/25/2012 05:08 PM, TreeBoy wrote:
> Package: php-db
> Version: 1.7.13-2
> Followup-For: Bug #670242
>
> Dear Maintainer,
>
> I'm sorry, I did the diff after I had made the changes: I added the static in order to remove the problems about calls to DB::isManip() and DB::isError().
>
> So the diff is of the altered file.
>
>
> (As an aside, I should have said that my error_reporting is as follows:
>
> error_reporting = E_ALL
> )
>
> Regards,
> Peter
FYI, I prepared an update for php-db. It currently sits in the Git in
Alioth:
Vcs-Browser: http://git.debian.org/?p=pkg-php/php-db.git
Vcs-Git: http://git.debian.org/git/pkg-php/php-db.git
It'd be great if you could test it with your application, and confirm
that the new package is working correctly before I upload. Note that
this includes the "static" declaration of isError and isManip as you
told us.
Cheers,
Thomas
Information forwarded
to debian-bugs-dist@lists.debian.org, debbugs@petethetree.co.uk, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#670242; Package php-db.
(Thu, 26 Apr 2012 13:45:03 GMT) (full text, mbox, link).
Acknowledgement sent
to TreeBoy <debbugs@petethetree.co.uk>:
Extra info received and forwarded to list. Copy sent to debbugs@petethetree.co.uk, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Thu, 26 Apr 2012 13:45:04 GMT) (full text, mbox, link).
Message #25 received at 670242@bugs.debian.org (full text, mbox, reply):
Package: php-db
Version: 1.7.13-2
Followup-For: Bug #670242
Dear Maintainer,
I'm afraid that I do not know how to carry out this test.
I have the repo cloed down to my machine, but I do not know how to build the package: can you tell me where I can find instructions, please ?
Sorry for my ignorance.
-- System Information:
Debian Release: wheezy/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages php-db depends on:
ii php-pear 5.4.1~rc1-1
php-db recommends no packages.
php-db suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, debbugs@petethetree.co.uk, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#670242; Package php-db.
(Thu, 26 Apr 2012 14:30:03 GMT) (full text, mbox, link).
Acknowledgement sent
to TreeBoy <debbugs@petethetree.co.uk>:
Extra info received and forwarded to list. Copy sent to debbugs@petethetree.co.uk, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(Thu, 26 Apr 2012 14:30:03 GMT) (full text, mbox, link).
Message #30 received at 670242@bugs.debian.org (full text, mbox, reply):
Package: php-db
Followup-For: Bug #670242
Dear Thomas,
I'm glad to be able to say that I have built the package by downloading DB-1.7.14.tgz, renaming it tp php-db-1.7.14.tar.gz and then running:
dpkg-buildpackage -us -uc
This produced the following output which I hope is correct:
$ dpkg-buildpackage -us -uc
dpkg-buildpackage: source package php-db
dpkg-buildpackage: source version 1.7.14-1
dpkg-buildpackage: source changed by Thomas Goirand <zigo@debian.org>
dpkg-buildpackage: host architecture amd64
dpkg-source --before-build php-db
dpkg-source: info: patches are not applied, applying them now
dpkg-source: info: applying static-function-for-isError-and-isManip
fakeroot debian/rules clean
dh clean --buildsystem=phppear --with phppear
dh_testdir -O--buildsystem=phppear
dh_auto_clean -O--buildsystem=phppear
dh_clean -O--buildsystem=phppear
dpkg-source -b php-db
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building php-db using existing ./php-db_1.7.14.orig.tar.gz
dpkg-source: info: building php-db in php-db_1.7.14-1.debian.tar.gz
dpkg-source: info: building php-db in php-db_1.7.14-1.dsc
debian/rules build
dh build --buildsystem=phppear --with phppear
dh_testdir -O--buildsystem=phppear
dh_auto_configure -O--buildsystem=phppear
dh_auto_build -O--buildsystem=phppear
dh_auto_test -O--buildsystem=phppear
fakeroot debian/rules binary
dh binary --buildsystem=phppear --with phppear
dh_testroot -O--buildsystem=phppear
dh_prep -O--buildsystem=phppear
dh_installdirs -O--buildsystem=phppear
dh_auto_install -O--buildsystem=phppear
warning: pear/DB requires package "pear/PEAR" (version >= 1.0b1)
install ok: channel://pear.php.net/DB-1.7.14
PHP Notice: Undefined index: changelog in /usr/share/pkg-php-tools/scripts/phppkginfo on line 244
PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/share/pkg-php-tools/scripts/phppkginfo on line 245
PHP Warning: array_reverse() expects parameter 1 to be array, null given in /usr/share/pkg-php-tools/scripts/phppkginfo on line 248
PHP Warning: Invalid argument supplied for foreach() in /usr/share/pkg-php-tools/scripts/phppkginfo on line 249
dh_install -O--buildsystem=phppear
dh_installdocs -O--buildsystem=phppear
dh_installchangelogs -O--buildsystem=phppear
dh_installexamples -O--buildsystem=phppear
dh_installman -O--buildsystem=phppear
dh_installcatalogs -O--buildsystem=phppear
dh_installcron -O--buildsystem=phppear
dh_installdebconf -O--buildsystem=phppear
dh_installemacsen -O--buildsystem=phppear
dh_installifupdown -O--buildsystem=phppear
dh_installinfo -O--buildsystem=phppear
dh_pysupport -O--buildsystem=phppear
dh_pysupport: This program is deprecated, you should use dh_python2 instead. Migration guide: http://deb.li/dhs2p
dh_installinit -O--buildsystem=phppear
dh_installmenu -O--buildsystem=phppear
dh_installmime -O--buildsystem=phppear
dh_installmodules -O--buildsystem=phppear
dh_installlogcheck -O--buildsystem=phppear
dh_installlogrotate -O--buildsystem=phppear
dh_installpam -O--buildsystem=phppear
dh_installppp -O--buildsystem=phppear
dh_installudev -O--buildsystem=phppear
dh_installwm -O--buildsystem=phppear
dh_installxfonts -O--buildsystem=phppear
dh_installgsettings -O--buildsystem=phppear
dh_bugfiles -O--buildsystem=phppear
dh_ucf -O--buildsystem=phppear
dh_lintian -O--buildsystem=phppear
dh_gconf -O--buildsystem=phppear
dh_icons -O--buildsystem=phppear
dh_perl -O--buildsystem=phppear
dh_usrlocal -O--buildsystem=phppear
dh_phppear -O--buildsystem=phppear
dh_link -O--buildsystem=phppear
dh_compress -O--buildsystem=phppear
dh_fixperms -O--buildsystem=phppear
dh_installdeb -O--buildsystem=phppear
dh_gencontrol -O--buildsystem=phppear
dpkg-gencontrol: warning: package php-db: unused substitution variable ${phppear:Debian-Depends}
dpkg-gencontrol: warning: package php-db: unused substitution variable ${phppear:summary}
dpkg-gencontrol: warning: package php-db: unused substitution variable ${phppear:description}
dpkg-gencontrol: warning: package php-db: unused substitution variable ${phppear:channel}
dh_md5sums -O--buildsystem=phppear
dh_builddeb -O--buildsystem=phppear
dpkg-deb: building package `php-db' in `../php-db_1.7.14-1_all.deb'.
dpkg-genchanges >../php-db_1.7.14-1_amd64.changes
dpkg-genchanges: including full source code in upload
dpkg-source --after-build php-db
dpkg-source: info: unapplying static-function-for-isError-and-isManip
dpkg-buildpackage: full upload (original source is included)
I then installed the package which has now removed the problem.
Bear in mind that my script is not too advanced at the moment: it merely does a username and sha1 lookup and then a list of a single table, without using prepared statements or anything, so I cannot call this a complete coverage test, but it has removed the problem I originally reported.
Many thanks for your help.
Peter
-- System Information:
Debian Release: wheezy/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages php-db depends on:
ii php-pear 5.4.1~rc1-1
php-db recommends no packages.
php-db suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#670242; Package php-db.
(Thu, 26 Apr 2012 16:00:08 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>.
(Thu, 26 Apr 2012 16:00:13 GMT) (full text, mbox, link).
Message #35 received at 670242@bugs.debian.org (full text, mbox, reply):
On 04/26/2012 10:26 PM, TreeBoy wrote:
> Package: php-db
> Followup-For: Bug #670242
>
> Dear Thomas,
>
> I'm glad to be able to say that I have built the package by downloading DB-1.7.14.tgz, renaming it tp php-db-1.7.14.tar.gz and then running:
> dpkg-buildpackage -us -uc
>
> This produced the following output which I hope is correct:
> $ dpkg-buildpackage -us -uc
> [...]
Well, you'd normally run git-buildpackage, but what you did is
a valid way to build as well, even though it may leave dirt in
your local Git repository (which you may don't care about
anyway).
> I then installed the package which has now removed the problem.
Cool. I'll wait for Ondrej and Thijs agreement about uploading,
since I was not the origin maintainer (just out of respect for
their past work), then I'll upload the fixed package.
> Bear in mind that my script is not too advanced at the moment:
> it merely does a username and sha1 lookup and then a list of
> a single table, without using prepared statements or anything,
> so I cannot call this a complete coverage test, but it has
> removed the problem I originally reported.
Well, it's still better than me doing zero functional testing
of the package, and your tests are helping and saving my time,
so thanks for doing it. Please note that building the package
in Squeeze will *fail*, as the version of PEAR isn't high
enough to handle the package.xml correctly. So a version
depends will be needed, which I will add before uploading.
Cheers,
Thomas
Reply sent
to Thomas Goirand <zigo@debian.org>:
You have taken responsibility.
(Thu, 26 Apr 2012 17:00:39 GMT) (full text, mbox, link).
Notification sent
to TreeBoy <debbugs@petethetree.co.uk>:
Bug acknowledged by developer.
(Thu, 26 Apr 2012 17:00:39 GMT) (full text, mbox, link).
Message #40 received at 670242-close@bugs.debian.org (full text, mbox, reply):
Source: php-db
Source-Version: 1.7.14-1
We believe that the bug you reported is fixed in the latest version of
php-db, which is due to be installed in the Debian FTP archive:
php-db_1.7.14-1.debian.tar.gz
to main/p/php-db/php-db_1.7.14-1.debian.tar.gz
php-db_1.7.14-1.dsc
to main/p/php-db/php-db_1.7.14-1.dsc
php-db_1.7.14-1_all.deb
to main/p/php-db/php-db_1.7.14-1_all.deb
php-db_1.7.14.orig.tar.gz
to main/p/php-db/php-db_1.7.14.orig.tar.gz
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 670242@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-db 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: RIPEMD160
Format: 1.8
Date: Wed, 25 Apr 2012 19:28:39 +0800
Source: php-db
Binary: php-db
Architecture: source all
Version: 1.7.14-1
Distribution: unstable
Urgency: low
Maintainer: PKG-PHP-PEAR team <pkg-php-pear@lists.alioth.debian.org>
Changed-By: Thomas Goirand <zigo@debian.org>
Description:
php-db - PHP PEAR Database Abstraction Layer
Closes: 515327 656974 670242
Changes:
php-db (1.7.14-1) unstable; urgency=low
.
* New upstream release 1.7.14
.
[ Thomas Goirand ]
* Switched the package to Git instead of SVN (changed Vcs fields).
* Replaced debian/svn-deblayout by a debian/gbp.conf.
* Switching to pkg-php-tools (rewrote debian/rules) (Closes: #515327).
* Added myself as uploader.
* Switching to format 3.0 (quilt).
* Increased compat level to 8.
* Removed now useless debian/dirs.
* Removed now useless debian/docs.
* Switched debian/copyright to format 1.0.
* Fixed debian/watch file.
* Adds a patch to declare isError and isManip as static (Closes: #670242).
* Using pkg-php-pear@lists.alioth.debian.org as maintainer (Closes: #656974).
* Removed now obsolete Replaces: php4-pear (<< 4:4.4.0-0) in debian/control.
* Added missing ${misc:Depends} dependency.
* Build-Depends on php-pear (>= 5.4). This probably is too high, but I do
want to express the fact that building in Squeeze wont work without at least
some work (a test showed it wouldn't).
* Bumps Standards-Version to 3.9.3 (no change but the above).
.
[ Thijs Kinkhorst ]
* Override false-positive spelling-error-in-description Lintian
warning (we mean the PHP module).
Checksums-Sha1:
1abfe12d040da56a0c01caabf12d2752d1727447 1321 php-db_1.7.14-1.dsc
b82a49cafcf1b87fd3075be5e1f2855c54447d1e 133103 php-db_1.7.14.orig.tar.gz
005c90512d517a424711c61da0f629978e799ad6 4805 php-db_1.7.14-1.debian.tar.gz
bcbbeb147c3432f4ca600f70513ce903e61ad46f 147200 php-db_1.7.14-1_all.deb
Checksums-Sha256:
d227e8e1ebd089b6267be47a91603da7e5464e8c5a8fe3cc1b4fe3ba60182a14 1321 php-db_1.7.14-1.dsc
a574483fd5c4440a4bf08018e8bcdde7f4619e9b964de2b357bd60733ec5919c 133103 php-db_1.7.14.orig.tar.gz
427fc2c187dd4b87e4aadcbbf4dc36baf280567116a33019c6cb7c849e3bd7e4 4805 php-db_1.7.14-1.debian.tar.gz
e950c2cb9bef1c00d50487943b33e1b1c724cdff75f4208c100a6109366db27b 147200 php-db_1.7.14-1_all.deb
Files:
5b933fe3521e53d672ebc70b7ef13d71 1321 php optional php-db_1.7.14-1.dsc
b38357ad173a43e3c34e1b5527571fec 133103 php optional php-db_1.7.14.orig.tar.gz
7a65b09cc26c5babb843810da845e4be 4805 php optional php-db_1.7.14-1.debian.tar.gz
0217791469217bb224e680696d117e35 147200 php optional php-db_1.7.14-1_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEAREDAAYFAk+ZevgACgkQl4M9yZjvmkks9ACfcQL08AkxpgGERe3QC9EhYtyw
YYcAoMc3lfipcvDLT9ipFP928LqGDbbb
=V0gD
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Tue, 05 Jun 2012 07:40:27 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 02:07:34 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.