Skip to content

Commit

Permalink
minor #20334 [PhpUnitBridge] Fix undefined variable (romainneutron)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.1 branch.

Discussion
----------

[PhpUnitBridge] Fix undefined variable

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT

Otherwise `$mode` is not defined on line 115

Commits
-------

c4cc392 [PhpUnitBridge] Fix undefined variable
  • Loading branch information
nicolas-grekas committed Oct 28, 2016
2 parents a149403 + c4cc392 commit a70e033
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public static function register($mode = 0)
'other' => array(),
);
$deprecationHandler = function ($type, $msg, $file, $line, $context) use (&$deprecations, $getMode) {
if (E_USER_DEPRECATED !== $type || DeprecationErrorHandler::MODE_DISABLED === $mode = $getMode()) {
$mode = $getMode();
if (E_USER_DEPRECATED !== $type || DeprecationErrorHandler::MODE_DISABLED === $mode) {
return \PHPUnit_Util_ErrorHandler::handleError($type, $msg, $file, $line, $context);
}

Expand Down

0 comments on commit a70e033

Please sign in to comment.