]> _ Git - cubist_util.git/commitdiff
wip #4666 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 15 Sep 2021 15:24:17 +0000 (17:24 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 15 Sep 2021 15:24:17 +0000 (17:24 +0200)
src/Files/VirtualDirectory.php
src/Text.php

index 4b05801f49c1e438e1a4413a43c528a916ab478e..828b0fb0bc01ff49cfa26c1f70a7bec24d54b088 100644 (file)
@@ -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);
         }
index 55a935535b87833776a8d7cc97be37f2362aecd8..d282c81275a3b09daa8957a5b43018149b3db7e3 100644 (file)
@@ -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.