Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jul 2009 at 17:57 UTC
Updated:
9 Nov 2009 at 18:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
damien tournoud commentedMore precisely, this patch *hides* the problem. Please find why element_children() is bumping into a string where it should find an array. That's probably due to something like this:
instead of
Comment #2
tic2000 commentedNo. In that case $key[0] would be 't' and no notice would be thrown.
Comment #3
tic2000 commentedThe problem comes from this
in system_theme_select_form().
And now that I look at that code I see an usability problem too. A user can't select a default theme to be his default theme. If the site's default theme changes his theme changes too, even if he actually selected a certain theme (which happen to be the default theme of the site at that time).
Now, do we solve the initial problem? I know drupal doesn't babysits broken code, but I don't know if using an array with an empty key qualifies as broken code.
For the usability problem, I think that theme selection form on user edit page should have an option "Use default theme" which should use 'use_default_theme' as $key to avoid the Notice message.
Comment #4
damien tournoud commentedThe empty string is not really a valid key. If you do want to hide that under the carpet, you would at least need to use
strlen($key) > 0.I believe we still need to fix the root issue.
Comment #5
damien tournoud commentedComment #6
tic2000 commentedThis patch treats the root of problem instead of just making it shut up.
Comment #8
tic2000 commentedLets see if this one passes.
Comment #9
damien tournoud commentedI'm not sure I understand this one right, why does an empty string key in a
#options(which is perfectly valid) causes notices in element_children()? This sounds weird.Comment #10
tic2000 commentedBecause element_child() does an foreach $key => $value and inside that does a $key[0] which should get the first character of the string, but if there is no string in throws a Notice.
Why is element_child() called on that is above my expertise right now.
Edit: I opened #517662: Can't select site's default theme as user's theme for the usability problem.
Comment #11
tic2000 commentedFix to the title :)
Comment #13
deekayen commentedcore was broken
Comment #14
aaronbaumanper-user configurable themes removed from core.
renders this issue moot.
see #292253: Remove the per-user themes selection from core and http://drupal.org/node/517662#comment-1900532
Comment #15
aaronbauman