PEAR is archived and read-only

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

Home » Validate » Validate_US » Bug #4914

reference to $this when object should be called in static context

Details

Submitted2005-07-26 05:38 UTC
Fromwebmaster at aaronparecki dot com
Assigneddavidc
StatusClosed
PackageValidate_US
PHP Version5.0.3
OSWindows 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