When trying to access a URL for a non-existent page, which wikitools intercepts to offer the possibility of searching for/creating a page, the following error is displayed:

    * warning: Invalid argument supplied for foreach() in /var/local/drupal5-sites/drupal/includes/common.inc on line 842.
    * warning: strtr() [function.strtr]: The second argument is not an array in /var/local/drupal5-sites/drupal/includes/common.inc on line 857.

This appears to be because, on line 575 of wikitools.module, the t() function is used with a plain string as the second argument, instead of an array, which is what t() expects. Looking through the code, I found a couple more places where this is also the case. So the attached patch fixes the issue.

CommentFileSizeAuthor
wikitools-fix-t-usage.patch1.17 KBnoelbush

Comments

noelbush’s picture

Status: Active » Needs review

There is a patch attached here. Any interest in applying it?

cwgordon7’s picture

Status: Needs review » Reviewed & tested by the community

Oh, nice catch. Thanks, I'll commit this in the next few minutes.

cwgordon7’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks. I highly appreciate the patch. The code should become available in the development version as soon as the tarball regenerates. I'm not comfortable creating a new release until there has been further testing of the branch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sytru’s picture

Version: 5.x-1.3 » 6.x-1.1

I have same issue for Drupal 6. Any patch to solve this?