Fixed bug #12371: Warning issued on first load of install tool with open_basedir set
authorErnesto Baschny <ernst@cron-it.de>
Thu, 29 Oct 2009 10:06:14 +0000 (10:06 +0000)
committerErnesto Baschny <ernst@cron-it.de>
Thu, 29 Oct 2009 10:06:14 +0000 (10:06 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6297 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/install/mod/class.tx_install_session.php

index c7f287f..908f893 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-10-29  Ernesto Baschny  <ernst@cron-it.de>
+
+       * Fixed bug #12371: Warning issued on first load of install tool with open_basedir set
+
 2009-10-28  Christian Kuhn  <lolli@schwarzbu.ch>
 
        * Follow-up to #12326: $label is already used, rename new variable to $optionLabel
index 82a7eb5..1a706e4 100644 (file)
@@ -342,11 +342,15 @@ class tx_install_session {
         *
         * @param integer The setting of session.gc_maxlifetime
         *
-        * @return string
+        * @return boolean
         */
        public function gc($maxLifeTime) {
                $sessionSavePath = $this->getSessionSavePath();
-               foreach (glob($sessionSavePath . '/hash_*') as $filename) {
+               $files = glob($sessionSavePath . '/hash_*');
+               if (!is_array($files)) {
+                       return TRUE;
+               }
+               foreach ($files as $filename) {
                        if (filemtime($filename) + ($this->expireTimeInMinutes*60) < time()) {
                                @unlink($filename);
                        }