Navigation Menu

Skip to content

Commit

Permalink
bug symfony#19126 [PhpUnitBridge] use call_user_func() for PHP 5.3 co…
Browse files Browse the repository at this point in the history
…mpatibility (xabbuh)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[PhpUnitBridge] use call_user_func() for PHP 5.3 compatibility

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Not all callables can be called directly on PHP 5.3 (for example, `array('className', 'methodName')` does not work).

Commits
-------

8549e05 use call_user_func() for PHP 5.3 compatibility
  • Loading branch information
fabpot committed Jun 21, 2016
2 parents a41f359 + 8549e05 commit 26eca5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/PhpUnit/ErrorAssert.php
Expand Up @@ -53,7 +53,7 @@ public static function assertErrorsAreTriggered($expectedType, $expectedMessages
$triggeredMessages[] = $message;
});

$testCode();
call_user_func($testCode);
} catch (\Exception $e) {
} catch (\Throwable $e) {
}
Expand Down

0 comments on commit 26eca5d

Please sign in to comment.