Page MenuHomePhabricator

Linter autofix produces a syntax error
Open, NormalPublic

Description

Running arc lint on the following code produces a syntax error:

<?php

echo $x * 2 . '%';

Specifically, the following fix with be applied:

<?php

-echo $x * 2 . '%';
+echo $x * 2.'%';

This change introduces a syntax error:

> php -l test.php 
PHP Parse error:  syntax error, unexpected ''%'' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' in test.php on line 3
Errors parsing test.php