Skip to content

Commit

Permalink
Make __doRequest compatible with parent (#181)
Browse files Browse the repository at this point in the history
From the documentation, https://www.php.net/manual/en/soapclient.dorequest.php returned value may be string or null. When this code is running with PHP 8.1 and null is returned the error `PHP Fatal error:  Uncaught TypeError: ATWS\Client::__doRequest(): Return value must be of type string, null returned in /*******/vendor/opendns/autotask-php/src/Client.php:355` occurs.
  • Loading branch information
oliubarskyi authored Apr 25, 2023
1 parent ca719c9 commit a0b164b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public function getInvoiceMarkup($invoiceId, $type)
return $this->_call('GetInvoiceMarkup', array($invoiceMarkup));
}

public function __doRequest($request, $location, $action, $version, $oneWay = 0): string
public function __doRequest($request, $location, $action, $version, $oneWay = 0): ?string
{
if (strpos($action, 'getZoneInfo') === false &&
$this->version >= 1.6 &&
Expand Down

0 comments on commit a0b164b

Please sign in to comment.