Make WordPress Core

Ticket #16821: wp-includes__load.patch

File wp-includes__load.patch, 935 bytes (added by Dan1975, 12 years ago)

Patch for running normally

  • load.php

    # This patch file was generated by NetBeans IDE
    # Following Index: paths are relative to: W:\www\NetbeansProjects\3rdParty_WordPress\wp-includes
    # This patch can be applied using context Tools: Patch action on respective folder.
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    330330                return;
    331331
    332332        $wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );
     333        $currentSqlMode = $wpdb->get_col("SELECT @@SESSION.sql_mode AS `a`;");
     334        $desiredSqlMode = str_replace(array('NO_ZERO_DATE', 'NO_ZERO_IN_DATE'), '', $currentSqlMode[0]);
     335        unset($currentSqlMode);
     336        $desiredSqlMode = str_replace(array(',,,', ',,'), ',', $desiredSqlMode);
     337        $wpdb->query("SET SESSION sql_mode = '" . $desiredSqlMode . "'");
     338        unset($desiredSqlMode);
    333339}
    334340
    335341/**