diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/DBLogResource.php b/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/DBLogResource.php index 215e2f8733cac11d7899a5058db67b0419f943d6..d6219f994c491c7be3bc662fedab5c36ae47d901 100644 --- a/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/DBLogResource.php +++ b/core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/DBLogResource.php @@ -48,9 +48,9 @@ public function routes() { public function get($id = NULL) { if ($id) { $record = db_query("SELECT * FROM {watchdog} WHERE wid = :wid", array(':wid' => $id)) - ->fetchObject(); + ->fetchAssoc(); if (!empty($record)) { - return new ResourceResponse((array) $record); + return new ResourceResponse($record); } } throw new NotFoundHttpException(t('Log entry with ID @id was not found', array('@id' => $id)));