Browse files

Merge pull request #642 from jmikola/method-variable-args

  • Loading branch information...
2 parents 837c66e + 0acdf52 commit 6fa8e83c70c0d25376410d609f05fe834fca310b @sebastianbergmann committed Sep 10, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 PHPUnit/Util/Class.php
View
7 PHPUnit/Util/Class.php
@@ -138,8 +138,11 @@ public static function getMethodParameters($method, $forCall = FALSE)
foreach ($method->getParameters() as $i => $parameter) {
$name = '$' . $parameter->getName();
- if ($name === '$') {
- $name .= 'arg' . $i;
+ /* Note: PHP extensions may use empty names for reference arguments
+ * or "..." for methods taking a variable number of arguments.
+ */
+ if ($name === '$' || $name === '$...') {
+ $name = '$arg' . $i;
}
$default = '';

0 comments on commit 6fa8e83

Please sign in to comment.