HyperDB
HyperDB copied to clipboard
Undefined variable: host
In db_connect(), if the condition while ( ( $group_key = array_shift( $this->unused_servers[ $dbhname ] ) ) ) { is never met, $host and $port will be undefined when the $error_details array is created, generating a PHP notice.
It could be fixed by just adding:
if ( ! isset( $host ) ) { $host = ''; }
if ( ! isset( $port ) ) { $port = ''; }
before $error_details, but I don't know if that would be masking the root issue (should the while loop always execute at least once?) or not.