Fixing Logging Manager to skip if mode not set

This commit is contained in:
Jay Patel
2015-06-01 13:44:24 -05:00
parent 226922bca3
commit ddefd1d633

View File

@@ -100,7 +100,7 @@ class PayPalLoggingManager
if ($this->isLoggingEnabled) { if ($this->isLoggingEnabled) {
$config = PayPalConfigManager::getInstance()->getConfigHashmap(); $config = PayPalConfigManager::getInstance()->getConfigHashmap();
// Check if logging in live // Check if logging in live
if ($config['mode'] == 'live') { if (array_key_exists('mode', $config) && $config['mode'] == 'live') {
// Live should not have logging level above INFO. // Live should not have logging level above INFO.
if ($this->loggingLevel >= PayPalLoggingLevel::INFO) { if ($this->loggingLevel >= PayPalLoggingLevel::INFO) {
// If it is at Debug Level, throw an warning in the log. // If it is at Debug Level, throw an warning in the log.