[BUGFIX] Fix open_basedir warning when entering install tool 80/36680/3
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Thu, 5 Feb 2015 19:39:13 +0000 (20:39 +0100)
committerXavier Perseguers <xavier@typo3.org>
Thu, 5 Feb 2015 22:42:00 +0000 (23:42 +0100)
Due to the bug in php https://bugs.php.net/bug.php?id=67378
Warning is triggered when you have open_basedir set up.

This patch suppress the warning as a workaround.
This code is executed only when calling the install tool.
It doesn't influence FE or BE requests so it's acceptable
to use @ operator.

Resolves: #64882
Releases: master
Change-Id: I7881103464ec018cc0a23f47f6cd8c05bb34929c
Reviewed-on: http://review.typo3.org/36680
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
typo3/sysext/install/Classes/Service/EnableFileService.php

index e81c029..cd5f625 100644 (file)
@@ -184,7 +184,7 @@ class EnableFileService {
         */
        static protected function getFirstInstallFilePaths() {
                $files = array_filter(scandir(self::$sitePath), function($file) {
-                       return (is_file(self::$sitePath . $file) && preg_match('~^' . self::FIRST_INSTALL_FILE_PATH . '.*~i', $file));
+                       return (@is_file(self::$sitePath . $file) && preg_match('~^' . self::FIRST_INSTALL_FILE_PATH . '.*~i', $file));
                });
                return $files;
        }