Skip to content

Commit ec29df4

Browse files
author
Benjamin Pearson
committed
1. Sanity check for the isDeprecated() method, so hhvm plays nice.
1 parent bcfa85e commit ec29df4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CodeSniffer/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public function __construct()
5454

5555
foreach ($functions['internal'] as $functionName) {
5656
$function = new ReflectionFunction($functionName);
57+
if (method_exists($function, 'isDeprecated') === false) {
58+
break;
59+
}
5760

5861
if ($function->isDeprecated() === true) {
5962
$this->forbiddenFunctions[$functionName] = null;

0 commit comments

Comments
 (0)