Fixed conversion error of file modes
authorAlexander Ebert <ebert@woltlab.com>
Sun, 2 Jun 2013 16:55:50 +0000 (18:55 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 2 Jun 2013 16:55:50 +0000 (18:55 +0200)
wcfsetup/install/files/lib/util/FileUtil.class.php

index 6ca07a8868d682889dd7d601aa244663654fac3f..084990f3b66eb78f40d54128b7f03f4117e71ad0 100644 (file)
@@ -500,10 +500,10 @@ final class FileUtil {
                        if (defined('NO_IMPORTS')) {
                                // do not use PHP_OS here, as this represents the system it was built on != running on
                                if (strpos(php_uname(), 'Windows') !== false) {
-                                       self::$mode = 0777;
+                                       self::$mode = '0777';
                                }
                                else {
-                                       self::$mode = 0666;
+                                       self::$mode = '0666';
                                
                                        $tmpFilename = '__permissions_'.sha1(time()).'.txt';
                                        @touch($tmpFilename);
@@ -516,7 +516,7 @@ final class FileUtil {
                                                $fileOwner = fileowner($tmpFilename);
                                                        
                                                if ($scriptOwner === $fileOwner) {
-                                                       self::$mode = 0644;
+                                                       self::$mode = '0644';
                                                }
                                                        
                                                @unlink($tmpFilename);