Skip to content

Commit 1fd2685

Browse files
committed
Make sure we don't try to use null in getPassByReferenceFunction
1 parent 10e2dc0 commit 1fd2685

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: VariableAnalysis/Sniffs/CodeAnalysis/VariableAnalysisSniff.php

+3
Original file line numberDiff line numberDiff line change
@@ -1507,6 +1507,9 @@ protected function processVariableAsPassByReferenceFunctionCall(File $phpcsFile,
15071507
if (! $refArgs) {
15081508
// Check again with the fully namespaced function name.
15091509
$functionName = Helpers::getFunctionNameWithNamespace($phpcsFile, $functionPtr);
1510+
if (! $functionName) {
1511+
return false;
1512+
}
15101513
$refArgs = $this->getPassByReferenceFunction($functionName);
15111514
if (! $refArgs) {
15121515
return false;

0 commit comments

Comments
 (0)