Skip to content

Commit

Permalink
fix: Use property_exists for SimpleXMLElement checks
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst committed Feb 28, 2024
1 parent cb552dc commit 3e8aeec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Service/AutoConfig/IspDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private function queryUrl(string $url, Horde_Mail_Rfc822_Address $email): ?Confi
libxml_use_internal_errors(true);
$data = simplexml_load_string($xml);

if ($data === false || !isset($data->emailProvider)) {
if ($data === false || !property_exists($data, 'emailProvider')) {
$errors = libxml_get_errors();
foreach ($errors as $error) {
$this->logger->debug("ISP DB returned an erroneous XML: " . $error->message);
Expand Down

0 comments on commit 3e8aeec

Please sign in to comment.