Home » Web Services » Services_ExchangeRates » Bug #3110
Undefine variables
Details
| Submitted | 2005-01-05 16:06 UTC |
|---|---|
| From | ylf at xung dot org |
| Assigned | cross |
| Status | Closed |
| Package | Services_ExchangeRates |
| PHP Version | 4.3.4 |
| OS | Linux 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