🇨🇭Switzerland @pjovanovic

Account created on 3 August 2023, over 1 year ago
#

Recent comments

🇨🇭Switzerland pjovanovic

I have run into this issue as well. Applying your changes worked for me and the Exception is not thrown any more.

🇨🇭Switzerland pjovanovic

I am not sure if the following commit is needed any more:
https://git.drupalcode.org/project/image_field_caption/-/merge_requests/5/diffs?commit_id=69107bba3373b33b7e0d71312f9772133016c5cf
since the implementation changed in Version 2.0.x
Should this patch be rewritten for 2.0.x or is the implementation not needed any more?

🇨🇭Switzerland pjovanovic

So after a long debugging session, I found the problem.
The fix: update to the newest version, for me, it was v4.18.0
The Problem: For some reason the version used is not the newest and the older version probably has a problem with php8.
I found that the token processed in the Lexer.php file vendor/nikic/php-parser/lib/PhpParser/Lexer.php sometimes contains an "&" sign, which causes the parsing to fail. When I updated, the following if statement was added to address this problem:

 if ($token === '&')

at Line 212. This should solve your issue and let you scan your modules.
The package link: https://packagist.org/packages/nikic/php-parser#v4.18.0

🇨🇭Switzerland pjovanovic

I tested the patch on Drupal 9.5.8 with PHP 8.1, and it worked for me, the error on screen has vanished now, however I needed another patch to get rid of another error, issue: https://www.drupal.org/project/gtranslate/issues/3350875 🐛 Warning: foreach() argument must be of type array|object GTranslateBlock.php RTBC after I applied the patch from the issue in the link, I still had the error described in this issue, which was fixed by this patch. So in summary, it's safe to say that this patch does fix the problem.

🇨🇭Switzerland pjovanovic

Thank you very much for the fast response, it may take a while until I see the role, right?

🇨🇭Switzerland pjovanovic

I took the patch #69 and aligned the method signature of the FloodUnblockManager::fetchIdentifiers with the interface method.

Production build 0.71.5 2024