mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Less misuse of error control operator (@)
This is necessary to prevent get_last_error() from returning suppressed errors when retrieving values from nested arrays
This commit is contained in:
parent
688d853a95
commit
371ccca350
@ -90,7 +90,7 @@ class SS_Backtrace {
|
||||
// Filter out arguments
|
||||
foreach($bt as $i => $frame) {
|
||||
$match = false;
|
||||
if(@$bt[$i]['class']) {
|
||||
if(!empty($bt[$i]['class'])) {
|
||||
foreach($ignoredArgs as $fnSpec) {
|
||||
if(is_array($fnSpec) && $bt[$i]['class'] == $fnSpec[0] && $bt[$i]['function'] == $fnSpec[1]) {
|
||||
$match = true;
|
||||
|
@ -94,7 +94,7 @@ class SS_Log {
|
||||
// Add default context (shouldn't change until the actual log event happens)
|
||||
foreach(static::$log_globals as $globalName => $keys) {
|
||||
foreach($keys as $key) {
|
||||
$val = @$GLOBALS[$globalName][$key];
|
||||
$val = isset($GLOBALS[$globalName][$key]) ? $GLOBALS[$globalName][$key] : null;
|
||||
static::$logger->setEventItem(sprintf('$%s[\'%s\']', $globalName, $key), $val);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user