Skip to content

Instantly share code, notes, and snippets.

View briancoogan's full-sized avatar

Brian C briancoogan

  • Cintix
  • Melbourne, Australia
View GitHub Profile
@briancoogan
briancoogan / db.php
Last active February 11, 2022 02:28
WordPress wp-db.php tweak to display errors
<?php
// *** NOTE: THIS WAS FIXED IN WORDPRESS 5.9 released Feb 2022 so this code should no longer be necessary. ****
// db.php: Cintix/BC debug extended version of wp-db class
//
// Tiny extension to wp-db.php to detect the normally silent length
// overrun error, and return it so the developer can see the error.
// Without this, wp-db.php just returns with no errors and no rows changed;
// which is a nightmare to debug.