Skip to content

Commit 03b4302

Browse files
committed
Check if constant exists before defining
This fixes problems when running tests with PHPUnit.
1 parent 30f7c59 commit 03b4302

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

rollbar.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ public static function flush() {
7878
}
7979

8080
// Send errors that have these levels
81-
define('ROLLBAR_INCLUDED_ERRNO_BITMASK', E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR);
81+
if (!defined('ROLLBAR_INCLUDED_ERRNO_BITMASK')) {
82+
define('ROLLBAR_INCLUDED_ERRNO_BITMASK', E_ERROR | E_WARNING | E_PARSE | E_CORE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR);
83+
}
8284

8385
class RollbarNotifier {
8486
const VERSION = "0.9.4";

0 commit comments

Comments
 (0)