From: Aaron Schulz Date: Tue, 4 Oct 2016 05:35:51 +0000 (-0700) Subject: Improve Database::factory() $driver validation X-Git-Tag: 1.31.0-rc.0~5224 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=ad7f1df5e1f91c344ba9ce5db28e106b09635f9c;p=lhc%2Fweb%2Fwiklou.git Improve Database::factory() $driver validation Change-Id: Ie034e6f2f94f0f1731dbe2468f075297d5a171a2 --- diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index 16d30d7b5e..9f1f228a37 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -352,7 +352,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware } else { $driver = $dbType; } - if ( $driver === false ) { + if ( $driver === false || $driver === '' ) { throw new InvalidArgumentException( __METHOD__ . " no viable database extension found for type '$dbType'" ); }