Hide errors in safe mode

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@39799 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-08-09 22:06:39 +00:00
parent eb700a58b7
commit bae1e1757d
3 changed files with 8 additions and 3 deletions

View File

@ -15,13 +15,13 @@ function getTempFolder() {
}
$ssTmp = "$sysTmp/silverstripe-cache";
if(!file_exists($ssTmp)) {
if(!@file_exists($ssTmp)) {
@$worked = mkdir($ssTmp);
}
if(!$worked) {
$ssTmp = dirname(dirname($_SERVER['SCRIPT_FILENAME'])) . "/silverstripe-cache";
$worked = true;
if(!file_exists($ssTmp)) {
if(!@file_exists($ssTmp)) {
@$worked = mkdir($ssTmp);
}
}

View File

@ -42,6 +42,11 @@ class Session {
public static function get($name) {
$names = explode('.', $name);
if(!isset($_SESSION)) {
return null;
}
$var = $_SESSION;
foreach($names as $n) {

View File

@ -37,7 +37,7 @@ Session::start();
$envFiles = array('../_ss_environment.php', '../../_ss_environment.php', '../../../_ss_environment.php');
foreach($envFiles as $envFile) {
if(file_exists($envFile)) {
if(@file_exists($envFile)) {
include($envFile);
break;
}