shupp / openid

OpenID library for PEAR
http://pear.php.net/OpenID
19 stars 9 forks source link

some strict mode warnings #1

Closed ftrotter closed 13 years ago

ftrotter commented 13 years ago

Strict standards: Non-static method Validate::uri() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Services/Yadis.php on line 290

Strict standards: Non-static method Validate::uri() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Services/Yadis/Xrds/Namespace.php on line 106

Strict standards: Non-static method Validate::uri() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Services/Yadis.php on line 568

Strict standards: Only variables should be passed by reference in /usr/share/pear/OpenID/RelyingParty.php on line 292

Strict standards: Only variables should be passed by reference in /usr/share/pear/OpenID/Assertion.php on line 204

Thanks for the wonderful and working library!!

-FT

ftrotter commented 13 years ago

note... cant seem to get the yadis errors back...

ftrotter commented 13 years ago

this is the issue in each case... http://stackoverflow.com/questions/2354609/strict-standards-only-variables-should-be-passed-by-reference

ftrotter commented 13 years ago

adding the static keyword to the uri function in Validate.php does seem to remove the error, and I can see no reason that the function should not be static...

-FT

cweiske commented 13 years ago

Validate is a PEAR package that exists since PHP4. To keep compatibility with PHP4, it has not been changed to use the static keyword.

shupp commented 13 years ago

I've got fixes for all of these in the forthcoming OpenID 0.3.1. Thanks for reporting.

shupp commented 13 years ago

OK, just uploaded OpenID 0.3.1, which requires the new Services_Yadis 0.5.1. Running phpunit with E_STRICT enabled does not show any more warnings.