Undefined index: lloc in phploc/phploc/src/Analyser.php on line 316
SalilKothadia opened this issue · comments
Hello,
I encountered the following error with PHP 7.1 namespacing.
phploc 2.1.5 by Sebastian Bergmann.
PHP Notice: Undefined index: lloc in /home/www/html/phpci/vendor/phploc/phploc/src/Analyser.php on line 316
PHP Stack trace:
PHP 1. {main}() phpci/vendor/phploc/phploc/phploc:0
PHP 2. SebastianBergmann\PHPLOC\CLI\Application->run() /home/www/html/phpci/vendor/phploc/phploc/phploc:31
PHP 3. SebastianBergmann\PHPLOC\CLI\Application->doRun() /home/www/html/phpci/vendor/symfony/console/Application.php:117
PHP 4. SebastianBergmann\PHPLOC\CLI\Application->doRun() /home/www/html/phpci/vendor/phploc/phploc/src/CLI/Application.php:98
PHP 5. SebastianBergmann\PHPLOC\CLI\Application->doRunCommand() /home/www/html/phpci/vendor/symfony/console/Application.php:193
PHP 6. SebastianBergmann\PHPLOC\CLI\Command->run() /home/www/html/phpci/vendor/symfony/console/Application.php:843
PHP 7. SebastianBergmann\PHPLOC\CLI\Command->execute() /home/www/html/phpci/vendor/symfony/console/Command/Command.php:241
PHP 8. SebastianBergmann\PHPLOC\CLI\Command->executeSingle() /home/www/html/phpci/vendor/phploc/phploc/src/CLI/Command.php:109
PHP 9. SebastianBergmann\PHPLOC\CLI\Command->count() /home/www/html/phpci/vendor/phploc/phploc/src/CLI/Command.php:128
PHP 10. SebastianBergmann\PHPLOC\Analyser->countFiles() /home/www/html/phpci/vendor/phploc/phploc/src/CLI/Command.php:233
PHP 11. SebastianBergmann\PHPLOC\Analyser->countFile() /home/www/html/phpci/vendor/phploc/phploc/src/Analyser.php:167
PHP Notice: Undefined index: lloc in /home/www/html/phpci/vendor/phploc/phploc/src/Analyser.php on line 316
Was able to traceback the issue to namspacing, importing function.
eg:
use function json_encode;
I guess it assumes to be function declaration rather than import function.
Does the problem exist in a current version of PHPLOC?
Hello Sebastian,
I am sorry for not verifying that before posting the issue. You are right, updating to phploc 4 resolved it.
I see PHPCI is not under active development.
We need to move to PHP CENSOR