Merge pull request #2563 from tractorcow/pulls/3.1-error-control-usage

BUG Less misuse of error control operator (@)
This commit is contained in:
Ingo Schommer 2013-10-18 02:06:32 -07:00
commit 69c888a2ac
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);
}
}