$accounts is undefined | WordPress.org

[ad_1]

It may have a local cause but every time there is an update my fix keeps getting undone and this message starts filling my log files:

AH01071: Got error 'PHP message: PHP Warning:  Undefined variable $account in /mnt/wordpress/wp-content/plugins/friends/feed-parsers/class-feed-parser-activitypub.php on line 314; PHP message: PHP Warning:  Undefined variable $account in /mnt/wordpress/wp-content/plugins/friends/feed-parsers/class-feed-parser-activitypub.php on line 314'

The fix is simple, just insert isset:

if ( isset($account) && $account instanceof Entity_Account) {
$status->account = $account;

I have no idea if this causes pain further down the process, I haven’t really explored the Friends plugin, and since this relates to ActivityPub, it may not even be part of Friends but a 3rd party plugin? Nonetheless, if not dangerous for other reasons, this was a simple fix to my log problem.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer