Permalink
Browse files

Use isset for array index checking

  • Loading branch information...
1 parent 1c46e90 commit 0f01001c2019e95818b3ee776d6d6746a011261b @snikch snikch committed Oct 10, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 Services/Airbrake.php
View
@@ -301,8 +301,8 @@ function addXmlBacktrace($parent)
if (isset($entry['class']) && $entry['class'] == get_class($this)) continue;
$line_node = $backtrace->addChild('line');
- if($entry['file']) $line_node->addAttribute('file', $entry['file']);
- if($entry['line']) $line_node->addAttribute('number', $entry['line']);
+ if(isset($entry['file'])) $line_node->addAttribute('file', $entry['file']);
+ if(isset($entry['line'])) $line_node->addAttribute('number', $entry['line']);
$line_node->addAttribute('method', $entry['function']);
}
}

0 comments on commit 0f01001

Please sign in to comment.