• Hello

    I would like to draw your attention to a PHP warning that occurs in your plugin called Shortcoder. The PHP warning is caused in the file /shortcoder/admin/tools.php, on line 54.

    This line of code causes the PHP warning:

    return ( $screen->post_type == SC_POST_TYPE && $screen->base == 'post' );

    It happens when the variable $screen happens to be null. Then $screen->post_type can not be accessed and therefore the return statement itself fails.

    To mitigate the problem I made the following change in your code:

    if ( null !== $screen )
    return ( $screen->post_type == SC_POST_TYPE && $screen->base == 'post' );
    else
    return null;

    You can make whatever adjustment you think is best in this case for your code. I am just trying to direct your attention to this issue.

    Sincerely,
    Gevorg

Viewing 1 replies (of 1 total)
  • Plugin Author vaakash

    (@vaakash)

    Hi Gevorg,

    Thanks for reporting this issue. This will be fixed in the next release of the plugin.

    Thanks,

    Aakash

Viewing 1 replies (of 1 total)

The topic ‘PHP Warning: property “post_type” on null’ is closed to new replies.