From 63ec20d9f1eccb3f736798781c0274a9bde7a037 Mon Sep 17 00:00:00 2001 From: drigato Date: Mon, 3 Feb 2014 12:33:35 -0500 Subject: [PATCH] CC-5681: I18N: Fail to switch language Check if Zend_Auth class exists with the autoloader --- airtime_mvc/application/models/Preference.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 96ee08609..0bc4fc7ac 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -7,8 +7,9 @@ class Application_Model_Preference private static function getUserId() { - //called from a daemon process - if (!class_exists("Zend_Auth", false) || !Zend_Auth::getInstance()->hasIdentity()) { + //pass in true so the check is made with the autoloader + //we need this check because saas calls this function from outside Zend + if (!class_exists("Zend_Auth", true) || !Zend_Auth::getInstance()->hasIdentity()) { $userId = null; } else {