Skip to content

Commit a0b164b

Browse files
authored
Make __doRequest compatible with parent (#181)
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.
1 parent ca719c9 commit a0b164b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ public function getInvoiceMarkup($invoiceId, $type)
343343
return $this->_call('GetInvoiceMarkup', array($invoiceMarkup));
344344
}
345345

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

0 commit comments

Comments
 (0)