Skip to content

Commit

Permalink
getStatus returns false fix #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Vítězslav Dvořák committed May 18, 2023
1 parent c9cd6da commit f812ede
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mServer/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* PHPmServer - Client Class
*
* @author Vítězslav Dvořák <[email protected]>
* @copyright (C) 2020 Vitex Software
* @copyright (C) 2020,2023 Vitex Software
*/

namespace mServer;
Expand Down Expand Up @@ -448,7 +448,7 @@ public function processResponse($httpCode) {
public function getStatus() {
$this->responseStats = [];
$this->errors = [];
return ($this->doCurlRequest($this->url . '/status','POST') == 200) && $this->lastCurlResponse == 'Response from POHODA mServer';
return ($this->doCurlRequest($this->url . '/status','POST') === 200) && str_contains($this->lastCurlResponse, 'Response from POHODA mServer');
}

/**
Expand All @@ -465,7 +465,7 @@ public function takeData($data, $reset = false) {
/**
* Create Agenda document using given data
*
* @param Array $data
* @param array $data
*/
public function create($data) {
$this->requestXml = $this->pohoda->create($data);
Expand Down

0 comments on commit f812ede

Please sign in to comment.