瀏覽代碼

bug fixed

urbanu619 9 月之前
父節點
當前提交
a28ddc4840
共有 3 個文件被更改,包括 9 次插入5 次删除
  1. 3 1
      web/PhalApi/Common/functions.php
  2. 3 3
      web/app/admin/controller/LiveingController.php
  3. 3 1
      web/app/redis.php

+ 3 - 1
web/PhalApi/Common/functions.php

@@ -15,7 +15,9 @@
 		$REDIS_PORT= DI()->config->get('app.REDIS_PORT');
 		$redis = new Redis();
 		$redis -> pconnect($REDIS_HOST,$REDIS_PORT);
-		$redis -> auth($REDIS_AUTH);
+		if (strlen($REDIS_AUTH)>0){
+		    $redis -> auth($REDIS_AUTH);
+        }
 
 		return $redis;
 	}

+ 3 - 3
web/app/admin/controller/LiveingController.php

@@ -443,7 +443,7 @@ class LiveingController extends AdminbaseController {
         $domain = $this->pushDomain;
         $key    = $this->pushKey;
 
-        $txTime = strtoupper( base_convert( strtotime( $time ), 10, 16 ) );
+        $txTime = strtoupper( base_convert( $time, 10, 16 ) );
         //txSecret = MD5( KEY + streamName + txTime )
         $txSecret = md5( $key . $streamName . $txTime );
         return "?" . http_build_query( array(
@@ -454,12 +454,12 @@ class LiveingController extends AdminbaseController {
     }
 
 
-    public function getPullUrl( $appName, $streamName, $time )
+    public function getPullUrl( $appName, $streamName, $time ): array
     {
         $domain = $this->pullDomain;
         $key    = $this->pullKey;
 
-        $txTime = strtoupper( base_convert( strtotime( $time ), 10, 16 ) );
+        $txTime = strtoupper( base_convert( $time , 10, 16 ) );
         //txSecret = MD5( KEY + streamName + txTime )
         $txSecret   = md5( $key . $streamName . $txTime );
         $build_data = [

+ 3 - 1
web/app/redis.php

@@ -17,7 +17,9 @@ function connectionRedis(){
         $REDIS_PORT= config('database.REDIS_PORT');
         $redis = new \Redis();
         $redis -> connect($REDIS_HOST,$REDIS_PORT);
-        $redis -> auth($REDIS_AUTH);
+        if (strlen($REDIS_AUTH)>0){
+            $redis -> auth($REDIS_AUTH);
+        }
 
         $GLOBALS['redisdb']=$redis;        
     }