wapmorgan / PhpDeprecationDetector

Analyzer of PHP code to search issues with deprecated functionality in newer interpreter versions.
http://wapmorgan.github.io/PhpDeprecationDetector/
BSD 3-Clause "New" or "Revised" License
364 stars 37 forks source link

PHP Fatal error: Uncaught TypeError #66

Closed voku closed 2 years ago

voku commented 2 years ago

Hi, I see this error with the new version 2.0.28.

PHP Fatal error: Uncaught TypeError: Argument 1 passed to wapmorgan\PhpCodeFixer\PhpCodeFixer::trimSpaces() must be of the type array, string given.

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to wapmorgan\PhpCodeFixer\PhpCodeFixer::trimSpaces() must be of the type array, string given, called in phar:///home/lmoelleken/meerx/Framework/thirdparty/phpdd.phar/data/implode_param_order_check.php on line 17 and defined in phar:///home/lmoelleken/meerx/Framework/thirdparty/phpdd.phar/src/PhpCodeFixer.php:275
Stack trace:
#0 phar:///home/lmoelleken/meerx/Framework/thirdparty/phpdd.phar/data/implode_param_order_check.php(17): wapmorgan\PhpCodeFixer\PhpCodeFixer::trimSpaces()
#1 phar:///home/lmoelleken/meerx/Framework/thirdparty/phpdd.phar/src/PhpCodeFixer.php(301): wapmorgan\PhpCodeFixer\implode_param_order_check()
#2 phar:///home/lmoelleken/meerx/Framework/thirdparty/phpdd.phar/src/PhpCodeFixer.php(544): wapmorgan\PhpCodeFixer\PhpCodeFixer::callFunctionUsageChecker()
#3 phar:///home/lmoelleken/meerx/Framework/thirdparty/phpdd.phar/src/PhpCodeFixer.php(219): wapmorgan\PhpCodeFixer\PhpCodeFixer->analyzeFunctionsUsage()
#4 phar:///home/lmoelleken/meerx/Framework/thirdpart in phar:///home/lmoelleken/meerx/Framework/thirdparty/phpdd.phar/src/PhpCodeFixer.php on line 275
wapmorgan commented 2 years ago

Can you provide code?

voku commented 2 years ago

I used strace to detect the affected file, and it's this file: https://github.com/scssphp/scssphp/blob/master/src/Compiler.php

wapmorgan commented 2 years ago

In 2.0.29

voku commented 2 years ago

Tested, now it's working. Thanks.