Utils: explode() never returns an empty array

This commit is contained in:
Dylan K. Taylor 2020-10-24 11:19:37 +01:00
parent 0f8101d4a6
commit 9a53de0903

View File

@ -527,7 +527,7 @@ class Utils{
$ret = explode("\n", $contents);
ob_end_clean();
if(count($ret) >= 1 and preg_match('/^.* refcount\\(([0-9]+)\\)\\{$/', trim($ret[0]), $m) > 0){
if(preg_match('/^.* refcount\\(([0-9]+)\\)\\{$/', trim($ret[0]), $m) > 0){
return ((int) $m[1]) - ($includeCurrent ? 3 : 4); //$value + zval call + extra call
}
return -1;