Error in SonarQube 7.7 when analyzing a php project

  • Versions: SonarQube 7.7, Scanner 3.3.0.1492, Plugin PHP

  • Error observed: Error during SonarQube Scanner execution

java.lang.StackOverflowError 
  at org.sonar.php.checks.IdenticalOperandsInBinaryExpressionCheck.visitBinaryExpression(IdenticalOpe andsInBinaryExpressionCheck.java:43) 
  at org.sonar.php.tree.impl.expression.BinaryExpressionTreeImpl.accept(BinaryExpressionTreeImpl.java:75)
  at org.sonar.plugins.php.api.visitors.PHPVisitorCheck.scan(PHPVisitorCheck.java:549)

when I analyze a php project I get this error, preventing the process from ending and I can see the result of the analysis.

in the project path I have the following file: sonar-project.properties, inside this file I have the following code:
sonar.projectKey=idCrm_leasing
sonar.projectName=crm_leasin
sonar.projectVersion=1.0
sonar.language=php

Hello Alejandro,

Thank you for your feedback.
The issue seems to be coming from the PHP “Identical expressions should not be used on both sides of a binary operator” rule.
You can try to disable this rule temporarily, to see if the analysis finishes successfully without it.

If that’s the case, it would then be really helpful if you could identify the source file being analyzed that is causing the problem and share with us a small reproducer highlighting the problem. Without knowing the pattern that makes the plugin fail, it is hard for us to investigate the root of your issue.

Cheers,
-Christophe