Suppose a host is linked to two templates, T1 and T2. T1 has item with key K. Frontend allows to create an item with the same key K in template T2.
Suppose a host is linked to two templates, T1 and T2. T1 has application with name N. If a user tries to create an application with the same name N in template T2, the frontend will complain, which is good. However, when the user presses "Cancel", frontend gives fatal error:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 6 bytes) in /home/zabbix/1.8/frontends/php/include/db.inc.php on line 544