Authorization Cache to use both boolean and string in configuration

- both true and 'true' will enable authorization cache
This commit is contained in:
japatel
2014-12-22 14:13:08 -06:00
parent f03c2f893c
commit 9e7cb951a6
2 changed files with 2 additions and 2 deletions

View File

@@ -85,7 +85,7 @@ abstract class AuthorizationCache
$config = ($config && is_array($config)) ? $config : PayPalConfigManager::getInstance()->getConfigHashmap();
if (array_key_exists("cache.enabled", $config)) {
$value = $config['cache.enabled'];
return (trim($value) == 'true') ? true : false;
return (trim($value) == true || trim($value) == 'true') ? true : false;
}
return false;
}