From 3a6dc07da8d35da658eb49c06a4837c5cfd182c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radovan=20Kep=C3=A1k?= Date: Tue, 9 Aug 2016 22:36:44 +0200 Subject: [PATCH] FirebirdDriver: Fixed DriverException throw (#231) Fixed fetch Dibi\DriverException throw and more PHP warnings silenced --- src/Dibi/Drivers/FirebirdDriver.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Dibi/Drivers/FirebirdDriver.php b/src/Dibi/Drivers/FirebirdDriver.php index a5c336f4..3c44d268 100644 --- a/src/Dibi/Drivers/FirebirdDriver.php +++ b/src/Dibi/Drivers/FirebirdDriver.php @@ -78,9 +78,9 @@ class FirebirdDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector ]; if (empty($config['persistent'])) { - $this->connection = ibase_connect($config['database'], $config['username'], $config['password'], $config['charset'], $config['buffers']); // intentionally @ + $this->connection = @ibase_connect($config['database'], $config['username'], $config['password'], $config['charset'], $config['buffers']); // intentionally @ } else { - $this->connection = ibase_pconnect($config['database'], $config['username'], $config['password'], $config['charset'], $config['buffers']); // intentionally @ + $this->connection = @ibase_pconnect($config['database'], $config['username'], $config['password'], $config['charset'], $config['buffers']); // intentionally @ } if (!is_resource($this->connection)) { @@ -378,7 +378,7 @@ class FirebirdDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector throw new Dibi\ProcedureException($match[3], $match[1], $match[2]); } else { - throw new Dibi\DriverException($msg, ibase_errcode()); + throw new Dibi\DriverException(ibase_errmsg(), ibase_errcode()); } }