Make sure hash_hmac() always works even if no secret key

Otherwise a fatal error is possible.

Change-Id: Icda96bac3e75f424be068cdad30ad618b503a8e1
This commit is contained in:
kaldari 2015-02-27 14:40:29 -08:00
parent 320cecf244
commit db1866da41

View file

@ -97,7 +97,7 @@ class TemplateParser {
// Fetch a secret key for building a keyed hash of the PHP code
$config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
$secretKey = $config->get( 'SecretKey' );
$secretKey = $config->get( 'SecretKey' ) ? : 'key';
// See if the compiled PHP code is stored in cache.
// CACHE_ACCEL throws an exception if no suitable object cache is present, so fall