$table_prefix error after WP 3.8.1 upgrade – plugins not working
-
Hi, I have two custom plugins that I built myself that are no longer working since the WP3.8.1 upgrade last week. Both show errors relating to $table_prefix. Each plugin is in its own version of WP-Multisite. Each Multisite network has its own database. (My host also updated from PHP v5.2 to 5.4 on the same day as WP auto-updated to 3.8.1 – I don’t know if this has caused any complications.)
This is my code which is causing the errors:
$db_table_to_access = $wpdb->$table_prefix.'db_table_to_access';
These are the two errors:
Notice: Undefined variable: table_prefix in /wp-content/plugins/myplugin/myplugin.php on line xxx Fatal error: Cannot access empty property in /wp-includes/wp-db.php on line 566
Line 566 in wp-db.php is near the bottom of this excerpt:
/** * PHP5 style magic getter, used to lazy-load expensive data. * * @since 3.5.0 * * @param string $name The private member to get, and optionally process * @return mixed The private member */ function __get( $name ) { if ( 'col_info' == $name ) $this->load_col_info(); return $this->$name; //line 566 in /wp-includes/wp-db.php }
Any suggestions would be greatly appreciated!
Thanks,
Rob
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘$table_prefix error after WP 3.8.1 upgrade – plugins not working’ is closed to new replies.