Skip to content

Commit 1805725

Browse files
author
Amar Kulo
committed
Added ssl client certificate authentication to the Zabbix server connection.
modified: src/ZabbixApiAbstract.php
1 parent 75783ee commit 1805725

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ZabbixApiAbstract.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ public function request($method, $params=null, $resultArrayKey='', $auth=true)
324324
if (!is_object($this->responseDecoded) && !is_array($this->responseDecoded)) {
325325
throw new Exception('Could not decode JSON response.');
326326
}
327-
dd($this->responseDecoded);
328-
if (array_key_exists('error', $this->responseDecoded)) {
327+
328+
if (isset($this->responseDecoded->error)) {
329329
throw new Exception('API error '.$this->responseDecoded->error->code.': '.$this->responseDecoded->error->data);
330330
}
331331

0 commit comments

Comments
 (0)