Hi!
I've got an error in Flag module with the 8.x-4.x-dev version.
Notice: Undefined index: tags in flag_entity_view() (line 326 of modules/contrib/flag/flag.module).
I see that the code is using $build['#cache']['tags'], but sometimes cache tags are not present.
I don't know if it would be initialized or be avoided.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | cache-tags_2758445_6.patch | 532 bytes | isholgueras |
| #4 | cache-tags_2758445_4.patch | 552 bytes | isholgueras |
| #2 | cache-tags_2758445_2.patch | 697 bytes | isholgueras |
Comments
Comment #2
isholgueras commentedI made a patch avoiding the sentence if
$build['#cache']['tags']is not present.Comment #3
berdirThe correct fix would be to initialize tags to an empty array in that case.
Comment #4
isholgueras commentedSure,
Here is the patch initializing
$build['#cache']['tags']if it's empty.Comment #7
isholgueras commentedWrong patch path. Here is the correct one.
Comment #8
isholgueras commentedComment #9
martin107 commentedgo go testbot.Sorry both of use moved the status to needs review - almost at the same moment.
Comment #12
berdirLooks fine to me.
Comment #14
socketwench commentedThanks!