Skip to content

Instantly share code, notes, and snippets.

@DimaMinka
Forked from zorca/mysqlfix.php
Created November 17, 2019 07:26
Show Gist options
  • Save DimaMinka/5e78137b7c0de4ccc6efbd1cdf22b85a to your computer and use it in GitHub Desktop.
Save DimaMinka/5e78137b7c0de4ccc6efbd1cdf22b85a to your computer and use it in GitHub Desktop.
<?php
add_action( 'init', 'mysqlfix', -1 );
function mysqlfix() {
global $wpdb;
# Removed ONLY_FULL_GROUP_BY
$wpdb->set_sql_mode(['TRADITIONAL']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment