From 7aad1b9aecb06326b86af8409b30a375f2d34c6a Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 31 Jan 2017 13:09:41 +0000 Subject: [PATCH] Fix unnoticed API Errors --- lib/LanWebsite/UserManager/Lsucs.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/LanWebsite/UserManager/Lsucs.php b/lib/LanWebsite/UserManager/Lsucs.php index 24b2923..b4007c4 100644 --- a/lib/LanWebsite/UserManager/Lsucs.php +++ b/lib/LanWebsite/UserManager/Lsucs.php @@ -80,6 +80,10 @@ public function getLsucsAuthResponse($method, $params) { curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); + if ($response === false) { + throw new Exception('Fatal Auth Error. Request to Api Failed'); + } + //Decode response and store $result = json_decode($response, true);