Home » Internationalization » I18Nv2 » Bug #2541
[PATCH] warning with E_ALL
Details
| Submitted | 2004-10-15 20:15 UTC |
|---|---|
| From | ieure at php dot net |
| Assigned | mike |
| Status | Closed |
| Package | I18Nv2 |
| PHP Version | 4.2.0 |
| OS | Linux |
| 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.