mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #533 from halkyon/supress_mkdir_temp
BUGFIX Supress mkdir() when attempting to create a temp folder, instead
This commit is contained in:
commit
5062bb8ff5
@ -327,14 +327,14 @@ function getTempFolder($base = null) {
|
|||||||
$ssTmp = "$sysTmp/$cachefolder";
|
$ssTmp = "$sysTmp/$cachefolder";
|
||||||
|
|
||||||
if(!@file_exists($ssTmp)) {
|
if(!@file_exists($ssTmp)) {
|
||||||
@$worked = mkdir($ssTmp);
|
$worked = @mkdir($ssTmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$worked) {
|
if(!$worked) {
|
||||||
$ssTmp = BASE_PATH . "/silverstripe-cache";
|
$ssTmp = BASE_PATH . "/silverstripe-cache";
|
||||||
$worked = true;
|
$worked = true;
|
||||||
if(!@file_exists($ssTmp)) {
|
if(!@file_exists($ssTmp)) {
|
||||||
@$worked = mkdir($ssTmp);
|
$worked = @mkdir($ssTmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -725,14 +725,14 @@ class InstallRequirements {
|
|||||||
$ssTmp = "$sysTmp/silverstripe-cache";
|
$ssTmp = "$sysTmp/silverstripe-cache";
|
||||||
|
|
||||||
if(!@file_exists($ssTmp)) {
|
if(!@file_exists($ssTmp)) {
|
||||||
@$worked = mkdir($ssTmp);
|
$worked = @mkdir($ssTmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$worked) {
|
if(!$worked) {
|
||||||
$ssTmp = dirname($_SERVER['SCRIPT_FILENAME']) . '/silverstripe-cache';
|
$ssTmp = dirname($_SERVER['SCRIPT_FILENAME']) . '/silverstripe-cache';
|
||||||
$worked = true;
|
$worked = true;
|
||||||
if(!@file_exists($ssTmp)) {
|
if(!@file_exists($ssTmp)) {
|
||||||
@$worked = mkdir($ssTmp);
|
$worked = @mkdir($ssTmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user