diff --git a/src/pocketmine/utils/Utils.php b/src/pocketmine/utils/Utils.php index 90f6f166e..a2c2a611b 100644 --- a/src/pocketmine/utils/Utils.php +++ b/src/pocketmine/utils/Utils.php @@ -188,7 +188,7 @@ class Utils{ if($os === "win"){ @exec("ipconfig /ALL", $mac); $mac = implode("\n", $mac); - if(preg_match_all("#Physical Address[. ]{1,}: ([0-9A-F\\-]{17})#", $mac, $matches)){ + if(preg_match_all("#Physical Address[. ]{1,}: ([0-9A-F\\-]{17})#", $mac, $matches) > 0){ foreach($matches[1] as $i => $v){ if($v == "00-00-00-00-00-00"){ unset($matches[1][$i]); @@ -202,7 +202,7 @@ class Utils{ }else{ @exec("ifconfig 2>/dev/null", $mac); $mac = implode("\n", $mac); - if(preg_match_all("#HWaddr[ \t]{1,}([0-9a-f:]{17})#", $mac, $matches)){ + if(preg_match_all("#HWaddr[ \t]{1,}([0-9a-f:]{17})#", $mac, $matches) > 0){ foreach($matches[1] as $i => $v){ if($v == "00:00:00:00:00:00"){ unset($matches[1][$i]);