Skip to content

Conversation

@bechir
Copy link
Contributor

@bechir bechir commented Dec 26, 2020

When I'm not connected to internet and I try to test my code with PHPUnit, I got this error:

Invalid argument supplied for foreach() ... cleantalk/php-antispam/lib/Cleantalk.php:450

$servers = $this->get_servers_ip($url_host);
// Loop until find work server
foreach ($servers as $server) {

*/
private function get_servers_ip($host)
{
if (!isset($host))
return null;
$servers = array();

The error is not handle, so this PR fix that issue

@Glomberg Glomberg merged commit 4029f1b into CleanTalk:master Jan 21, 2021
@Glomberg
Copy link
Member

Approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants