From 105986392bc51f46f7c2b50103f31fed0592bace Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Fri, 15 Jun 2012 11:48:42 +1200 Subject: [PATCH] BUGFIX Supress mkdir() when attempting to create a temp folder, instead of the variable. This gives a nicer error in the installer. --- core/Core.php | 4 ++-- dev/install/install.php5 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/Core.php b/core/Core.php index 993011e3b..de586b346 100644 --- a/core/Core.php +++ b/core/Core.php @@ -324,14 +324,14 @@ function getTempFolder($base = null) { $ssTmp = "$sysTmp/$cachefolder"; if(!@file_exists($ssTmp)) { - @$worked = mkdir($ssTmp); + $worked = @mkdir($ssTmp); } if(!$worked) { $ssTmp = BASE_PATH . "/silverstripe-cache"; $worked = true; if(!@file_exists($ssTmp)) { - @$worked = mkdir($ssTmp); + $worked = @mkdir($ssTmp); } } diff --git a/dev/install/install.php5 b/dev/install/install.php5 index 6107ab1cf..d16a365d9 100644 --- a/dev/install/install.php5 +++ b/dev/install/install.php5 @@ -725,14 +725,14 @@ class InstallRequirements { $ssTmp = "$sysTmp/silverstripe-cache"; if(!@file_exists($ssTmp)) { - @$worked = mkdir($ssTmp); + $worked = @mkdir($ssTmp); } if(!$worked) { $ssTmp = dirname($_SERVER['SCRIPT_FILENAME']) . '/silverstripe-cache'; $worked = true; if(!@file_exists($ssTmp)) { - @$worked = mkdir($ssTmp); + $worked = @mkdir($ssTmp); } }