From f0aee215cd1317c72f362bca80aeff23db8bc8d6 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Sun, 12 May 2013 18:50:04 +0100 Subject: [PATCH] Issue #1987196 by klausi: Simplify dblog REST resource. --- .../lib/Drupal/rest/Plugin/rest/resource/DBLogResource.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 @@ 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))); -- GitLab