From 3214ebc74a0460b86e6fe6355123d52856c6799d Mon Sep 17 00:00:00 2001
Message-Id: <3214ebc74a0460b86e6fe6355123d52856c6799d.1346778954.git.dmitriy.trt@gmail.com>
From: "Dmitriy.trt" <dmitriy.trt@gmail.com>
Date: Wed, 5 Sep 2012 00:15:49 +0700
Subject: [PATCH] Issue #1774042: Fix recoverable fatal error on redirect

---
 wikitools.module    |    2 +-
 wikitools.pages.inc |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/wikitools.module b/wikitools.module
index c2d81cc..d0b1e53 100644
--- a/wikitools.module
+++ b/wikitools.module
@@ -316,7 +316,7 @@ function wikitools_search_url($title) {
  * @param $title
  *   title to link to
  * @param $query
- *   an optional query string to append to the link
+ *   an optional query array to append to the link
  */
 function wikitools_wikilink_url($title, $query = NULL) {
   $drupal_path = wikitools_wikilink_drupal_path($title);
diff --git a/wikitools.pages.inc b/wikitools.pages.inc
index 486f83a..de3ff29 100644
--- a/wikitools.pages.inc
+++ b/wikitools.pages.inc
@@ -92,7 +92,7 @@ function wikitools_handle_request() {
       }
       if (count($moved_nodes) > 0 && wikitools_auto_redirect() && !isset($_REQUEST['noredirect'])) {
         $node = current($moved_nodes);
-        drupal_set_message(t('Redirected from <a href="@url">%page</a>', array('%page' => $page_name, '@url' => wikitools_wikilink_url($page_name, 'noredirect'))));
+        drupal_set_message(t('Redirected from <a href="@url">%page</a>', array('%page' => $page_name, '@url' => wikitools_wikilink_url($page_name, array('noredirect' => NULL)))));
         drupal_goto("node/$node->nid");
       }
       else if (count($moved_nodes) > 0) {
-- 
1.7.10.4

