From d75e605645f6e8ded2ee1f6abd6668585b93d901 Mon Sep 17 00:00:00 2001 From: Ondrej Brablc Date: Thu, 20 Feb 2014 18:47:35 +0100 Subject: [PATCH] Avoid error handler invocation --- dibi/dibi.php | 2 -- dibi/drivers/DibiMySqliDriver.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dibi/dibi.php b/dibi/dibi.php index 6ecd18e5..a407978a 100644 --- a/dibi/dibi.php +++ b/dibi/dibi.php @@ -14,8 +14,6 @@ if (version_compare(PHP_VERSION, '5.2.0', '<')) { throw new Exception('dibi needs PHP 5.2.0 or newer.'); } -@set_magic_quotes_runtime(FALSE); // intentionally @ - require_once dirname(__FILE__) . '/libs/interfaces.php'; require_once dirname(__FILE__) . '/libs/DibiDateTime.php'; diff --git a/dibi/drivers/DibiMySqliDriver.php b/dibi/drivers/DibiMySqliDriver.php index 4b89e600..4aafbf1f 100644 --- a/dibi/drivers/DibiMySqliDriver.php +++ b/dibi/drivers/DibiMySqliDriver.php @@ -457,7 +457,7 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver, IDibiResultDri public function getResultResource() { $this->autoFree = FALSE; - return @$this->resultSet->type === NULL ? NULL : $this->resultSet; + return $this->resultSet === NULL || $this->resultSet->type === NULL ? NULL : $this->resultSet; } }