Bug 29233 has been fixed by Tim with r90266 in REL1_17 and r96517 in trunk.
The commit message ask for a cleaner way to handle a database connection error:
Temporary fix which roughly restores the 1.16 behaviour of openConnection(), returning a Database object with mOpened = false if the connection fails. However, the idea of throwing an exception from a constructor and then holding on to a reference to the constructed object by saving it in the exception object seems kind of icky. Needs a better fix in trunk.
Code snippet:
try {
$db = DatabaseBase::newFromType( $server['type'], $server );
} catch ( DBConnectionError $e ) {
// FIXME: This is probably the ugliest thing I have ever done to
// PHP. I'm half-expecting it to segfault, just out of disgust. -- TS $db = $e->db;
}
--------------------------
**Version**: 1.20.x
**Severity**: minor