PEAR is archived and read-only

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

Home » Web Services » Services_ExchangeRates » Bug #3110

Undefine variables

Details

Submitted2005-01-05 16:06 UTC
Fromylf at xung dot org
Assignedcross
StatusClosed
PackageServices_ExchangeRates
PHP Version4.3.4
OSLinux Debian
Roadmaps(Not assigned)

Comments

[2005-01-05 16:06 UTC] ylf at xung dot org

Description:
------------
With error_reporting set to E_ALL, simply instantiating Services_ExchangeRates triggers "Undefined variables" notices which seem to be serious potential bugs.

This is true for both the 0.5.0 version and current CVS.

Here's a fix :

http://samalyse.com/code/pear/patches/Services_ExchangeRates-20050105-undefs.diff

Reproduce code:
---------------
<?php

echo "Undefined variables bugs : \n";

error_reporting (E_ALL);
require_once 'Services/ExchangeRates.php';
$conv = new Services_ExchangeRates();

?>

Expected result:
----------------
Undefined variables bugs :

Actual result:
--------------
Undefined variables bugs :
Notice: Undefined variable: cacheLength in /usr/share/php/Services/ExchangeRates.php on line 214

Notice: Undefined variable: rates in /usr/share/php/Services/ExchangeRates.php on line 184

Notice: Undefined variable: rates in /usr/share/php/Services/ExchangeRates.php on line 185

Notice: Undefined variable: cacheLength in /usr/share/php/Services/ExchangeRates.php on line 214

[2005-01-05 16:18 UTC] ylf at xung dot org

A shorter url for the fix :

http://samalyse.com/ln/0001.php