Skip to content

Check if constant exists before defining#32

Merged
sbezboro merged 1 commit into
rollbar:masterfrom
kidk:check-before-define
Jun 30, 2014
Merged

Check if constant exists before defining#32
sbezboro merged 1 commit into
rollbar:masterfrom
kidk:check-before-define

Conversation

@kidk

@kidk kidk commented Jun 30, 2014

Copy link
Copy Markdown
Contributor

We are getting a lot of errors after upgrading to the latest version. The problem is that PHP cannot redefine a constant, so I added a check to see if it already exists before defining again.

Example error:
[exec] 5) ApiControllerTest::testFeedbackSpecialChars
[exec] PHPUnit_Framework_Exception: PHP Notice: Constant ROLLBAR_INCLUDED_ERRNO_BITMASK already defined in /var/lib/jenkins/jobs/ci_development/workspace/protected/vendors/rollbar/rollbar.php on line 81
[exec] PHP Stack trace:

This fixes problems when running tests with PHPUnit.
@brianr

brianr commented Jun 30, 2014

Copy link
Copy Markdown
Member

Thanks! We'll review and get this merged, most likely today.

@sbezboro sbezboro merged commit 03b4302 into rollbar:master Jun 30, 2014
@sbezboro

Copy link
Copy Markdown
Contributor

Thanks @kidk! Merged and released as version 0.9.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants