Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP compatibility fix #42

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions classes/check/dnsnoreply.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ public function get_result() : result {
if ($noreplydomain == $domain) {
$status = result::OK;
$summary = "LMS is same as noreply domain";
} else if (str_contains($domain, '.' . $noreplydomain)) {
} else if (strpos($domain, '.' . $noreplydomain) !== false) {
$status = result::OK;
$summary = "LMS is a subdomain of noreply domain";
} else if (str_contains($noreplydomain, '.' . $domain)) {
} else if (strpos($noreplydomain, '.' . $domain) !== false) {
$status = result::OK;
$summary = "Noreply domain is a subdomain of LMS";
} else if ($noreply == $primarydomain || str_contains($noreplydomain, '.' . $primarydomain)) {
} else if ($noreply == $primarydomain || strpos($noreplydomain, '.' . $primarydomain) !== false) {
$summary = "LMS and noreply domain have a shared domain";
} else {
$summary = "LMS and noreply domain have nothing in common";
Expand Down
6 changes: 3 additions & 3 deletions classes/dns_util.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,13 @@ public function get_selector_suffix($domain = '') {
if ($primarydomain == $noreplydomain) {
// Noreply domain is same as primary domain, add all LMS subdomains.
$suffix = $this->get_subdomains($domain);
} else if (str_contains($domain, '.' . $noreplydomain)) {
} else if (strpos($domain, '.' . $noreplydomain) !== false) {
// Noreply domain includes part of the LMS subdomain, only add different subdomains.
$suffix = str_replace('.' . $noreplydomain, '', $domain);
} else if (str_contains($noreplydomain, '.' . $domain)) {
} else if (strpos($noreplydomain, '.' . $domain) !== false) {
// Noreply domain is a subdomain of LMS, domain already has all info.
$suffix = '';
} else if (str_contains($noreplydomain, '.' . $primarydomain)) {
} else if (strpos($noreplydomain, '.' . $primarydomain) !== false) {
// Noreply domain is a different subdomain of primary domain, add all LMS subdomains.
$suffix = $this->get_subdomains($domain);
} else {
Expand Down
Loading