Procházet zdrojové kódy

fix callback json_decode return false error

stanley-king před 3 roky
rodič
revize
c9bf8c70be
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1 1
      mobile/callback/refill_hangtong.php
  2. 1 1
      mobile/mobile_run.php

+ 1 - 1
mobile/callback/refill_hangtong.php

@@ -2,7 +2,7 @@
 
 $content = $_SERVER['post_content'];
 
-$inputs = json_decode($content,true);
+$inputs = json_decode($content,true) ?? [];
 foreach ($inputs as $input) {
     refill\util::push_notify('hangtong',$input);
 }

+ 1 - 1
mobile/mobile_run.php

@@ -40,7 +40,7 @@ require_once(BASE_HELPER_PATH . '/refill/util.php');
 
 
 function all_channels() {
-    return ['ch_index','activity','goods','refill'];
+    return ['ch_index','activity','goods'];
 }
 
 Base::mobile_init();