Closed (fixed)
Project:
Global Redirect
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jun 2009 at 11:57 UTC
Updated:
28 Mar 2010 at 16:29 UTC
Jump to comment: Most recent file
Comments
Comment #1
smk-ka commentedYes, this is annoying. Re-rolled patch with nothing else than whitespace fixed, so it's RTBC.
Comment #2
ranza commentedi actually just fixed line 109 by doing if(!isset($options['external'])) {} insted of !$options['e... in language.inc
Comment #3
mrfelton commentedThat sounds like perhaps a patch to core is what is really needed.
Comment #4
smk-ka commentedAgreed, let's try that: language_url_rewrite() should not throw a notice if $options['external'] is not set.
Comment #5
damien tournoud commentedErm. Why not fixing that in Global redirect? You are calling a core function, it's your responsibility to call it correctly.
Comment #6
sunBecause it's bad code? $options['external'] is an optional property.
Comment #7
damien tournoud commentedIt is not, it is set by default in url(), before calling language_url_rewrite().
Comment #8
damien tournoud commentedIt makes zero sense not to fix that in Global redirect first.
Comment #9
mrfelton commentedNothing in http://api.drupal.org/api/function/language_url_rewrite/6 mentions that 'external' is a required option. Surely, just because the parameter is set in url() before the function is called, that doesn't make it a mandatory parameter - that's just the way that url() uses it.
EDIT: Also note that in http://api.drupal.org/api/function/url/6, where the various options are defined (on the language_url_rewrite page it says that the options are the same as for url()) the entire $options array is optional, and
if (!isset($options['external']))is used the check for the presence of the 'external' option.Comment #10
eMPee584 commentedJust installed this module, and with more than 26 kilo users, surely this module will not throw a PHP notice on EVERY page access, right?
Why has the maintainer still not committed this simple fix?
i was just about to submit this patch too.. Surely the check in core's language_url_rewrite should be fixed aswell (as mrfelton rightly stated, the docs don't mention that 'external' is required....) but first and foremost the problem is caused by the globalredirect module...
Comment #11
dave reidFixed in 6.x-1.x and 7.x-1.x. Thanks everyone!
http://drupal.org/cvs?commit=336594
http://drupal.org/cvs?commit=336596
Comment #13
eMPee584 commented(Nice, it also has been fixed in core.)