• Resolved hilj

    (@hilj)


    I get this error:

    
    Catchable fatal error: Closure object cannot have properties in /srv/www/my-site/htdocs/WP/wp-includes/post.php on line 522
    

    It traces back to wordpress_seo/admin/metabox/class_metabox.php:793:

    
    if ( wp_is_post_revision( $post_id ) ) {
        $post_id = wp_is_post_revision( $post_id );
    }
    

    The $post_id returns something that is not an ID:

    
    Closure Object
    (
        [parameter] => Array
            (
                [$attachment_id] => <required>
            )
    
    )
    

    Any idea what might cause this? It happens on php 5 and php 7.1.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support amboutwe

    (@amboutwe)

    Sometimes strange behavior may be caused by a plugin or theme conflict. The fastest way to rule out conflicts is to deactivate all non-Yoast plugins and switch to a standard theme like Twenty Seventeen. If this resolves the issue, you have a conflict and should activate one plugin at a time until you locate the conflict. Finally, after all plugins are active, switch to your theme. This will narrow down the conflict to a specific plugin or theme.

    If you are unfamiliar with checking for conflicts, we wrote a small guide that will walk you through the steps. You can find it here: How To Check For Plugin Conflicts

    Thread Starter hilj

    (@hilj)

    It was caused by a weird combination of do_action('add_attachment') and a missing imageMagick library in the server. I added imageMagick and changed do_action to add_action and error went away.

    Thanks for your kind reply!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Catchable fatal error: Closure object cannot have properties’ is closed to new replies.