Skip to content
Snippets Groups Projects
Commit cfd8b3f9 authored by Clark Tomlinson's avatar Clark Tomlinson
Browse files

Merge pull request #11043 from owncloud/test-againstNull

Return false in case the passed values are not of type string
parents d6834b63 5ff999d6
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