0

Getting error after upgrade to 2.4.2-p1, on di:compile command

Application code generator... 3/9 [=========>------------------] 33% 1 min 380.0 MiBPHP Fatal error: Uncaught TypeError: rtrim() expects parameter 1 to be string, bool given in setup\src\Magento\Setup\Module\Di\Code\Scanner\PhpScanner.php:95

3
  • What operating system are you using?
    – paj
    Commented Jul 5, 2021 at 14:46
  • do compile and check in magento root you can see errorlog.php or phperrorlog file. this will indicate exact error location. Commented Jul 6, 2021 at 3:58
  • I have resolved this and added an answer here magento.stackexchange.com/questions/195519/… Commented Jul 6, 2021 at 6:02

1 Answer 1

0

try defining the PHP version in the command, i use

php-7.2 bin/magento setup:di:compile

Yours may be

php-7.4 bin/magento setup:di:compile

1
  • I already tried this but still getting the same error Commented Jul 5, 2021 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.