diff --git a/module/VuFind/src/VuFind/Cache/Manager.php b/module/VuFind/src/VuFind/Cache/Manager.php index 8149765a4da..c4a34ea0774 100644 --- a/module/VuFind/src/VuFind/Cache/Manager.php +++ b/module/VuFind/src/VuFind/Cache/Manager.php @@ -296,7 +296,7 @@ protected function createFileCache($cacheName, $dirName, $overrideOpts = []) // convert umask from string $umask = octdec($opts['umask']); // validate - if ($umask & 0700) { + if ($umask & 0o700) { throw new \Exception( 'Invalid umask: ' . $opts['umask'] . '; need permission to execute, read and write by owner' @@ -308,7 +308,7 @@ protected function createFileCache($cacheName, $dirName, $overrideOpts = []) $dir_perm = octdec($opts['dir_permission']); } else { // 0777 is chmod default, use if dir_permission is not explicitly set - $dir_perm = 0777; + $dir_perm = 0o777; } // Make sure cache parent directory and directory itself exist: $parentDir = dirname($dirName); diff --git a/module/VuFind/src/VuFind/Sitemap/AbstractFile.php b/module/VuFind/src/VuFind/Sitemap/AbstractFile.php index ac0f515d93a..17a18de6734 100644 --- a/module/VuFind/src/VuFind/Sitemap/AbstractFile.php +++ b/module/VuFind/src/VuFind/Sitemap/AbstractFile.php @@ -122,7 +122,7 @@ public function write($file) // if a subfolder was specified that does not exist, make one $dirname = dirname($file); if (!is_dir($dirname)) { - mkdir($dirname, 0755, true); + mkdir($dirname, 0o755, true); } return file_put_contents($file, $this->toString()); } diff --git a/module/VuFind/tests/bootstrap.php b/module/VuFind/tests/bootstrap.php index 16417b07348..456155ca25b 100644 --- a/module/VuFind/tests/bootstrap.php +++ b/module/VuFind/tests/bootstrap.php @@ -56,5 +56,5 @@ throw new \Exception('LOCAL_OVERRIDE_DIR must be defined'); } if (!file_exists(LOCAL_OVERRIDE_DIR)) { - mkdir(LOCAL_OVERRIDE_DIR, 0777, true); + mkdir(LOCAL_OVERRIDE_DIR, 0o777, true); } diff --git a/module/VuFindTheme/tests/unit-tests/src/VuFindTest/CssPreCompilerTest.php b/module/VuFindTheme/tests/unit-tests/src/VuFindTest/CssPreCompilerTest.php index 7e260240c77..a026737eb76 100644 --- a/module/VuFindTheme/tests/unit-tests/src/VuFindTest/CssPreCompilerTest.php +++ b/module/VuFindTheme/tests/unit-tests/src/VuFindTest/CssPreCompilerTest.php @@ -80,10 +80,10 @@ protected static function makeFakeThemeStructure($ext) $temp = sys_get_temp_dir(); $testDest = $temp . "/vufind_{$ext}_comp_test/"; // Create directory structure, recursively - mkdir($testDest . "themes/child/$ext", 0777, true); - mkdir($testDest . 'themes/empty', 0777, true); - mkdir($testDest . 'themes/parent/css', 0777, true); - mkdir($testDest . "themes/parent/$ext/relative", 0777, true); + mkdir($testDest . "themes/child/$ext", 0o777, true); + mkdir($testDest . 'themes/empty', 0o777, true); + mkdir($testDest . 'themes/parent/css', 0o777, true); + mkdir($testDest . "themes/parent/$ext/relative", 0o777, true); file_put_contents( $testDest . 'themes/empty/theme.config.php', 'false);'