mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
eb700a58b7
commit
bae1e1757d
@ -15,13 +15,13 @@ function getTempFolder() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$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(dirname($_SERVER['SCRIPT_FILENAME'])) . "/silverstripe-cache";
|
$ssTmp = dirname(dirname($_SERVER['SCRIPT_FILENAME'])) . "/silverstripe-cache";
|
||||||
$worked = true;
|
$worked = true;
|
||||||
if(!file_exists($ssTmp)) {
|
if(!@file_exists($ssTmp)) {
|
||||||
@$worked = mkdir($ssTmp);
|
@$worked = mkdir($ssTmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,11 @@ class Session {
|
|||||||
|
|
||||||
public static function get($name) {
|
public static function get($name) {
|
||||||
$names = explode('.', $name);
|
$names = explode('.', $name);
|
||||||
|
|
||||||
|
if(!isset($_SESSION)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
$var = $_SESSION;
|
$var = $_SESSION;
|
||||||
|
|
||||||
foreach($names as $n) {
|
foreach($names as $n) {
|
||||||
|
2
main.php
2
main.php
@ -37,7 +37,7 @@ Session::start();
|
|||||||
|
|
||||||
$envFiles = array('../_ss_environment.php', '../../_ss_environment.php', '../../../_ss_environment.php');
|
$envFiles = array('../_ss_environment.php', '../../_ss_environment.php', '../../../_ss_environment.php');
|
||||||
foreach($envFiles as $envFile) {
|
foreach($envFiles as $envFile) {
|
||||||
if(file_exists($envFile)) {
|
if(@file_exists($envFile)) {
|
||||||
include($envFile);
|
include($envFile);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user