Automattic / vip-go-wpcom-compat

VIP Go / WordPress.com Compatibility
https://wpvip.com
2 stars 6 forks source link

Fix: PHP 8.2 Compat #51

Closed mslinnea closed 5 months ago

mslinnea commented 10 months ago

This pull request addresses a compatibility issue with PHP 8.2 in the mrss_featured_image function. The PHP Notice "Only variables should be assigned by reference" was triggered due to the unnecessary use of the reference assignment operator &.

Changes Made:

Removed the & operator from the line $thumbnail = & get_post( $thumb_id );

In PHP 5 and later versions, objects are assigned by reference by default. The explicit reference assignment is thus redundant and can cause notices in PHP 8.2.