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 215e2f8733ca..d6219f994c49 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 @@ class DBLogResource extends ResourceBase { 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)));