Huh, finally i figured out when this error happens.
How to reproduce:
1. Go to any host's (or template's) discovery rules list. (browser link is .../zabbix/host_discovery.php?&hostid=10049&sid=ca25439a4affe60f)
2. Click to the user Profile link.
3. Click to Cancel (or Ok).
4. See error - picture is attached (browser link is .../zabbix/host_discovery.php)
p.s. meh, when i finished to prepare this issue report, i found a similar one
ZBX-3435. Sorry for the partially duplicate, but i planned to click "Create" button