From: Vincent Vanwaelscappel Date: Wed, 15 Sep 2021 15:24:17 +0000 (+0200) Subject: wip #4666 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ca9f1c2f7c8e729a1b6ff64ece1e1c1ab1ef4228;p=cubist_util.git wip #4666 @0.5 --- diff --git a/src/Files/VirtualDirectory.php b/src/Files/VirtualDirectory.php index 4b05801..828b0fb 100644 --- a/src/Files/VirtualDirectory.php +++ b/src/Files/VirtualDirectory.php @@ -68,16 +68,6 @@ class VirtualDirectory Files::mkdir($dir); } - foreach ($this->_contents as $to => $data) { - if ($delete) { - $existing[$to] = true; - } - - file_put_contents($to, $data); - } - - //dd($this->_copy); - foreach ($this->_copy as $to => $from) { if (!file_exists($from)) { continue; @@ -99,6 +89,14 @@ class VirtualDirectory } } + foreach ($this->_contents as $to => $data) { + if ($delete) { + $existing[$to] = true; + } + + file_put_contents($to, $data); + } + if ($delete) { $this->_delete($existing); } diff --git a/src/Text.php b/src/Text.php index 55a9355..d282c81 100644 --- a/src/Text.php +++ b/src/Text.php @@ -384,7 +384,7 @@ class Text $len = strlen($str); for ($i = 0; $i < $len; $i++) { - $in = ord($str{$i}); + $in = ord($str[$i]); if (0 == $mState) { // When mState is zero we expect either a US-ASCII character or a // multi-octet sequence.