TypeError
array_map(): Argument #2 ($array) must be of type array, bool given TypeError thrown with message "array_map(): Argument #2 ($array) must be of type array, bool given" Stacktrace: #43 TypeError in /var/www/vhosts/buyahomemallorca.com/httpdocs/user/plugins/bah-tools/vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php:2002 #42 array_map in /var/www/vhosts/buyahomemallorca.com/httpdocs/user/plugins/bah-tools/vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php:2002 #41 TCPDF_FONTS:UTF8StringToArray in /var/www/vhosts/buyahomemallorca.com/httpdocs/user/plugins/bah-tools/vendor/tecnickcom/tcpdf/tcpdf.php:6337 #40 TCPDF:Write in /var/www/vhosts/buyahomemallorca.com/httpdocs/user/plugins/bah-tools/vendor/tecnickcom/tcpdf/tcpdf.php:5914 #39 TCPDF:MultiCell in /var/www/vhosts/buyahomemallorca.com/httpdocs/user/plugins/bah-tools/classes/PDF.php:118 #38 Grav\Plugin\BahTools\PDF:Generate in /var/www/vhosts/buyahomemallorca.com/httpdocs/user/plugins/bah-tools/bah-tools.php:635 #37 Grav\Plugin\BAHToolsPlugin:onPagesInitialized in /var/www/vhosts/buyahomemallorca.com/httpdocs/vendor/symfony/event-dispatcher/EventDispatcher.php:264 #36 Symfony\Component\EventDispatcher\EventDispatcher:doDispatch in /var/www/vhosts/buyahomemallorca.com/httpdocs/vendor/symfony/event-dispatcher/EventDispatcher.php:239 #35 Symfony\Component\EventDispatcher\EventDispatcher:callListeners in /var/www/vhosts/buyahomemallorca.com/httpdocs/vendor/symfony/event-dispatcher/EventDispatcher.php:73 #34 Symfony\Component\EventDispatcher\EventDispatcher:dispatch in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Grav.php:550 #33 Grav\Common\Grav:fireEvent in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/PagesProcessor.php:43 #32 Grav\Common\Processors\PagesProcessor:process in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #31 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #30 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/TwigProcessor.php:38 #29 Grav\Common\Processors\TwigProcessor:process in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #28 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #27 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/AssetsProcessor.php:39 #26 Grav\Common\Processors\AssetsProcessor:process in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #25 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #24 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/SchedulerProcessor.php:40 #23 Grav\Common\Processors\SchedulerProcessor:process in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #22 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #21 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/BackupsProcessor.php:39 #20 Grav\Common\Processors\BackupsProcessor:process in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #19 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #18 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/TasksProcessor.php:69 #17 Grav\Common\Processors\TasksProcessor:process in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #16 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #15 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/RequestProcessor.php:63 #14 Grav\Common\Processors\RequestProcessor:process in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #13 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #12 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/ThemesProcessor.php:38 #11 Grav\Common\Processors\ThemesProcessor:process in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #10 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #9 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/PluginsProcessor.php:39 #8 Grav\Common\Processors\PluginsProcessor:process in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #7 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #6 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/InitializeProcessor.php:129 #5 Grav\Common\Processors\InitializeProcessor:Grav\Common\Processors\{closure} in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Debugger.php:546 #4 Grav\Common\Debugger:profile in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/InitializeProcessor.php:130 #3 Grav\Common\Processors\InitializeProcessor:process in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #2 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #1 Grav\Framework\RequestHandler\RequestHandler:handle in /var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Grav.php:295 #0 Grav\Common\Grav:process in /var/www/vhosts/buyahomemallorca.com/httpdocs/index.php:58
Stack frames (44)
43
TypeError
/user/plugins/bah-tools/vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php2002
42
array_map
/user/plugins/bah-tools/vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php2002
41
TCPDF_FONTS UTF8StringToArray
/user/plugins/bah-tools/vendor/tecnickcom/tcpdf/tcpdf.php6337
40
TCPDF Write
/user/plugins/bah-tools/vendor/tecnickcom/tcpdf/tcpdf.php5914
39
TCPDF MultiCell
/user/plugins/bah-tools/classes/PDF.php118
38
Grav\Plugin\BahTools\PDF Generate
/user/plugins/bah-tools/bah-tools.php635
37
Grav\Plugin\BAHToolsPlugin onPagesInitialized
/vendor/symfony/event-dispatcher/EventDispatcher.php264
36
Symfony\Component\EventDispatcher\EventDispatcher doDispatch
/vendor/symfony/event-dispatcher/EventDispatcher.php239
35
Symfony\Component\EventDispatcher\EventDispatcher callListeners
/vendor/symfony/event-dispatcher/EventDispatcher.php73
34
Symfony\Component\EventDispatcher\EventDispatcher dispatch
/system/src/Grav/Common/Grav.php550
33
Grav\Common\Grav fireEvent
/system/src/Grav/Common/Processors/PagesProcessor.php43
32
Grav\Common\Processors\PagesProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
31
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
30
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/TwigProcessor.php38
29
Grav\Common\Processors\TwigProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
28
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
27
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/AssetsProcessor.php39
26
Grav\Common\Processors\AssetsProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
25
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
24
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/SchedulerProcessor.php40
23
Grav\Common\Processors\SchedulerProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
22
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
21
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/BackupsProcessor.php39
20
Grav\Common\Processors\BackupsProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
19
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
18
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/TasksProcessor.php69
17
Grav\Common\Processors\TasksProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
16
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
15
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/RequestProcessor.php63
14
Grav\Common\Processors\RequestProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
13
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
12
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/ThemesProcessor.php38
11
Grav\Common\Processors\ThemesProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
10
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
9
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/PluginsProcessor.php39
8
Grav\Common\Processors\PluginsProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
7
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
6
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/InitializeProcessor.php129
5
Grav\Common\Processors\InitializeProcessor Grav\Common\Processors\{closure}
/system/src/Grav/Common/Debugger.php546
4
Grav\Common\Debugger profile
/system/src/Grav/Common/Processors/InitializeProcessor.php130
3
Grav\Common\Processors\InitializeProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
2
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
1
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Grav.php295
0
Grav\Common\Grav process
/index.php58
/var/www/vhosts/buyahomemallorca.com/httpdocs/user/plugins/bah-tools/vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php
            }
        }
        return 0xFFFD;
    }
 
    /**
     * Converts UTF-8 strings to codepoints array.<br>
     * Invalid byte sequences will be replaced with 0xFFFD (replacement character)<br>
     * @param $str (string) string to process.
     * @param $isunicode (boolean) True when the documetn is in Unicode mode, false otherwise.
     * @param $currentfont (array) Reference to current font array.
     * @return array containing codepoints (UTF-8 characters values)
     * @author Nicola Asuni
     * @public static
     */
    public static function UTF8StringToArray($str, $isunicode=true, &$currentfont) {
        if ($isunicode) {
            // requires PCRE unicode support turned on
            $chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY);
            $carr = array_map(array('TCPDF_FONTS', 'uniord'), $chars);
        } else {
            $chars = str_split($str);
            $carr = array_map('ord', $chars);
        }
        if (is_array($currentfont['subsetchars']) && is_array($carr)) {
            $currentfont['subsetchars'] += array_fill_keys($carr, true);
        } else {
            $currentfont['subsetchars'] = array_merge($currentfont['subsetchars'], $carr);
        }
        return $carr;
    }
 
    /**
     * Converts UTF-8 strings to Latin1 when using the standard 14 core fonts.<br>
     * @param $str (string) string to process.
     * @param $isunicode (boolean) True when the documetn is in Unicode mode, false otherwise.
     * @param $currentfont (array) Reference to current font array.
     * @return string
     * @since 3.2.000 (2008-06-23)
     * @public static
Arguments
  1. "array_map(): Argument #2 ($array) must be of type array, bool given"
    
/var/www/vhosts/buyahomemallorca.com/httpdocs/user/plugins/bah-tools/vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php
            }
        }
        return 0xFFFD;
    }
 
    /**
     * Converts UTF-8 strings to codepoints array.<br>
     * Invalid byte sequences will be replaced with 0xFFFD (replacement character)<br>
     * @param $str (string) string to process.
     * @param $isunicode (boolean) True when the documetn is in Unicode mode, false otherwise.
     * @param $currentfont (array) Reference to current font array.
     * @return array containing codepoints (UTF-8 characters values)
     * @author Nicola Asuni
     * @public static
     */
    public static function UTF8StringToArray($str, $isunicode=true, &$currentfont) {
        if ($isunicode) {
            // requires PCRE unicode support turned on
            $chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY);
            $carr = array_map(array('TCPDF_FONTS', 'uniord'), $chars);
        } else {
            $chars = str_split($str);
            $carr = array_map('ord', $chars);
        }
        if (is_array($currentfont['subsetchars']) && is_array($carr)) {
            $currentfont['subsetchars'] += array_fill_keys($carr, true);
        } else {
            $currentfont['subsetchars'] = array_merge($currentfont['subsetchars'], $carr);
        }
        return $carr;
    }
 
    /**
     * Converts UTF-8 strings to Latin1 when using the standard 14 core fonts.<br>
     * @param $str (string) string to process.
     * @param $isunicode (boolean) True when the documetn is in Unicode mode, false otherwise.
     * @param $currentfont (array) Reference to current font array.
     * @return string
     * @since 3.2.000 (2008-06-23)
     * @public static
/var/www/vhosts/buyahomemallorca.com/httpdocs/user/plugins/bah-tools/vendor/tecnickcom/tcpdf/tcpdf.php
            $margin = $this->cell_margin;
        }
        // remove carriage returns
        $s = str_replace("\r", '', $txt);
        // check if string contains arabic text
        if (preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_ARABIC, $s)) {
            $arabic = true;
        } else {
            $arabic = false;
        }
        // check if string contains RTL text
        if ($arabic OR ($this->tmprtl == 'R') OR preg_match(TCPDF_FONT_DATA::$uni_RE_PATTERN_RTL, $s)) {
            $rtlmode = true;
        } else {
            $rtlmode = false;
        }
        // get a char width
        $chrwidth = $this->GetCharWidth(46); // dot character
        // get array of unicode values
        $chars = TCPDF_FONTS::UTF8StringToArray($s, $this->isunicode, $this->CurrentFont);
        // calculate maximum width for a single character on string
        $chrw = $this->GetArrStringWidth($chars, '', '', 0, true);
        array_walk($chrw, array($this, 'getRawCharWidth'));
        $maxchwidth = max($chrw);
        // get array of chars
        $uchars = TCPDF_FONTS::UTF8ArrayToUniArray($chars, $this->isunicode);
        // get the number of characters
        $nb = count($chars);
        // replacement for SHY character (minus symbol)
        $shy_replacement = 45;
        $shy_replacement_char = TCPDF_FONTS::unichr($shy_replacement, $this->isunicode);
        // widht for SHY replacement
        $shy_replacement_width = $this->GetCharWidth($shy_replacement);
        // page width
        $pw = $w = $this->w - $this->lMargin - $this->rMargin;
        // calculate remaining line width ($w)
        if ($this->rtl) {
            $w = $this->x - $this->lMargin;
        } else {
            $w = $this->w - $this->rMargin - $this->x;
/var/www/vhosts/buyahomemallorca.com/httpdocs/user/plugins/bah-tools/vendor/tecnickcom/tcpdf/tcpdf.php
                        // premature exit, we get the minimum font value to fit the cell
                        $this->SetFontSize($fmin);
                        $this->resetLastH();
                        $text_height = $this->getStringHeight($w, $txt, $reseth, $autopadding, $mc_padding, $border);
                    } else {
                        $this->SetFontSize($fmid);
                        $this->resetLastH();
                    }
                }
                if ($text_height < $maxh) {
                    if ($valign == 'M') {
                        // text vertically centered
                        $this->y += (($maxh - $text_height) / 2);
                    } elseif ($valign == 'B') {
                        // text vertically aligned on bottom
                        $this->y += ($maxh - $text_height);
                    }
                }
            }
            $nl = $this->Write($this->lasth, $txt, '', 0, $align, true, $stretch, false, true, $maxh, 0, $mc_margin);
            if ($fitcell) {
                // restore font size
                $this->SetFontSize($prev_FontSizePt);
            }
        }
        if ($autopadding) {
            // add bottom padding
            $this->y += $mc_padding['B'];
        }
        // Get end-of-text Y position
        $currentY = $this->y;
        // get latest page number
        $endpage = $this->page;
        if ($resth > 0) {
            $skip = ($endpage - $startpage);
            $tmpresth = $resth;
            while ($tmpresth > 0) {
                if ($skip <= 0) {
                    // add a page (or trig AcceptPageBreak() for multicolumn mode)
                    $this->checkPageBreak($this->PageBreakTrigger + 1);
/var/www/vhosts/buyahomemallorca.com/httpdocs/user/plugins/bah-tools/classes/PDF.php
    $this->SetAccentColor();
    $this->SetFont($this->font, '',  $font_size_title);
    $this->SetXY(10, 129);
    $this->MultiCell(90, 15, strtoupper($this->header->title), 0, 'L', 0, 1);
    $this->Ln(2);


    // ============================
    // Description
    // ============================
    $this->SetX(10);
    $this->SetFont($this->font, '',  $font_size_paragraph);
    $this->SetGreyColor();

    $description = str_replace("<br />", "\r", $listing["description"]);

    if (strlen($description) > 750) {
      $description = substr($description, 0, 750) . "...";
    }
    $this->MultiCell(90, 65, $description, 0, 'L', 0, 1);


    // ============================
    // Facts
    // ============================
    $this->SetAccentColor();
    $this->SetFont($this->font, '',  $font_size_title);
    $this->SetXY(10, 210);
    $this->MultiCell(90, 16, strtoupper(parent::t("FACTS")), 0, 'L', 0, 1);

    $labels = "
      " . parent::t("YEAR") . ":<br />
      " . parent::t("RENOVATED") . ":<br />
      " . parent::t("CONSTRUCTED_AREA") . ":<br />
      " . parent::t("TERRACE_SIZE") . ":<br />
      " . parent::t("PLOT") . ":";
    $values = "";
    $facts = $this->header->property["facts"];
    if (isset($facts['year'])) {
      $values .= $facts['year'];
/var/www/vhosts/buyahomemallorca.com/httpdocs/user/plugins/bah-tools/bah-tools.php
                break;
            }
 
        // }elseif ($page->template() == 'search-property' && isset($header->autosearch) && $header->autosearch == true){
        //     // Perform an empty search to extract all properties
        //     $resultId = $this->searchProperties();
        //     $this->config->set('plugins.bahtools.idSearch', $resultId );
        //     return;
 
        } elseif( isset($_GET['printpdf']) ){
 
            $this->checkForSQLInjection('printpdf');
            if( $page->header() instanceof stdClass && property_exists($page->header(), 'notfound') && $page->header()->notfound ) {
                return;
            }
 
            header("X-Robots-Tag: noindex, follow", true);
    
            $pdf = new PDF($page); 
            $pdf->Generate();
            
            $filename = "property-" . $header->property["ref"] . ".pdf";
            header("Content-type: application/pdf");
            header("Content-Disposition: attachment; filename=\"" . $filename . "\"");
            echo $pdf->GetRawString();
            exit;
 
        }elseif( isset($_GET['printpdfpictures']) ){
 
            $this->checkForSQLInjection('printpdfpictures');
            if( $page->header() instanceof stdClass && property_exists($page->header(), 'notfound') && $page->header()->notfound ) {
                return;
            }
 
            $page = $this->grav['page'];
            $header = $page->header();
 
            header('Content-Type: text/html; charset=utf-8');
            header("X-Robots-Tag: noindex, follow", true);
    
/var/www/vhosts/buyahomemallorca.com/httpdocs/vendor/symfony/event-dispatcher/EventDispatcher.php
 
        foreach ($listeners as $listener) {
            if ($stoppable && $event->isPropagationStopped()) {
                break;
            }
            // @deprecated: the ternary operator is part of a BC layer and should be removed in 5.0
            $listener($listener instanceof WrappedListener ? new LegacyEventProxy($event) : $event, $eventName, $this);
        }
    }
 
    /**
     * @deprecated since Symfony 4.3, use callListeners() instead
     */
    protected function doDispatch($listeners, $eventName, Event $event)
    {
        foreach ($listeners as $listener) {
            if ($event->isPropagationStopped()) {
                break;
            }
            $listener($event, $eventName, $this);
        }
    }
 
    /**
     * Sorts the internal list of listeners for the given event by priority.
     */
    private function sortListeners(string $eventName)
    {
        krsort($this->listeners[$eventName]);
        $this->sorted[$eventName] = [];
 
        foreach ($this->listeners[$eventName] as &$listeners) {
            foreach ($listeners as $k => &$listener) {
                if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) {
                    $listener[0] = $listener[0]();
                    $listener[1] = $listener[1] ?? '__invoke';
                }
                $this->sorted[$eventName][] = $listener;
            }
        }
