diff --git a/data/source/http/adapter/CouchDb.php b/data/source/http/adapter/CouchDb.php index 64c43f8fd8..7802d1f5c6 100644 --- a/data/source/http/adapter/CouchDb.php +++ b/data/source/http/adapter/CouchDb.php @@ -117,9 +117,25 @@ public function configureClass($class) { * @param array $params * @return mixed */ - public function __call($method, $params = []) { - list($path, $data, $options) = ($params + ['/', [], []]); - return json_decode($this->connection->{$method}($path, $data, $options)); + + public function __call($method, $params = array()) { + list($path, $data, $options) = ($params + array('/', array(), array())); + $result = $this->connection->{$method}($path, $data, $options); + if (is_array($result)) { + return (object) $result; + } + else if (is_string($result)){ + return json_decode($result); + } + else { + $message = "CouchDB connection returns datatype : ".gettype($result)." . "; + $message .= 'We are unable to handle that.'; + trigger_error($message, E_USER_ERROR); + + + } + + } /** @@ -533,4 +549,4 @@ protected function _format(array $data) { } -?> \ No newline at end of file +?> diff --git a/storage/cache/adapter/Apc.php b/storage/cache/adapter/Apc.php index 0d773210c8..2aae45c8f4 100644 --- a/storage/cache/adapter/Apc.php +++ b/storage/cache/adapter/Apc.php @@ -16,6 +16,7 @@ $message .= 'bootstrap directory to the most recent version or remove the line where '; $message .= 'this file was originally included. '; $message .= 'See https://git.io/voxgh for the most recent version.'; + trigger_error($message, E_USER_DEPRECATED); require_once LITHIUM_LIBRARY_PATH . '/lithium/storage/cache/Adapter.php'; @@ -194,4 +195,4 @@ public static function enabled() { } } -?> \ No newline at end of file +?>