From 7f0e1d96cef22d4050aa3baa682313a4d5a59497 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 12 Dec 2021 13:39:04 +0000 Subject: [PATCH] fix error in editting config --- platform/Replit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/Replit.php b/platform/Replit.php index e8134e0..572c150 100644 --- a/platform/Replit.php +++ b/platform/Replit.php @@ -152,7 +152,7 @@ function setConfig($arr, $disktag = '') foreach ($tmp as $key => $val) { if (!!$val) $response = ReplitAPI('w', $key, $val); else $response = ReplitAPI('d', $key); - if (api_error($response)) return ['stat'=>500, 'body'=>$response['body']]; + if (api_error($response)) return ['stat'=>$response['stat'], 'body'=>$response['body'] . "
\nError in writting " . $key . "=" . $val]; } //error_log1(json_encode($arr, JSON_PRETTY_PRINT) . ' => tmp:' . json_encode($tmp, JSON_PRETTY_PRINT)); return $response; @@ -286,7 +286,7 @@ function ConfigWriteable() function api_error($response) { - return !($response['stat']==200||$response['stat']==204); + return !($response['stat']==200||$response['stat']==204||$response['stat']==404); //return isset($response['message']); }