diff --git a/admin/tool/httpsreplace/classes/url_finder.php b/admin/tool/httpsreplace/classes/url_finder.php index 18c8e223c2d..8dc141616b9 100644 --- a/admin/tool/httpsreplace/classes/url_finder.php +++ b/admin/tool/httpsreplace/classes/url_finder.php @@ -177,7 +177,7 @@ class url_finder { $regex = '#((src|data)\ *=\ *[\'\"])(http://)([^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))[\'\"]#i'; preg_match_all($regex, $record->$columnname, $match); foreach ($match[0] as $i => $fullmatch) { - if (strpos($fullmatch, $CFG->wwwroot) !== false) { + if (\core_text::strpos($fullmatch, $CFG->wwwroot) !== false) { continue; } $prefix = $match[1][$i]; @@ -189,7 +189,7 @@ class url_finder { } if ($replacing) { // For replace string use: prefix, protocol, host and one extra character. - $found[$prefix . substr($url, 0, strlen($host) + 8)] = $host; + $found[$prefix . \core_text::substr($url, 0, \core_text::strlen($host) + 8)] = $host; } else { $entry["table"] = $table; $entry["columnname"] = $columnname;