diff --git a/app/Console/Commands/SetCameraData.php b/app/Console/Commands/SetCameraData.php index 5478a25..604549f 100644 --- a/app/Console/Commands/SetCameraData.php +++ b/app/Console/Commands/SetCameraData.php @@ -83,10 +83,10 @@ class SetCameraData extends Command } if ($response) { $resData = json_decode($response, true); - if ($resData['error'] < 1) { + if (isset($resData['error']) && $resData['error'] < 1) { $body = $resData['body']; } else { - echo $resData['message']; + echo $resData['message'] ?? ''; exit; } // 通过设备信息获取设备状态