From b0cc80dd753dafbf2231c2b68fbb6acc2d73493a Mon Sep 17 00:00:00 2001 From: Daryle Dale De Silva Date: Tue, 31 Mar 2020 12:20:26 +0800 Subject: [PATCH] fix Undefined property: stdClass::$is_valid in src/MailgunValidator.php - fixes https://github.com/overint/php-mailgun-validation/issues/6 --- src/MailgunValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MailgunValidator.php b/src/MailgunValidator.php index af3a34a..4e4d1b7 100644 --- a/src/MailgunValidator.php +++ b/src/MailgunValidator.php @@ -58,7 +58,7 @@ private function queryMailgun($email) public function validate($email) { $ret = $this->queryMailgun($email); - return $ret->is_valid === true && $ret->mailbox_verification !== false; + return property_exists($ret, 'is_valid') && $ret->is_valid === true && $ret->mailbox_verification !== false; } /**