Support » Plugin: Toolset Types - Custom Post Types, Custom Fields and Taxonomies » Bug in user fields when in ie. search.php

  • b10nik

    (@b10nik)



    There is a bug in Types (at least v. 2.2.1) in types/library/toolset/types/embedded/usermeta-init.php at line 366:

    $post_id = $post->ID;

    In some cases $post might not be set and it throws an error message. To fix it, you should check if $post is set before trying to access ID:

    if(isset($post)){
    $post_id = $post->ID;

    }

    Hope this helps.

    — Lauri

Viewing 1 replies (of 1 total)
  • Plugin Support Beda

    (@bedas)

    $post is a WordPress Global and the developers should have declared it in the code if not instantiated already.

    Can you elaborate the “edge case” so I can reporduce this and eventually confirm the bug?

Viewing 1 replies (of 1 total)
  • The topic ‘Bug in user fields when in ie. search.php’ is closed to new replies.