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:
Damian Mooyman 2013-10-18 14:30:10 +13:00
parent 688d853a95
commit 371ccca350
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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);
}
}