From bb8c1afc585387de46a67c838e70ecfd3b5de7c9 Mon Sep 17 00:00:00 2001
From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com>
Date: Thu, 11 Jun 2020 14:22:08 +0800
Subject: [PATCH] fix: Error in install
---
platform/AliyunFC.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/platform/AliyunFC.php b/platform/AliyunFC.php
index f9e13c4..295faf6 100644
--- a/platform/AliyunFC.php
+++ b/platform/AliyunFC.php
@@ -141,7 +141,7 @@ function install()
$AccessKeySecret = $_POST['AccessKeySecret'];
$tmp['AccessKeySecret'] = $AccessKeySecret;
}
- $response = json_decode(SetbaseConfig($tmp, $_SERVER['accountId'], $_SERVER['region'], $_SERVER['service_name'], $_SERVER['function_name'], $AccessKeyID, $AccessKeySecret), true);
+ $response = SetbaseConfig($tmp, $_SERVER['accountId'], $_SERVER['region'], $_SERVER['service_name'], $_SERVER['function_name'], $AccessKeyID, $AccessKeySecret);
if (api_error($response)) {
$html = api_error_msg($response);
$title = 'Error';
@@ -317,7 +317,7 @@ function api_error($response)
function api_error_msg($response)
{
- return $response;
+ return json_encode( $response, JSON_PRETTY_PRINT );
return $response['Error']['Code'] . '
' . $response['Error']['Message'] . '
function_name:' . $_SERVER['function_name'] . '