mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Ensure has length before using string index access.
This commit is contained in:
parent
9b3aebd310
commit
1a4eaaaf04
@ -30,7 +30,7 @@ class SS_LogErrorFileFormatter implements Zend_Log_Formatter_Interface {
|
|||||||
|
|
||||||
$urlSuffix = '';
|
$urlSuffix = '';
|
||||||
$relfile = Director::makeRelative($errfile);
|
$relfile = Director::makeRelative($errfile);
|
||||||
if($relfile[0] == '/') $relfile = substr($relfile, 1);
|
if(strlen($relfile) && $relfile[0] == '/') $relfile = substr($relfile, 1);
|
||||||
if(isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] && isset($_SERVER['REQUEST_URI'])) {
|
if(isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] && isset($_SERVER['REQUEST_URI'])) {
|
||||||
$urlSuffix = " (http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI])";
|
$urlSuffix = " (http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI])";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user