contao/core — pull request #5358 by fbender (2013-02-12 22:49:25+00:00)
Title: Fix: cacheMode == browser always prohibits caching ($intCache is always null)

In Contao 2.11.9, [FrontendTemplate.php, Ll. 132](https://github.com/contao/core/blob/2.11.9/system/modules/frontend/FrontendTemplate.php#L132), `$intCache` is initialized to `null`. The `if` block starting in line 135 fails with `$GLOBALS['TL_CONFIG']['cacheMode'] = 'browser'`.

The check in [FrontendTemplate.php, Ll. 171](https://github.com/contao/core/blob/2.11.9/system/modules/frontend/FrontendTemplate.php#L171) then always fails because `$intCache == null;`. Thus, Contao always prohibits client side caching in said conditions.

This commit fixes the bug by replacing the checked for variable and also where this variable was used for setting the cache time. I tested the fix on a live system, all looking good. Pull Request for Contao 3.x coming up.