mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Don't rely on existence of REQUEST_URI in LogErrorEmailFormatter (not set on CLI calls)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114138 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
07c821c4a7
commit
19f7484144
@ -49,7 +49,10 @@ class SS_LogErrorEmailFormatter implements Zend_Log_Formatter_Interface {
|
||||
$relfile = Director::makeRelative($errfile);
|
||||
if($relfile[0] == '/') $relfile = substr($relfile, 1);
|
||||
|
||||
$subject = "$errorType at $relfile line {$errline} (http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI])";
|
||||
$host = @$_SERVER['HTTP_HOST'];
|
||||
$uri = @$_SERVER['REQUEST_URI'];
|
||||
|
||||
$subject = "$errorType at $relfile line {$errline} (http://{$host}{$uri})";
|
||||
|
||||
return array(
|
||||
'subject' => $subject,
|
||||
|
Loading…
Reference in New Issue
Block a user