Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Silence warnings #10

Open
jbrnd opened this issue May 9, 2014 · 1 comment
Open

Silence warnings #10

jbrnd opened this issue May 9, 2014 · 1 comment

Comments

@jbrnd
Copy link

jbrnd commented May 9, 2014

The following changes should be made to Auth/Yubico.php to silence some warnings PHP gives with strict error reporting:

$ch[$handle] = $handle;

on line 331 should be

$ch[(int)$handle] = $handle;

and on line 431:

if ($replay) return PEAR::raiseError('REPLAYED_OTP');

should be

if ($replay) return (new PEAR)->raiseError('REPLAYED_OTP');

And finally, line 433:

return (PEAR::raiseError($status);

should be

return ((new PEAR)->raiseError($status);

@jbrnd
Copy link
Author

jbrnd commented May 9, 2014

Specifically, the warnings are of the type

PHP Strict Standards: Resource ID#12 used as offset, casting to integer (12) in /usr/share/php/Auth/Yubico.php on line 331
PHP Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Auth/Yubico.php on line 431

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant