You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to know what query lead to triggering this.. as technically, this should not really be possible (although a similar notice would be)
$key should be a table name, which is inherently a string, but it's likely false in this case as $this->get_table_from_query( $query ) probably failed..
That doesn't explain why it's an integer, rather than a boolean though..
Some code doing something like $wpdb->srtm[] = true would trigger your error though.
On PHP 8 this no longer shows a notice: the key 0 is cast to the needle "0", so after any table-less write (SET …) every query containing a 0 silently goes to the master. Fix and repro in #194.
Activity
dd32 commentedon Oct 6, 2022
It would be nice to know what query lead to triggering this.. as technically, this should not really be possible (although a similar notice would be)
$keyshould be a table name, which is inherently a string, but it's likelyfalsein this case as$this->get_table_from_query( $query )probably failed..That doesn't explain why it's an integer, rather than a boolean though..
Some code doing something like
$wpdb->srtm[] = truewould trigger your error though.Zachify commentedon Oct 6, 2022
Unfortunately I cannot find the full query, just this snippet from my server's error log:
stripos('SELECT * FROM w...', 0)
This is The Events Calendar plugin's migration process that triggers this error, causing the migration to halt indefinitely.
In a site without the HyperDB plugin, this migration performs as expected.
ErikBrendel commentedon Nov 25, 2026
On PHP 8 this no longer shows a notice: the key
0is cast to the needle"0", so after any table-less write (SET …) every query containing a0silently goes to the master. Fix and repro in #194.