I've installed the latest CraftCMS version via composer. When I'm visiting the plugins settings page (/web/admin/settings/plugins), I get the following error message: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Application Info
PHP version                 8.2.13
OS version                  Linux 5.15.74-1-pve
Database driver & version   MariaDB 10.6.12
Image driver & version      Imagick 3.7.0 (ImageMagick 6.9.11-60)
Craft edition & version     Craft Solo
Yii version       
Twig version                v3.4.3
Guzzle version              7.8.0

I'm using PHP 8.2, but I see that passing a null parameter to preg_replace() was also deprecated in PHP8.1. PHP8.0 is EOL. So I'm not sure what to do here.

  • 2
    Your screenshot is showing a completely different error message than the one mentioned in your post?
    – MoritzLost
    Commented Dec 8, 2023 at 13:52

1 Answer 1


I would recommend deleting the vendor folder and then running composer install this should ensure any cruft that didn't make it quite right through an update is replaced.

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.