Bug in wp-includes/classes.php (1 post)

  1. argotvisual
    Posted 10 years ago #

    In certain installations, MySQL has ANSI compatibility active, in this scenario all the strings must be quoted with single quote, and I think this is the secenario for MySQL new versions.

    In wp-includes/classes.php in this file in lines 595-611 the code have double quotes for strings, like in this example:


    $where .= ' AND (post_status = "attachment")';


    This causes a MySQL error. This error can be avoided by changing the quotes:

    $where .= " AND (post_status = 'attachment')";

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.