On line 195
$allowed_nodes = variable_get('block_edit_content_types', array_keys(node_get_types('names')));
returns following array:
array(
0 (String, 4 characters ) news
1 (String, 4 characters ) page
);
The check after that with $allowed_nodes[$node->type] !== $node->type will always fail.
Saving the configuration screen makes it work since the array_keys will return 'node_type_key' => 'node_type_key' .
This is pretty minor of course, however. Maybe it might be better to return with an empty array as the default value - or another solution.
Comments
Comment #1
psynaptic commentedAhh, I see.
How about this?
Comment #2
psynaptic commentedI have committed this to dev if you'd like to try it out. Can always revert it if you think there is a problem with it.
Thanks so much for the bug report.
Comment #3
psynaptic commentedI think it's fixed. Without anyone to confirm I'm marking as fixed.