]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix sqlite3 driver for php<5.3
authorRobin Appelman <icewind1991@gmail.com>
Mon, 20 Jun 2011 17:04:31 +0000 (19:04 +0200)
committerRobin Appelman <icewind1991@gmail.com>
Mon, 20 Jun 2011 17:04:31 +0000 (19:04 +0200)
lib/MDB2/Driver/sqlite3.php

index a569da187aa40ad4be1cce15191c1da292baa895..3b74afed1466c870e48833be01c28499b8834d47 100644 (file)
@@ -412,7 +412,9 @@ class MDB2_Driver_sqlite3 extends MDB2_Driver_Common
 
         $php_errormsg = '';
                $this->connection = new SQLite3($database_file);
-               $this->connection->busyTimeout(100);
+               if(is_callable(array($this->connection,'busyTimeout'))){//busy timout is only available in php>=5.3
+                       $this->connection->busyTimeout(100);
+               }
         $this->_lasterror = $this->connection->lastErrorMsg();
         if (!$this->connection) {
             return $this->raiseError(MDB2_ERROR_CONNECT_FAILED, null, null,