Thanks for the tip! I tried that, interesting results. The culprit seems to be the “Pet Manager” plugin:
https://ww.wp.xz.cn/plugins/pet-manager/
WP_DEBUG is actually already set to false in wp-config.php.
As the Pet Manager plug-in is crucial for this site, I can’t really deactivate it. Should I report the issue to the Pet Manager authors instead?
Thanks a lot! Additional problem – at least when I just comment out the foreach loop is then that editing the pets doesn’t work anymore. The text in the editing text box is white on white background and shown with all the HTML tags. In the “Pet Manager” box area below, it then shows the following error message: “Fatal error: Class ‘cmb_Meta_Box_field’ not found in /home/.sites/web/sitename/wp-content/plugins/pet-manager/inc/metabox/init.php on line 411”
I guess we’ll have to revert to the backup for now, hoping that you can find the issue soon!