/execute in a command block is performing in-line command from the command block instead of the selected entity/item
execute @e[type=zombie,tag=Bob] ~ ~ ~ testfor @p[r=2]
When near Bob, nothing happens. When near command block (repeat, unconditional, always on) achieves output.
Thank you for your report!
However, this issue has been closed as a Duplicate of MC-117319.
It has been linked to this report. If you have additional information, please add it to that report.
Please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki