Open cfinke opened 2 years ago
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.
db_connect()
while ( ( $group_key = array_shift( $this->unused_servers[ $dbhname ] ) ) ) {
$host
$port
$error_details
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.
while
In
db_connect()
, if the conditionwhile ( ( $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:
before
$error_details
, but I don't know if that would be masking the root issue (should thewhile
loop always execute at least once?) or not.