From f931e096ff709eac97f0043b25a87797b08dc299 Mon Sep 17 00:00:00 2001
From: Bob Vincent <bobvin@pillars.net>
Date: Wed, 21 Nov 2012 13:49:27 -0500
Subject: [PATCH] Issue #1279680 by cam8001: watchdog() does not type its
 array arguments.

---
 includes/bootstrap.inc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 74853b2cf55e2d3a0caff0811c537b59a05cdfe8..a5a6ce6e831ee43a478c832a5fc94cace466d646 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -1693,11 +1693,11 @@ function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NO
     // The user object may not exist in all conditions, so 0 is substituted if needed.
     $user_uid = isset($user->uid) ? $user->uid : 0;
 
-    // Prepare the fields to be logged
+    // Prepare the fields to be logged.
     $log_entry = array(
       'type'        => $type,
       'message'     => $message,
-      'variables'   => $variables,
+      'variables'   => isset($variables) ? (array) $variables : NULL,
       'severity'    => $severity,
       'link'        => $link,
       'user'        => $user,
-- 
1.7.10.4

