From 9a53de0903205984af9387e0ac6489322f2dbc20 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 24 Oct 2020 11:19:37 +0100 Subject: [PATCH] Utils: explode() never returns an empty array --- src/pocketmine/utils/Utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/utils/Utils.php b/src/pocketmine/utils/Utils.php index 3170007a65..5ce76dba31 100644 --- a/src/pocketmine/utils/Utils.php +++ b/src/pocketmine/utils/Utils.php @@ -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;