diff --git a/dibi/dibi.php b/dibi/dibi.php index 874eaf8f..1e544c3f 100644 --- a/dibi/dibi.php +++ b/dibi/dibi.php @@ -14,9 +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/mysqli.php b/dibi/drivers/mysqli.php index 1ac0bca5..b669d321 100644 --- a/dibi/drivers/mysqli.php +++ b/dibi/drivers/mysqli.php @@ -452,7 +452,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; } }