Last active
December 20, 2015 03:49
-
-
Save WebDragon/6066884 to your computer and use it in GitHub Desktop.
patch wp-includes/wp-db.php on a mysql server that is set up to normally run as SQL_MODE="ANSI,TRADITIONAL,ONLY_FULL_GROUP_BY" -- which wordpress currently barfs all over because it has not yet been reconfigured to run on a strict server, so that this way, wordpress will function as it normally would on a default mysql server with no strictness …
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- wp-includes/wp-db.php 2013-06-21 14:41:52.000000000 -0400 | |
+++ wp-includes/wp-db.php 2013-07-23 18:37:01.298896949 -0400 | |
@@ -1166,6 +1166,7 @@ | |
$this->ready = true; | |
$this->select( $this->dbname, $this->dbh ); | |
+ mysql_query( "SET sql_mode=''", $this->dbh); | |
} | |
/** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem has now been fixed in wordpress core (insofar, at least, as a similar workaround -- not ACTUALLY by making wordpress able to function properly in a strict environment) with a bit more detail than my simple patch https://core.trac.wordpress.org/ticket/26847 due to how mysql 5.6 ships with more strictness on by default (good for them! about time, too.)