Custom Fields
Support MB Relationships Delete permanently or empty trash - Notice wpdb::prepare

  • Creator
  • #32047


    I have a Notice on debug mode when I want to delete permanently a post type.

    PHP Notice: wpdb::prepare was called <strong>incorrectly</strong>. The query does not contain the correct number of placeholders (2) for the number of arguments passed (3). Please see <a href="">Debugging in WordPress</a> for more information. (This message was added in version 4.8.3.) in /var/www/html/web/wp/wp-includes/functions.php on line 5663

    The problem located at ...\plugins\meta-box-aio\vendor\meta-box\mb-relationships\inc\database\storage-handler.php at line 104.

    if $target, we have two args and if not we have 3 args.
    So if we have in the case $target isn't false or null, we have 2 args and wpdb::prepare have each time 3 args in addition of $sql.

    I tried an hotfix like that

    With that fix, the notice disappear.

    Could you fix that on next update ? In production isn't a real problem but in development, I have all the time the error when I want to delete permanently one or multiple posts.


Viewing 1 replies (of 1 total)
  • Author
  • #32048
    Long Nguyen


    Thank you for your feedback.

    I've escalated this issue to the development team to fix it in the next update.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.