Explorar o código

fix thread in php-fpm error.

stanley-king %!s(int64=4) %!d(string=hai) anos
pai
achega
b2fb778aa3
Modificáronse 1 ficheiros con 11 adicións e 6 borrados
  1. 11 6
      helper/refill/RefillFactory.php

+ 11 - 6
helper/refill/RefillFactory.php

@@ -6,9 +6,6 @@ namespace refill;
 require_once(BASE_HELPER_PATH . '/mtopcard/mtopcard.php');
 require_once(BASE_HELPER_PATH . '/rbridge/RBridgeFactory.php');
 
-require_once(BASE_ROOT_PATH . '/helper/message/msgutil.php');
-require_once(BASE_ROOT_PATH . '/helper/message/subscriber.php');
-
 require_once(BASE_HELPER_PATH . '/refill/IRefill.php');
 require_once(BASE_HELPER_PATH . '/refill/IRefillOil.php');
 require_once(BASE_HELPER_PATH . '/refill/IRefillPhone.php');
@@ -91,10 +88,15 @@ class RefillFactory
             self::$stInstance = new RefillFactory();
         }
 
-        if(StatesHelper::fetch_state('channel')) {
-            Log::record("RefillFactory reload channel config.",Log::DEBUG);
-            self::$stInstance->load();
+        if(defined('MOBILE_SERVER') && MOBILE_SERVER === true)
+        {
+            if(StatesHelper::fetch_state('channel')) {
+                Log::record("RefillFactory reload channel config.",Log::DEBUG);
+                self::$stInstance->load();
+            }
         }
+
+
         return self::$stInstance;
     }
 
@@ -104,6 +106,9 @@ class RefillFactory
 
     private function __construct()
     {
+        if (!defined('MOBILE_SERVER') || MOBILE_SERVER === false) {
+            $this->load();
+        }
     }
 
     public function goods()