Closed (fixed)
Project:
Wikitools
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Apr 2009 at 13:20 UTC
Updated:
25 May 2009 at 12:52 UTC
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.
| Comment | File | Size | Author |
|---|---|---|---|
| wikitools-fix-t-usage.patch | 1.17 KB | noelbush |
Comments
Comment #1
noelbush commentedThere is a patch attached here. Any interest in applying it?
Comment #2
cwgordon7 commentedOh, nice catch. Thanks, I'll commit this in the next few minutes.
Comment #3
cwgordon7 commentedCommitted, 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.
Comment #5
sytru commentedI have same issue for Drupal 6. Any patch to solve this?