• Hi,

    I’ve encountered the following warning while using the plugin. It occurs in the related posts loop for blog posts.

    Warning: Attempt to read property “post_type” on int in /plugins/favorites/app/Entities/Post/PostHooks.php

    It seems $post is expected to be an object but may sometimes be an integer, causing the warning. Since I don’t need the Favorites button to appear in the related posts loop, adding a check to ensure $post is an object would resolve the issue.

    Could you look into this? Much thanks!

The topic ‘Warning in PostHooks.php’ is closed to new replies.