In includes/theme.inc, theme_links() produces
Notice: Undefined index: query in c:\program files\apache group\apache\htdocs\drupalhead\includes\theme.inc on line 534
Notice: Undefined index: fragment in c:\program files\apache group\apache\htdocs\drupalhead\includes\theme.inc on line 534
The offending line:
$output .= l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment']);
may be called with $link['query'] and/or $link['fragment'] unset. (Maybe also attributes too?). The link function l() defaults to NULL if query and fragment are not supplied (which is luckily what you get from an undefined value anyway), so we can fix this without changing the logic to:
$output .= l($link['title'], $link['href'], $link['attributes'], isset($link['query']) ? $link['query'] : NULL,
isset($link['fragment']) ? $link['fragment'] : NULL);
The attached patch fixes this line. Mark.
PS I hope these are useful, but do stop me if this is becoming silly...
Comment | File | Size | Author |
---|---|---|---|
#3 | theme-links-notice_0.patch | 813 bytes | webchick |
theme.inc_13.patch | 869 bytes | plumbley | |
Comments
Comment #1
beginner CreditAttribution: beginner commentedI cannot test this patch because of non-standard line endings.
Please provide a patch with Unix line endings as per guidelines: http://drupal.org/patch .
Comment #2
beginner CreditAttribution: beginner commentedComment #3
webchickHere's another version. I chose to initialize those variables before that line for readability.
Comment #4
drummCommitted to HEAD. I went with NULL instead of '' to match the default arguments for l().
Comment #5
(not verified) CreditAttribution: commented