This commit is contained in:
Javier Casares 2026-06-09 12:48:19 +00:00
commit ed5c696fbe

View file

@ -29,7 +29,7 @@ class SMTP_Diagnostics_Client extends SMTP {
* @param string $command_string Full command string.
* @param array<int,int> $expected_codes Expected success codes.
*
* @return array<string, mixed>
* @return array{success: bool, reply: string, timed_out: bool}
*/
public function execute_command( string $name, string $command_string, array $expected_codes = array( 250 ) ): array {
$this->last_command_timed_out = false;
@ -97,7 +97,8 @@ class SMTP_Diagnostics_Client extends SMTP {
continue;
}
$value = (string) $error[ $key ];
$raw_value = $error[ $key ];
$value = is_string( $raw_value ) ? $raw_value : '';
if ( false !== stripos( $value, 'timed out' ) || false !== stripos( $value, 'timed-out' ) ) {
return true;