Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only add attributes if the value exists

  • Loading branch information...
commit 2173923754ec6ddc21af5a5cfde21f0591680ceb 1 parent 99292f1
@snikch snikch authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Services/Airbrake.php
View
4 Services/Airbrake.php
@@ -303,8 +303,8 @@ function addXmlBacktrace($parent)
if (isset($entry['class']) && $entry['class'] == get_class($this)) continue;
$line_node = $backtrace->addChild('line');
- $line_node->addAttribute('file', $entry['file']);
- $line_node->addAttribute('number', $entry['line']);
+ if($entry['file']) $line_node->addAttribute('file', $entry['file']);
+ if($entry['line']) $line_node->addAttribute('number', $entry['line']);
$line_node->addAttribute('method', $entry['function']);
}
}

0 comments on commit 2173923

Please sign in to comment.
Something went wrong with that request. Please try again.