Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Temyk

    (@webtemyk)

    Hello.

    This error occurs in the code of your snippet.

    Thread Starter Pexle Chris

    (@pexlechris)

    I don’t use property post_type in my snippets. Maybe it is a conflict with the theme…

    Plugin Support Temyk

    (@webtemyk)

    Are you using the latest version of the plugin?
    Can you show in the screenshot what you have in this file on line 80?

    Thread Starter Pexle Chris

    (@pexlechris)

    In line 80 I have this line:
    $post_type = ! empty( $post ) ? $post->post_type : get_post( $data->ID )->post_type;

    I don’t use the last version of the plugin and I cannot update because I use a version with my own customizations and I have done this post in order to help you.

    I love your plugin and it would be my pleasure to contribute =D

    Plugin Support Temyk

    (@webtemyk)

    We cannot support a customized version of the plugin for you. You’ll have to figure it out yourself.

    Thread Starter Pexle Chris

    (@pexlechris)

    In line 80 I have this line:
    $post_type = ! empty( $post ) ? $post->post_type : get_post( $data->ID )->post_type;

    The problem in this line was that $post could be an integer=post_id, so the so simple fix is this:
    $post_type = ! empty( $post ) && is_object($post) ? $post->post_type : get_post( $data->ID )->post_type;

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Unexpected error’ is closed to new replies.