Skip to content

Commit 434c9b5

Browse files
committed
PHP compatibility fix
1 parent ab6138f commit 434c9b5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

classes/check/dnsnoreply.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ public function get_result() : result {
7979
if ($noreplydomain == $domain) {
8080
$status = result::OK;
8181
$summary = "LMS is same as noreply domain";
82-
} else if (str_contains($domain, '.' . $noreplydomain)) {
82+
} else if (strpos($domain, '.' . $noreplydomain) !== false) {
8383
$status = result::OK;
8484
$summary = "LMS is a subdomain of noreply domain";
85-
} else if (str_contains($noreplydomain, '.' . $domain)) {
85+
} else if (strpos($noreplydomain, '.' . $domain) !== false) {
8686
$status = result::OK;
8787
$summary = "Noreply domain is a subdomain of LMS";
88-
} else if ($noreply == $primarydomain || str_contains($noreplydomain, '.' . $primarydomain)) {
88+
} else if ($noreply == $primarydomain || strpos($noreplydomain, '.' . $primarydomain) !== false) {
8989
$summary = "LMS and noreply domain have a shared domain";
9090
} else {
9191
$summary = "LMS and noreply domain have nothing in common";

classes/dns_util.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,13 @@ public function get_selector_suffix($domain = '') {
276276
if ($primarydomain == $noreplydomain) {
277277
// Noreply domain is same as primary domain, add all LMS subdomains.
278278
$suffix = $this->get_subdomains($domain);
279-
} else if (str_contains($domain, '.' . $noreplydomain)) {
279+
} else if (strpos($domain, '.' . $noreplydomain) !== false) {
280280
// Noreply domain includes part of the LMS subdomain, only add different subdomains.
281281
$suffix = str_replace('.' . $noreplydomain, '', $domain);
282-
} else if (str_contains($noreplydomain, '.' . $domain)) {
282+
} else if (strpos($noreplydomain, '.' . $domain) !== false) {
283283
// Noreply domain is a subdomain of LMS, domain already has all info.
284284
$suffix = '';
285-
} else if (str_contains($noreplydomain, '.' . $primarydomain)) {
285+
} else if (strpos($noreplydomain, '.' . $primarydomain) !== false) {
286286
// Noreply domain is a different subdomain of primary domain, add all LMS subdomains.
287287
$suffix = $this->get_subdomains($domain);
288288
} else {

0 commit comments

Comments
 (0)