Okay
  Public Ticket #1696501
Custom Post Type Bug
Closed

Comments

  • Dan started the conversation

    If I have custom post types in my theme, but don't select them in the highlighter pro settings i get the following error messages:

    Warning: array_merge(): Argument #2 is not an array in /..../wp-content/plugins/highlighter-pro/highlighter.php on line 134

    Warning: in_array() expects parameter 2 to be array, null given in /..../wp-content/plugins/highlighter-pro/highlighter.php on line 139

    Warning: array_merge(): Argument #2 is not an array in /..../wp-content/plugins/highlighter-pro/highlighter.php on line 134

    Warning: in_array() expects parameter 2 to be array, null given in /..../wp-content/plugins/highlighter-pro/highlighter.php on line 139

    The issue is in line 132 and 133 of highlighter.php.

    $types = isset($options['highlighter_enable']) ? $options['highlighter_enable'] : array();
        $types_cpts = isset($options['highlighter_cpts']) ? $options['highlighter_cpts'] : array();
        

    You should use !empty rather than isset to resolve.

  •  307
    Brian replied

    Thanks for bringing this to my attention so I can address this in the next update. Do you need help adjusting that code in the mean time so you don't get the warnings, or did you already take care of it?

  • Dan replied

    I'm all set. just wanted to pass that along.

  •  307
    Brian replied

    We have just released a plugin which should fix this. Please update and let me know if you still notice any issues. Thanks.