Skip to content
Snippets Groups Projects
Commit 5ff999d6 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Return false in case one of the values is null

parent 7afca082
Branches
No related tags found
No related merge requests found
......@@ -25,6 +25,10 @@ class StringUtils {
*/
public static function equals($expected, $input) {
if(!is_string($expected) || !is_string($input)) {
return false;
}
if(function_exists('hash_equals')) {
return hash_equals($expected, $input);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment