mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
more php8 spam fix
This commit is contained in:
parent
629a044053
commit
6187ebc1a7
2 changed files with 11 additions and 2 deletions
|
|
@ -21,7 +21,12 @@ class PMF{
|
|||
|
||||
public function create($file, $type, $version = PMF_CURRENT_VERSION){
|
||||
$this->file = $file;
|
||||
@mkdir(dirname($this->file), 0755, true);
|
||||
$dirname = dirname($this->file);
|
||||
if(!is_dir($dirname)){
|
||||
@mkdir($dirname, 0755, true);
|
||||
}
|
||||
|
||||
|
||||
if(!is_resource($this->fp)){
|
||||
if(($this->fp = @fopen($file, "c+b")) === false){
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,11 @@ class PMFLevel extends PMF{
|
|||
$this->saveData(false);
|
||||
$this->locationTable = [];
|
||||
$cnt = pow($this->levelData["width"], 2);
|
||||
@mkdir(dirname($this->file) . "/chunks/", 0755);
|
||||
$dirname = dirname($this->file) . "/chunks/";
|
||||
if(!is_dir($dirname)){
|
||||
@mkdir($dirname , 0755);
|
||||
}
|
||||
|
||||
for($index = 0; $index < $cnt; ++$index){
|
||||
$this->chunks[$index] = false;
|
||||
$this->chunkChange[$index] = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue