PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Internationalization » I18Nv2 » Bug #2541

[PATCH] warning with E_ALL

Details

Submitted2004-10-15 20:15 UTC
Fromieure at php dot net
Assignedmike
StatusClosed
PackageI18Nv2
PHP Version4.2.0
OSLinux
Roadmaps(Not assigned)

Comments

[2004-10-15 20:15 UTC] ieure at php dot net

Description:
------------
When using I18Nv2 on older (4.1.x) versions of PHP, a
warning is displayed:

'Undefined property: language
in /usr/local/var/www/dev/coldjet.com/pear/I18Nv2/Co
mmonList.php on line 94'

Early versions of PHP treat unset class variables as
nonexistent instead of empty.

This patch adds an isset() check before accessing the
property. An alternate fix is to explicitly set the
variable to '' when it's defined.
http://atomized.org/PEAR/Patches/I18Nv2-Language_Undefined.patch

I know that I should upgrade to a newer PHP version, but
that's not currently an option for me. Please consider
applying this patch.