From be3a0aa57dda3a1c4a55080d4ca343bc1cb9bee6 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sat, 22 Jul 2017 00:34:44 +0200 Subject: [PATCH] __toString() returns always string --- src/Dibi/DataSource.php | 1 + src/Dibi/Fluent.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Dibi/DataSource.php b/src/Dibi/DataSource.php index 473222d5..de0a4c89 100644 --- a/src/Dibi/DataSource.php +++ b/src/Dibi/DataSource.php @@ -267,6 +267,7 @@ FROM %SQL', $this->sql, ' ); } catch (\Exception $e) { trigger_error($e->getMessage(), E_USER_ERROR); + return ''; } } diff --git a/src/Dibi/Fluent.php b/src/Dibi/Fluent.php index 40a7724a..cc0f0805 100644 --- a/src/Dibi/Fluent.php +++ b/src/Dibi/Fluent.php @@ -449,6 +449,7 @@ class Fluent implements IDataSource return $this->connection->translate($this->_export()); } catch (\Exception $e) { trigger_error($e->getMessage(), E_USER_ERROR); + return ''; } }