ezsystems/ezpublish — pull request #425 by dpobel (2012-09-06 13:44:36+00:00)
Title: Fixed #019502: If a compiled template does not execute succesfully, view cache and cache-blocks should not be generated

Bug: http://issues.ez.no/19502 (initially created by @gggeek in a project issue tracker)

Description
===========
From Gaetano's issue, it happens that the execution of a compiled template fails (rarely but it happens, it's probably related to a weird configuration and/or bug in APC). In such case, the execution of the template returns an empty string and then the caches where the result of the template is supposed to be are corrupted.

To avoid this, this patch makes eZ Publish throw an exception in such (rare) case where the template execution fails.
To be honest, I'm not sure whether we should implement something against this situation and implement it like this, so your opinion is very welcome on this :-)

Tests
=====
Tested by hacking some compiled templates to simulate the bad template execution issue.