Skip to content
Snippets Groups Projects
Commit 553a2ddf authored by Prasad's avatar Prasad
Browse files

Fixed php7_count to work with string value

parent 34008639
No related branches found
No related tags found
No related merge requests found
......@@ -964,8 +964,8 @@ if (!function_exists('get_magic_quotes_gpc')) {
}
function php7_count($value) {
// PHP 8.x does not like count(null)
return is_null($value) ? 0 : count($value);
// PHP 8.x does not like count(null) or count(string)
return is_null($value) || !is_array($value) ? 0 : count($value);
}
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment