actions.inc: Undefined index: configurable on line 267
eMPee584 - October 13, 2008 - 16:16
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | base system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | by design |
Jump to:
Description
At least the user_stats and the backup_migrate modules give an action array as parameter without the index 'configurable' set. Replacing the boolean comparision with empty fixes the php errors caused by this.
| Attachment | Size |
|---|---|
| actions-fix-undefined-index-configurable.patch | 612 bytes |

#1
This should be patched in HEAD first but you need to keep the !$array['configurable'] so it should read
<?phpif (empty($array['configurable']) || !$array['configurable']) {
...
}
?>
#2
According to the API docs (http://api.drupal.org/api/function/hook_action_info/7), 'configurable': (required). We should not be doing this check for incorrect implementations. Or correct the api docs that the parameter is not required.
#3
regarding the first comment, if i get it correctly,
<?phpempty($foo)
?>
<?php!isset($foo) || !$foo
?>
anyways thx dave for looking it up you're definitly right i will redirect appropiate one-liners to the violating modules... right after some sleep ^^
#4
You're correct. Forgive the noise.
#5
I'll mark this as 'by design' then.