From d5c68d176117c81ac8620046f7fe9c89406de4e4 Mon Sep 17 00:00:00 2001 From: RainLoop Team Date: Thu, 13 Nov 2014 02:59:23 +0400 Subject: [PATCH] Small fixes --- rainloop/v/0.0.0/app/src/RainLoop/Actions.php | 29 ++++++++++++------- .../app/src/RainLoop/Common/PdoAbstract.php | 5 ++++ 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/rainloop/v/0.0.0/app/src/RainLoop/Actions.php b/rainloop/v/0.0.0/app/src/RainLoop/Actions.php index c734ed02d..e682b8f71 100644 --- a/rainloop/v/0.0.0/app/src/RainLoop/Actions.php +++ b/rainloop/v/0.0.0/app/src/RainLoop/Actions.php @@ -292,7 +292,7 @@ class Actions { $this->KeenIO('Install'); } - catch (\Exception $oException) {} + catch (\Exception $oException) { unset($oException); } } } @@ -5767,20 +5767,27 @@ class Actions if ($iLimit > \count($aResult) && 0 < \strlen($sQuery)) { - // Address Book - $oAddressBookProvider = $this->AddressBookProvider($oAccount); - if ($oAddressBookProvider && $oAddressBookProvider->IsActive()) + try { - $aSuggestions = $oAddressBookProvider->GetSuggestions($oAccount->ParentEmailHelper(), $sQuery, $iLimit); - if (0 === \count($aResult)) + // Address Book + $oAddressBookProvider = $this->AddressBookProvider($oAccount); + if ($oAddressBookProvider && $oAddressBookProvider->IsActive()) { - $aResult = $aSuggestions; - } - else - { - $aResult = \array_merge($aResult, $aSuggestions); + $aSuggestions = $oAddressBookProvider->GetSuggestions($oAccount->ParentEmailHelper(), $sQuery, $iLimit); + if (0 === \count($aResult)) + { + $aResult = $aSuggestions; + } + else + { + $aResult = \array_merge($aResult, $aSuggestions); + } } } + catch (\Exception $oException) + { + $this->Logger()->WriteException($oException); + } } if ($iLimit < \count($aResult)) diff --git a/rainloop/v/0.0.0/app/src/RainLoop/Common/PdoAbstract.php b/rainloop/v/0.0.0/app/src/RainLoop/Common/PdoAbstract.php index d65be939d..36dac7f96 100644 --- a/rainloop/v/0.0.0/app/src/RainLoop/Common/PdoAbstract.php +++ b/rainloop/v/0.0.0/app/src/RainLoop/Common/PdoAbstract.php @@ -72,6 +72,11 @@ abstract class PdoAbstract throw new \Exception('Unknown PDO SQL connection type'); } + if (empty($sDsn)) + { + throw new \Exception('Empty PDO DSN configuration'); + } + $this->sDbType = $sType; $oPdo = false;