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.

Comments

Anonymous’s picture

Version: 6.x-dev » 7.x-dev
Status: Needs review » Needs work

This should be patched in HEAD first but you need to keep the !$array['configurable'] so it should read

if (empty($array['configurable']) || !$array['configurable']) {
  ...
}
dave reid’s picture

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.

eMPee584’s picture

regarding the first comment, if i get it correctly, empty($foo) equals !isset($foo) || !$foo so that's redundant..
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 ^^

Anonymous’s picture

You're correct. Forgive the noise.

dave reid’s picture

Status: Needs work » Closed (works as designed)

I'll mark this as 'by design' then.