/var/www/vhosts/buyahomemallorca.com/httpdocs/vendor/symfony/event-dispatcher/EventDispatcher.php
            } else {
                $this->removeListener($eventName, [$subscriber, \is_string($params) ? $params : $params[0]]);
            }
        }
    }
 
    /**
     * Triggers the listeners of an event.
     *
     * This method can be overridden to add functionality that is executed
     * for each listener.
     *
     * @param callable[] $listeners The event listeners
     * @param string     $eventName The name of the event to dispatch
     * @param object     $event     The event object to pass to the event handlers/listeners
     */
    protected function callListeners(iterable $listeners, string $eventName, $event)
    {
        if ($event instanceof Event) {
            $this->doDispatch($listeners, $eventName, $event);
 
            return;
        }
 
        $stoppable = $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
 
        foreach ($listeners as $listener) {
            if ($stoppable && $event->isPropagationStopped()) {
                break;
            }
            // @deprecated: the ternary operator is part of a BC layer and should be removed in 5.0
            $listener($listener instanceof WrappedListener ? new LegacyEventProxy($event) : $event, $eventName, $this);
        }
    }
 
    /**
     * @deprecated since Symfony 4.3, use callListeners() instead
     */
    protected function doDispatch($listeners, $eventName, Event $event)
    {
/var/www/vhosts/buyahomemallorca.com/httpdocs/vendor/symfony/event-dispatcher/EventDispatcher.php
 
        if (\is_object($event)) {
            $eventName = $eventName ?? \get_class($event);
        } elseif (\is_string($event) && (null === $eventName || $eventName instanceof ContractsEvent || $eventName instanceof Event)) {
            @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead.', EventDispatcherInterface::class), \E_USER_DEPRECATED);
            $swap = $event;
            $event = $eventName ?? new Event();
            $eventName = $swap;
        } else {
            throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an object, "%s" given.', EventDispatcherInterface::class, \is_object($event) ? \get_class($event) : \gettype($event)));
        }
 
        if (null !== $this->optimized && null !== $eventName) {
            $listeners = $this->optimized[$eventName] ?? (empty($this->listeners[$eventName]) ? [] : $this->optimizeListeners($eventName));
        } else {
            $listeners = $this->getListeners($eventName);
        }
 
        if ($listeners) {
            $this->callListeners($listeners, $eventName, $event);
        }
 
        return $event;
    }
 
    /**
     * {@inheritdoc}
     */
    public function getListeners($eventName = null)
    {
        if (null !== $eventName) {
            if (empty($this->listeners[$eventName])) {
                return [];
            }
 
            if (!isset($this->sorted[$eventName])) {
                $this->sortListeners($eventName);
            }
 
            return $this->sorted[$eventName];
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Grav.php
        return $event;
    }
 
    /**
     * Fires an event with optional parameters.
     *
     * @param  string $eventName
     * @param  Event|null $event
     * @return Event
     */
    public function fireEvent($eventName, Event $event = null)
    {
        /** @var EventDispatcherInterface $events */
        $events = $this['events'];
        if (null === $event) {
            $event = new Event();
        }
 
        $timestamp = microtime(true);
        $events->dispatch($event, $eventName);
 
        /** @var Debugger $debugger */
        $debugger = $this['debugger'];
        $debugger->addEvent($eventName, $event, $events, $timestamp);
 
        return $event;
    }
 
    /**
     * Set the final content length for the page and flush the buffer
     *
     * @return void
     */
    public function shutdown()
    {
        // Prevent user abort allowing onShutdown event to run without interruptions.
        if (function_exists('ignore_user_abort')) {
            @ignore_user_abort(true);
        }
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/PagesProcessor.php
{
    /** @var string */
    public $id = 'pages';
    /** @var string */
    public $title = 'Pages';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
 
        // Dump Cache state
        $this->container['debugger']->addMessage($this->container['cache']->getCacheStatus());
 
        $this->container['pages']->init();
        $this->container->fireEvent('onPagesInitialized', new Event(['pages' => $this->container['pages']]));
        $this->container->fireEvent('onPageInitialized', new Event(['page' => $this->container['page']]));
 
        /** @var PageInterface $page */
        $page = $this->container['page'];
 
        if (!$page->routable()) {
            // If no page found, fire event
            $event = new Event(['page' => $page]);
            $event->page = null;
            $event = $this->container->fireEvent('onPageNotFound', $event);
 
            if (isset($event->page)) {
                unset($this->container['page']);
                $this->container['page'] = $page = $event->page;
            } else {
                throw new RuntimeException('Page Not Found', 404);
            }
 
            $this->addMessage("Routed to page {$page->rawRoute()} (type: {$page->template()}) [Not Found fallback]");
        } else {
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/TwigProcessor.php
 */
class TwigProcessor extends ProcessorBase
{
    /** @var string */
    public $id = 'twig';
    /** @var string */
    public $title = 'Twig';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
        $this->container['twig']->init();
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/AssetsProcessor.php
class AssetsProcessor extends ProcessorBase
{
    /** @var string */
    public $id = '_assets';
    /** @var string */
    public $title = 'Assets';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
        $this->container['assets']->init();
        $this->container->fireEvent('onAssetsInitialized');
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/SchedulerProcessor.php
class SchedulerProcessor extends ProcessorBase
{
    /** @var string */
    public $id = '_scheduler';
    /** @var string */
    public $title = 'Scheduler';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
        $scheduler = $this->container['scheduler'];
        $this->container->fireEvent('onSchedulerInitialized', new Event(['scheduler' => $scheduler]));
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/BackupsProcessor.php
class BackupsProcessor extends ProcessorBase
{
    /** @var string */
    public $id = '_backups';
    /** @var string */
    public $title = 'Backups';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
        $backups = $this->container['backups'];
        $backups->init();
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/TasksProcessor.php
                        $response = $handler->handle($request);
                    }
 
                    $this->stopTimer();
 
                    return $response;
                } catch (NotFoundException $e) {
                    // Task not found: Let it pass through.
                }
            }
 
            if ($task) {
                $this->container->fireEvent('onTask.' . $task);
            } elseif ($action) {
                $this->container->fireEvent('onAction.' . $action);
            }
        }
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/RequestProcessor.php
        $uri = $request->getUri();
        $ext = mb_strtolower(pathinfo($uri->getPath(), PATHINFO_EXTENSION));
 
        $request = $request
            ->withAttribute('grav', $this->container)
            ->withAttribute('time', $_SERVER['REQUEST_TIME_FLOAT'] ?? GRAV_REQUEST_TIME)
            ->withAttribute('route', Uri::getCurrentRoute()->withExtension($ext))
            ->withAttribute('referrer', $this->container['uri']->referrer());
 
        $event = new RequestHandlerEvent(['request' => $request, 'handler' => $handler]);
        /** @var RequestHandlerEvent $event */
        $event = $this->container->fireEvent('onRequestHandlerInit', $event);
        $response = $event->getResponse();
        $this->stopTimer();
 
        if ($response) {
            return $response;
        }
 
        return $handler->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/ThemesProcessor.php
 */
class ThemesProcessor extends ProcessorBase
{
    /** @var string */
    public $id = 'themes';
    /** @var string */
    public $title = 'Themes';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
        $this->container['themes']->init();
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/PluginsProcessor.php
class PluginsProcessor extends ProcessorBase
{
    /** @var string */
    public $id = 'plugins';
    /** @var string */
    public $title = 'Initialize Plugins';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
        $grav = $this->container;
        $grav->fireEvent('onPluginsInitialized');
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/InitializeProcessor.php
            if ($response) {
                $this->stopTimer('_init');
 
                return $response;
            }
        }
 
        // Load accounts (decides class to be used).
        // TODO: remove in 2.0.
        $this->container['accounts'];
 
        // Initialize session.
        $this->initializeSession($config);
 
        $this->stopTimer('_init');
 
        // Wrap call to next handler so that debugger can profile it.
        /** @var Response $response */
        $response = $debugger->profile(static function () use ($handler, $request) {
            return $handler->handle($request);
        });
 
        // Log both request and response and return the response.
        return $debugger->logRequest($request, $response);
    }
 
    public function processCli(): void
    {
        // Load configuration.
        $config = $this->initializeConfig();
 
        // Initialize logger.
        $this->initializeLogger($config);
 
        // Disable debugger.
        $this->container['debugger']->enabled(false);
 
        // Set timezone, locale.
        $this->initializeLocale($config);
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Debugger.php
        }
 
        $this->addMeasures();
        $this->addDeprecations();
        $this->timers = [];
 
        return $this->debugbar->getData();
    }
 
    /**
     * Hierarchical Profiler support.
     *
     * @param callable $callable
     * @param string|null $message
     * @return mixed
     */
    public function profile(callable $callable, string $message = null)
    {
        $this->startProfiling();
        $response = $callable();
        $this->stopProfiling($message);
 
        return $response;
    }
 
    public function addTwigProfiler(Environment $twig): void
    {
        $clockwork = $this->getClockwork();
        if ($clockwork) {
            $source = new TwigClockworkDataSource($twig);
            $source->listenToEvents();
            $clockwork->addDataSource($source);
        }
    }
 
    /**
     * Start profiling code.
     *
     * @return void
     */
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Processors/InitializeProcessor.php
                $this->stopTimer('_init');
 
                return $response;
            }
        }
 
        // Load accounts (decides class to be used).
        // TODO: remove in 2.0.
        $this->container['accounts'];
 
        // Initialize session.
        $this->initializeSession($config);
 
        $this->stopTimer('_init');
 
        // Wrap call to next handler so that debugger can profile it.
        /** @var Response $response */
        $response = $debugger->profile(static function () use ($handler, $request) {
            return $handler->handle($request);
        });
 
        // Log both request and response and return the response.
        return $debugger->logRequest($request, $response);
    }
 
    public function processCli(): void
    {
        // Load configuration.
        $config = $this->initializeConfig();
 
        // Initialize logger.
        $this->initializeLogger($config);
 
        // Disable debugger.
        $this->container['debugger']->enabled(false);
 
        // Set timezone, locale.
        $this->initializeLocale($config);
 
        // Load plugins.
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    private $handler;
 
    /** @var ContainerInterface|null */
    private $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/var/www/vhosts/buyahomemallorca.com/httpdocs/system/src/Grav/Common/Grav.php
                },
                'pagesProcessor' => function () {
                    return new PagesProcessor($this);
                },
                'debuggerAssetsProcessor' => function () {
                    return new DebuggerAssetsProcessor($this);
                },
                'renderProcessor' => function () {
                    return new RenderProcessor($this);
                },
            ]
        );
 
        $default = static function () {
            return new Response(404, ['Expires' => 0, 'Cache-Control' => 'no-store, max-age=0'], 'Not Found');
        };
 
        $collection = new RequestHandler($this->middleware, $default, $container);
 
        $response = $collection->handle($this['request']);
        $body = $response->getBody();
 
        /** @var Messages $messages */
        $messages = $this['messages'];
 
        // Prevent caching if session messages were displayed in the page.
        $noCache = $messages->isCleared();
        if ($noCache) {
            $response = $response->withHeader('Cache-Control', 'no-store, max-age=0');
        }
 
        // Handle ETag and If-None-Match headers.
        if ($response->getHeaderLine('ETag') === '1') {
            $etag = md5($body);
            $response = $response->withHeader('ETag', '"' . $etag . '"');
 
            $search = trim($this['request']->getHeaderLine('If-None-Match'), '"');
            if ($noCache === false && $search === $etag) {
                $response = $response->withStatus(304);
                $body = '';
/var/www/vhosts/buyahomemallorca.com/httpdocs/index.php
if (!is_file($autoload)) {
    die('Please run: <i>bin/grav install</i>');
}
 
// Register the auto-loader.
$loader = require $autoload;
 
use Grav\Common\Grav;
use RocketTheme\Toolbox\Event\Event;
 
// Get the Grav instance
$grav = Grav::instance(
    array(
        'loader' => $loader
    )
);
 
// Process the page
try {
    $grav->process();
} catch (\Error $e) {
    $grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
    throw $e;
} catch (\Exception $e) {
    $grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
    throw $e;
}
 

Environment & details:

Key Value
printpdf
""
empty
empty
empty
empty
Key Value
USER
"buyahomemallorca.com_qluz6uizus"
HOME
"/var/www/vhosts/buyahomemallorca.com"
HTTP_X_FORWARDED_FOR
"34.205.142.9"
HTTP_X_REAL_IP
"34.205.142.9"
HTTP_CDN_PULLZONEID
"1449505"
HTTP_VIA
"BunnyCDN"
HTTP_CDN_PROXYVER
"1.04"
HTTP_CDN_LOOPCOUNT
"1"
HTTP_CDN_REQUESTID
"c5113a1df2a723800f4ae0f1e3c10ec2"
HTTP_CDN_REQUESTSTATECODE
"VA"
HTTP_CDN_REQUESTCOUNTRYCODE
"US"
HTTP_BUNNYCDN_LBKEY
"j0YiR5gUfYiZmQrWSLV6opVewPUZFwJD21K1W9dkKWg4EnYSjbS5c9"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_CDN_MOBILEDEVICE
"false"
HTTP_CDN_CONNECTIONID
"6080367459"
HTTP_CDN_HOST
"www.buyahomemallorca.se"
HTTP_CDN_SERVERZONE
"ASB"
HTTP_CDN_SERVERID
"925"
HTTP_ACCEPT_ENCODING
"identity"
HTTP_USER_AGENT
"claudebot"
HTTP_ACCEPT
"*/*"
HTTP_HOST
"www.buyahomemallorca.se"
REDIRECT_STATUS
"200"
SERVER_NAME
"www.buyahomemallorca.com"
SERVER_PORT
"443"
SERVER_ADDR
"212.227.110.178"
REMOTE_PORT
"20029"
REMOTE_ADDR
"37.19.207.34"
SERVER_SOFTWARE
"nginx/1.24.0"
GATEWAY_INTERFACE
"CGI/1.1"
HTTPS
"on"
REQUEST_SCHEME
"https"
SERVER_PROTOCOL
"HTTP/1.1"
DOCUMENT_ROOT
"/var/www/vhosts/buyahomemallorca.com/httpdocs/"
DOCUMENT_URI
"/index.php"
REQUEST_URI
"/fastigheter/rymlig-laegenhet-med-terrass-och-fantastisk-havsutsikt-i-illetas-ps03321?printpdf"
SCRIPT_NAME
"/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
"printpdf"
SCRIPT_FILENAME
"/var/www/vhosts/buyahomemallorca.com/httpdocs/index.php"
PATH_INFO
""
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1711698825.4974
REQUEST_TIME
1711698825
empty
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\CallbackHandler