Commit 0b360adb authored by Chris Graham's avatar Chris Graham
Browse files

Fixed MANTIS-4837 (main_staff_website_monitoring block now triggers displayed...

Fixed MANTIS-4837 (main_staff_website_monitoring block now triggers displayed deprecation errors on PHP 8.1)
parent 599ccd9c
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ class Block_main_staff_website_monitoring
        $p = array();
        $_url = 'https://www.alexa.com/minisiteinfo/' . urlencode($url);
        $result = http_download_file($_url, null, false, false, 'Composr', null, null, null, null, null, null, null, null, 1.0);
        if ($result !== null) {
            if (preg_match('#([\d,]+)\s*</a>\s*</div>\s*<div class="label">Alexa Traffic Rank#s', $result, $p) != 0) {
                $rank = integer_format(intval($p[1]));
            } else {
@@ -111,6 +112,10 @@ class Block_main_staff_website_monitoring
            } else {
                $links = '0';
            }
        } else {
            $rank = do_lang('NA');
            $links = '0';
        }
        $speed = '?';

        // we would like, but cannot get (without an API key)...