mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Make use of Utils::assumeNotFalse() in a bunch of places
I've stuck to only doing this in the places where I'm sure we should never get false back. Other places I'm less sure of (and I found more bugs along the way).
This commit is contained in:
@ -34,6 +34,7 @@ use pocketmine\scheduler\BulkCurlTaskOperation;
|
||||
use pocketmine\timings\TimingsHandler;
|
||||
use pocketmine\utils\InternetException;
|
||||
use pocketmine\utils\InternetRequestResult;
|
||||
use pocketmine\utils\Utils;
|
||||
use Webmozart\PathUtil\Path;
|
||||
use function count;
|
||||
use function fclose;
|
||||
@ -105,7 +106,7 @@ class TimingsCommand extends VanillaCommand{
|
||||
}elseif($mode === "merged" or $mode === "report" or $paste){
|
||||
$timings = "";
|
||||
if($paste){
|
||||
$fileTimings = fopen("php://temp", "r+b");
|
||||
$fileTimings = Utils::assumeNotFalse(fopen("php://temp", "r+b"), "Opening php://temp should never fail");
|
||||
}else{
|
||||
$index = 0;
|
||||
$timingFolder = Path::join($sender->getServer()->getDataPath(), "timings");
|
||||
|
Reference in New Issue
Block a user