getgrav / grav-plugin-admin

Grav Admin Plugin
http://getgrav.org
MIT License
355 stars 222 forks source link

Search fails with "trying to access array offset on value of type bool" #2370

Open RogerParkinson opened 10 months ago

RogerParkinson commented 10 months ago

Grav v1.7.42.3 PHP 8.1.2-1ubuntu2.13

Whenever I request a search I get this. The error line is …/user/plugins/external_links/classes/ExternalLinks.php:122

The top of the stack trace looks like this:

54 Whoops\Exception\ErrorException
…/user/plugins/external_links/classes/ExternalLinks.php:294

53 Grav\Common\Debugger deprecatedErrorHandler
…/user/plugins/external_links/classes/ExternalLinks.php:294

52 Grav\Plugin\ExternalLinks getImageSize
…/user/plugins/external_links/classes/ExternalLinks.php:122

51 Grav\Plugin\ExternalLinks Grav\Plugin\{closure}
[internal]:0

50 preg_replace_callback
…/user/plugins/external_links/classes/ExternalLinks.php:45

Everything else seems to be working just fine. I know it was working a couple of years ago, but I don't use search much so not sure when this went wrong. I have it running locally and reproduced the problem there, but I first noticed it on the public site. Both run under nginx