Deprecated warnings in PHP 7
Closed this issue · 2 comments
johnbburg commented
I get these warnings, running in a local docker instance on php7.2 (yes, I know it's eol). On D7, using 1.7 release. SimpleSaml 1.18.8
Deprecated: assert(): Calling assert() with a string argument is deprecated in simplesamlphp/modules/drupalauth/lib/Auth/Source/External.php on line 144
Deprecated: assert(): Calling assert() with a string argument is deprecated in simplesamlphp/modules/drupalauth/lib/Auth/Source/External.php on line 145
Deprecated: assert(): Calling assert() with a string argument is deprecated in simplesamlphp/modules/drupalauth/lib/ConfigHelper.php on line 76
Deprecated: assert(): Calling assert() with a string argument is deprecated in simplesamlphp/modules/drupalauth/lib/ConfigHelper.php on line 77
The warnings correspond to these lines in External.php:
assert('is_array($info)');
assert('is_array($config)');
and these lines in ConfigHelper.php:
assert('is_array($config)');
assert('is_string($location)');
Per the php.net documentation on assertions:
Assertions should be used as a debugging feature only.
Perhaps the best course of action is to remove these lines entirely, or replace the parameters with the actual is_array(), and is_string() expressions?
RoSk0 commented
Closing outdated.