G2A Many GEOs
SHARE
TWEET

Debug DB errors

mbis Apr 5th, 2020 (edited) 123 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function pm_debug_db($option) {
  2.     global $wpdb;
  3.  
  4.     if(!empty($wpdb->last_error)) {
  5.         error_log("{$option} | DB error:");
  6.         error_log($wpdb->last_error);
  7.     }
  8. }
  9. add_action('update_option', 'pm_debug_db');
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top