From: Chad Horohoe Date: Tue, 16 Aug 2016 20:30:04 +0000 (-0700) Subject: Sqlite: DBError expects a database object as its first parameter X-Git-Tag: 1.31.0-rc.0~6044 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=940c1e1089943649a8dad11cd6ef7aab65b02731;p=lhc%2Fweb%2Fwiklou.git Sqlite: DBError expects a database object as its first parameter That constructor is dumb. It's also dumb to need a DB object considering the only subclass using it is DBConnectionError to getServerName() Change-Id: I8e09989fd6635ccdffdba1102f55a9d3b7ba2f6e --- diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php index 9d0a0f7124..5bbba886e1 100644 --- a/includes/db/DatabaseSqlite.php +++ b/includes/db/DatabaseSqlite.php @@ -911,7 +911,7 @@ class DatabaseSqlite extends Database { public function lock( $lockName, $method, $timeout = 5 ) { if ( !is_dir( "{$this->dbDir}/locks" ) ) { // create dir as needed if ( !is_writable( $this->dbDir ) || !mkdir( "{$this->dbDir}/locks" ) ) { - throw new DBError( "Cannot create directory \"{$this->dbDir}/locks\"." ); + throw new DBError( $this, "Cannot create directory \"{$this->dbDir}/locks\"." ); } }