Home » Validate » Validate_US » Bug #4914
reference to $this when object should be called in static context
Details
| Submitted | 2005-07-26 05:38 UTC |
|---|---|
| From | webmaster at aaronparecki dot com |
| Assigned | davidc |
| Status | Closed |
| Package | Validate_US |
| PHP Version | 5.0.3 |
| OS | Windows XP |
| Roadmaps | (Not assigned) |
Comments
[2005-07-26 05:38 UTC] webmaster at aaronparecki dot com
Description:
------------
lines 198-200 of US.php:
...
$this->high_groups = $high_groups;
return $high_groups;
}
...
I think the line with $this is for caching the results from the ssa.gov website. But line 198 is the only line which ever references $this, so nothing is done with the information stored in $this->high_groups.
Test script:
---------------
echo Validate_US::ssn("999-99-9999");
Expected result:
----------------
false
Actual result:
--------------
Fatal error: Using $this when not in object context in c:\php\PEAR\Validate\US.php on line 198