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";
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user