Modifiche ad aggiunta record DNS
This commit is contained in:
@@ -68,7 +68,22 @@ class DNS implements API
|
||||
|
||||
$this->body = json_decode($user->getBody());
|
||||
|
||||
return $this->body->result;
|
||||
$result = $this->body->result;
|
||||
|
||||
if( !( $result instanceof \stdClass ) ) {
|
||||
$errorMessage = '';
|
||||
|
||||
if( is_array( $result ) ) {
|
||||
$errorMessage.= implode( $result );
|
||||
|
||||
} elseif( is_string( $result ) ) {
|
||||
$errorMessage.= $result;
|
||||
}
|
||||
|
||||
throw new EndpointException( sprintf( 'Unexpected add record result. %s', $errorMessage ) );
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function listRecords(
|
||||
|
||||
Reference in New Issue
Block a user