Error
Attempt to assign property "contactperson" on null Error thrown with message "Attempt to assign property "contactperson" on null" Stacktrace: #23 Error in rex:///module/44/output:51 #22 require in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php:491 #21 rex_article_content_base:{closure} in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php:493 #20 rex_article_content_base:getStreamOutput in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php:341 #19 rex_article_content_base:outputSlice in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php:694 #18 rex_article_content_base:renderSlices in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php:406 #17 rex_article_content_base:getArticle in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/addons/structure/plugins/content/lib/article_content.php:130 #16 rex_article_content:getArticle in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php:366 #15 rex_article_content_base:getSlice in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/addons/structure/plugins/content/lib/article_slice.php:309 #14 rex_article_slice:getSlice in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/addons/project/fragments/sliceLoop.php:5 #13 require in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/core/lib/fragment.php:121 #12 rex_fragment:{closure} in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/core/lib/util/timer.php:63 #11 rex_timer:measure in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/core/lib/fragment.php:119 #10 rex_fragment:parse in rex:///template/1:131 #9 require in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php:460 #8 rex_article_content_base:{closure} in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/core/lib/util/timer.php:63 #7 rex_timer:measure in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php:457 #6 rex_article_content_base:getArticleTemplate in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/addons/structure/plugins/content/boot.php:60 #5 rex_package:{closure} in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/core/lib/extension.php:52 #4 rex_extension:{closure} in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/core/lib/util/timer.php:63 #3 rex_timer:measure in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/core/lib/extension.php:42 #2 rex_extension:registerPoint in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/core/frontend.php:26 #1 require in /var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/core/boot.php:143 #0 require in /var/www/vhosts/maltech.ch/dev.maltech.ch/index.php:9
Stack frames (24)
23
Error
rex:///module/44/output51
22
require
/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php491
21
rex_article_content_base {closure}
/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php493
20
rex_article_content_base getStreamOutput
/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php341
19
rex_article_content_base outputSlice
/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php694
18
rex_article_content_base renderSlices
/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php406
17
rex_article_content_base getArticle
/redaxo/src/addons/structure/plugins/content/lib/article_content.php130
16
rex_article_content getArticle
/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php366
15
rex_article_content_base getSlice
/redaxo/src/addons/structure/plugins/content/lib/article_slice.php309
14
rex_article_slice getSlice
/redaxo/src/addons/project/fragments/sliceLoop.php5
13
require
/redaxo/src/core/lib/fragment.php121
12
rex_fragment {closure}
/redaxo/src/core/lib/util/timer.php63
11
rex_timer measure
/redaxo/src/core/lib/fragment.php119
10
rex_fragment parse
rex:///template/1131
9
require
/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php460
8
rex_article_content_base {closure}
/redaxo/src/core/lib/util/timer.php63
7
rex_timer measure
/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php457
6
rex_article_content_base getArticleTemplate
/redaxo/src/addons/structure/plugins/content/boot.php60
5
rex_package {closure}
/redaxo/src/core/lib/extension.php52
4
rex_extension {closure}
/redaxo/src/core/lib/util/timer.php63
3
rex_timer measure
/redaxo/src/core/lib/extension.php42
2
rex_extension registerPoint
/redaxo/src/core/frontend.php26
1
require
/redaxo/src/core/boot.php143
0
require
/index.php9
                <?php } ?>
              </div>
              <?php if(count(explode(',', $this->reference->images)) > 1) { ?>
                <div class="swiper-pagination"></div>
                <div class="swiper-button-prev swiper-button-navigation"></div>
                <div class="swiper-button-next swiper-button-navigation"></div>
              <?php } ?>
            </div>
          <?php } else { ?>
            <?php foreach($images as $image) { ?>
              <?= rex_media_type_set_helper::getPictureTag("landscape", $image) ?>
            <?php } ?>
          <?php } ?>
 
          <div class="texts">
            <div class="freeText"><?= /* REX_VALUE[id=2 output=html] */ '<h2>«Die handwerkliche Arbeit begeistert mich.»</h2>' . "\r\n" . '<p><strong></strong></p>' . "\r\n" . '<p><strong><strong>Deine Woche als Schnupperlernende bei Maltech ist zu Ende – wie hast du sie erlebt</strong>?</strong></p>' . "\r\n" . '<p>Es war spannend, ich habe sehr viel gesehen und gelernt.</p>' . "\r\n" . '<p><br></p>' . "\r\n" . '<p><strong></strong></p>' . "\r\n" . '<p><strong><strong>Konntest du mit anpacken</strong><strong>?</strong></strong></p>' . "\r\n" . '<p>Ja! Ich durfte zum Beispiel Schrauben lösen und wieder befestigen, einen Pneu montieren, Öl einfüllen – und noch ganz viel mehr.</p>' . "\r\n" . '<p><br></p>' . "\r\n" . '<p><strong></strong></p>' . "\r\n" . '<p><strong><strong>Welches Erlebnis wird dir besonders in Erinnerung bleiben</strong><strong>?</strong></strong></p>' . "\r\n" . '<p></p>' . "\r\n" . '<p>Die Arbeit mit Felix, Mechaniker bei Maltech, hat mir besonders Spass gemacht. Dort erhielt ich viele faszinierende Einblicke und konnte selber anpacken. Sehr lehrreich fand ich zudem die Arbeit mit der Teleskopbühne.</p>' . "\r\n" . '<p><br></p>' . "\r\n" . '<p><strong></strong></p>' . "\r\n" . '<p><strong><strong>Frauen sind in technischen Berufen bekanntlich weniger gut vertreten als Männer – was reizt und begeistert dich an der Ausbildung zur Automobilfachfrau Nutzfahrzeuge</strong><strong>?</strong></strong></p>' . "\r\n" . '<p></p>' . "\r\n" . '<p></p>' . "\r\n" . '<p>Mich begeistert die handwerkliche Arbeit. Und ich finde es interessant, dass es immer darum geht, nach der Ursache eines Problems zu suchen und dieses anschliessend zu lösen.</p>' . "\r\n" . '<p><br></p>' . "\r\n" . '<p><strong><strong></strong></strong></p>' . "\r\n" . '<p><strong>Weshalb hast du dich als «Schnuppi» bei Maltech beworben<strong><strong>?</strong></strong></strong></p>' . "\r\n" . '<p></p>' . "\r\n" . '<p></p>' . "\r\n" . '<p>Bei meiner Online-Suche nach Lehrstellen als Automobilfachfrau Nutzfahrzeuge habe ich Maltech kennengelernt. Das Unternehmen hat mich von Anfang an angesprochen, weshalb ich schliesslich Kontakt aufnahm.</p>' . "\r\n" . '<p></p>' . "\r\n" . '<p><br></p>' . "\r\n" . '<p><strong><strong></strong></strong></p>' . "\r\n" . '<p><strong>Was macht Maltech deiner Ansicht nach zu einem guten Lehrbetrieb<strong><strong>?</strong></strong></strong></p>' . "\r\n" . '<p></p>' . "\r\n" . '<p></p>' . "\r\n" . '<p>Sämtliche Abläufe sind klar geregelt. Und ich habe selbst miterlebt, wie gut die Mitarbeitenden ihre Arbeit erklären können. In nur vier Tagen habe ich enorm viel gelernt.</p>' . "\r\n" . '<p><br></p>' . "\r\n" . '<p><strong><strong><strong></strong></strong></strong></p>' . "\r\n" . '<p><strong><strong><strong><strong>Könntest du dir vorstellen, hier deine Ausbildung zu absolvieren</strong><strong><strong><strong>?</strong></strong></strong></strong></strong></strong></p>' . "\r\n" . '<p></p>' . "\r\n" . '<p>Ja, das könnte ich mir sogar sehr gut vorstellen. Die Arbeit und das Arbeitsklima finde ich toll.</p>' . "\r\n" . '<p><br></p>' . "\r\n" . '<p><strong><strong><strong></strong></strong></strong></p>' . "\r\n" . '<p><strong><strong><strong><strong>Was sind deine Ziele für die berufliche Zukunft</strong><strong><strong><strong>?</strong></strong></strong></strong></strong></strong></p>' . "\r\n" . '<p></p>' . "\r\n" . '<p></p>' . "\r\n" . '<p>Ich möchte die Lehre zur Automobilfachfrau machen und vielleicht die Ausbildung zur Mechatronikerin anhängen. Später würde es mich reizen, ein Studium zu beginnen. Aber bis dahin habe ich ja zum Glück noch etwas Zeit und ich bin gespannt, was mich während der Lehre alles erwartet.</p>' . "\r\n" . '<p></p>' . "\r\n" . '<p></p>' . "\r\n" . '<p></p>' . "\r\n" . '<p><br></p>' ?></div>
          </div>
 
          <?php  $contactperson = Contactperson::getById((int) /* REX_VALUE[3] */ ''); ?>
          <?php  $this->reference->contactperson = $contactperson; ?>
 
          <?php if($this->reference->contactperson != '') { ?>
            <div class="grid-container projectLeader">
              <div class="grid-element col-4 col-xs-6">
                <?= rex_media_type_set_helper::getPictureTag('quadratic', $contactperson->image_portrait) ?>
              </div>
              <div class="grid-element col-8 col-xs-6">
                <div class="content">
                  <?php if (!useragent::isMobile()) { ?>
                    <h3><?= $contactperson->name ?></h3>
                  <?php } else { ?>
                    <h3><?= $contactperson->name ?></h3>
                  <?php } ?>
                  <div class="freeText">
                    <?php if (useragent::isMobile()) { ?>
                      <div class="contactInfo">
                        <?php if (rex_clang::getCurrent()->getId()  === 1) { ?>
                          <p><?= $contactperson->role ?><br><?= $contactperson->region->name ?></p>
                        <?php } else { ?>
                          <p><?= $contactperson->role_fr ?><br><?= $contactperson->region->name_fr ?></p>
Arguments
  1. "Attempt to assign property "contactperson" on null"
    
    /**
     * @param string $path
     * @param string $content
     * @return string
     */
    protected function getStreamOutput($path, $content)
    {
        if (!$this->eval) {
            $key = 'EOD_' . strtoupper(sha1((string) time()));
            return "require rex_stream::factory('$path', <<<'$key'\n$content\n$key);\n";
        }
 
        ob_start();
        try {
            ob_implicit_flush(0);
 
            $__stream = rex_stream::factory($path, $content);
 
            $sandbox = function () use ($__stream) {
                require $__stream;
            };
            $sandbox();
        } finally {
            $CONTENT = ob_get_clean();
        }
 
        return $CONTENT;
    }
 
    // ----- Modulvariablen werden ersetzt
 
    /**
     * @param string $content
     * @return string
     */
    protected function replaceVars(rex_sql $sql, $content)
    {
        $content = $this->replaceCommonVars($content);
        $content = str_replace(
            [
     * @param string $content
     * @return string
     */
    protected function getStreamOutput($path, $content)
    {
        if (!$this->eval) {
            $key = 'EOD_' . strtoupper(sha1((string) time()));
            return "require rex_stream::factory('$path', <<<'$key'\n$content\n$key);\n";
        }
 
        ob_start();
        try {
            ob_implicit_flush(0);
 
            $__stream = rex_stream::factory($path, $content);
 
            $sandbox = function () use ($__stream) {
                require $__stream;
            };
            $sandbox();
        } finally {
            $CONTENT = ob_get_clean();
        }
 
        return $CONTENT;
    }
 
    // ----- Modulvariablen werden ersetzt
 
    /**
     * @param string $content
     * @return string
     */
    protected function replaceVars(rex_sql $sql, $content)
    {
        $content = $this->replaceCommonVars($content);
        $content = str_replace(
            [
                'REX_MODULE_ID',
                'REX_MODULE_KEY',
     * @param rex_sql $artDataSql    A rex_sql instance containing all slice and module data
     * @param int     $moduleIdToAdd The id of the module, which was selected using the ModuleSelect
     *
     * @return string
     */
    protected function outputSlice(rex_sql $artDataSql, $moduleIdToAdd)
    {
        $output = rex_extension::registerPoint(new rex_extension_point(
            'SLICE_OUTPUT',
            $artDataSql->getValue(rex::getTablePrefix() . 'module.output'),
            [
                'article_id' => $this->article_id,
                'clang' => $this->clang,
                'slice_data' => $artDataSql,
            ]
        ));
        $output = $this->replaceVars($artDataSql, $output);
        $moduleId = (int) $artDataSql->getValue(rex::getTablePrefix() . 'module.id');
 
        return $this->getStreamOutput('module/' . $moduleId . '/output', $output);
    }
 
    public function getCurrentSlice(): rex_article_slice
    {
        if (!$this->sliceSql || !$this->sliceSql->valid()) {
            throw new rex_exception('There is no current slice; getCurrentSlice() can be called only while rendering slices');
        }
 
        return rex_article_slice::fromSql($this->sliceSql);
    }
 
    /**
     * Returns the content of the given slice-id.
     *
     * @param int $sliceId A article-slice id
     *
     * @return string
     */
    public function getSlice($sliceId)
    {
            for ($i = 0; $i < $rows; ++$i) {
                $sliceId = (int) $artDataSql->getValue($prefix.'article_slice.id');
                $sliceCtypeId = (int) $artDataSql->getValue($prefix.'article_slice.ctype_id');
                $sliceModuleId = (int) $artDataSql->getValue($prefix.'module.id');
 
                // ----- ctype unterscheidung
                if ('edit' != $this->mode && !$this->eval) {
                    if (0 == $i) {
                        $articleContent = "<?php\n\nif (\$this->ctype == '".$sliceCtypeId."' || \$this->ctype == '-1') {\n";
                    } elseif (null !== $prevCtype && $sliceCtypeId != $prevCtype) {
                        // ----- zwischenstand: ctype .. wenn ctype neu dann if
                        $articleContent .= "}\n\nif (\$this->ctype == '".$sliceCtypeId."' || \$this->ctype == '-1') {\n";
                    }
 
                    $slice = rex_article_slice::fromSql($artDataSql);
                    $articleContent .= '$this->currentSlice = '.var_export($slice, true).";\n";
                }
 
                // ------------- EINZELNER SLICE - AUSGABE
                $sliceContent = $this->outputSlice(
                    $artDataSql,
                    $moduleId
                );
                // --------------- ENDE EINZELNER SLICE
 
                // --------------- EP: SLICE_SHOW
                $sliceContent = rex_extension::registerPoint(
                    new rex_extension_point(
                        'SLICE_SHOW',
                        $sliceContent,
                        [
                            'article_id' => $this->article_id,
                            'clang' => $this->clang,
                            'ctype' => $sliceCtypeId,
                            'module_id' => $sliceModuleId,
                            'slice_id' => $sliceId,
                            'function' => $this->function,
                            'function_slice_id' => $this->slice_id,
                            'sql' => $artDataSql,
                        ]
 
        $articleLimit = '';
        if (0 != $this->article_id) {
            $articleLimit = ' AND ' . rex::getTablePrefix() . 'article_slice.article_id=' . (int) $this->article_id;
        }
 
        $sliceLimit = '';
        if (0 != $this->getSlice) {
            $sliceLimit = ' AND ' . rex::getTablePrefix() . "article_slice.id = '" . ((int) $this->getSlice) . "' ";
        }
        if ('edit' !== $this->mode) {
            $sliceLimit .= ' AND ' . rex::getTablePrefix() . 'article_slice.status = 1';
        }
 
        // ----- start: article caching
        ob_start();
        try {
            ob_implicit_flush(0);
 
            $this->renderSlices($articleLimit, $sliceLimit);
        } finally {
            // ----- end: article caching
            $CONTENT = ob_get_clean();
        }
 
        return $CONTENT;
    }
 
    /**
     * Method which gets called, before the slices of the article are processed.
     *
     * @param string $articleContent The content of the article
     * @param int    $moduleId       A module id
     *
     * @return string
     */
    protected function preArticle($articleContent, $moduleId)
    {
        // nichts tun
        return $articleContent;
        if (!$this->getSlice && 0 != $this->article_id) {
            // article caching
            ob_start();
            try {
                ob_implicit_flush(0);
 
                $articleContentFile = rex_path::addonCache('structure', $this->article_id . '.' . $this->clang . '.content');
 
                if (!is_file($articleContentFile)) {
                    rex_content_service::generateArticleContent($this->article_id, $this->clang);
                }
 
                require $articleContentFile;
            } finally {
                $CONTENT = ob_get_clean();
                assert(is_string($CONTENT));
            }
        } else {
            // Inhalt ueber sql generierens
            $CONTENT = parent::getArticle($curctype);
        }
 
        return rex_extension::registerPoint(new rex_extension_point('ART_CONTENT', $CONTENT, [
            'ctype' => $curctype,
            'article' => $this,
        ]));
    }
 
    public function getCurrentSlice(): rex_article_slice
    {
        if ($this->viasql) {
            return parent::getCurrentSlice();
        }
 
        if (!$this->currentSlice) {
            throw new rex_exception('There is no current slice; getCurrentSlice() can be called only while rendering slices');
        }
 
        return $this->currentSlice;
    }
            throw new rex_exception('There is no current slice; getCurrentSlice() can be called only while rendering slices');
        }
 
        return rex_article_slice::fromSql($this->sliceSql);
    }
 
    /**
     * Returns the content of the given slice-id.
     *
     * @param int $sliceId A article-slice id
     *
     * @return string
     */
    public function getSlice($sliceId)
    {
        $oldEval = $this->eval;
        $this->setEval(true);
 
        $this->getSlice = $sliceId;
        $sliceContent = $this->getArticle();
        $this->getSlice = 0;
 
        $this->setEval($oldEval);
        return $this->replaceLinks($sliceContent);
    }
 
    /**
     * Returns the content of the article of the given ctype. If no ctype is given, content of all ctypes is returned.
     *
     * @param int $curctype The ctype to fetch, or -1 for all ctypes
     *
     * @return string
     */
    public function getArticle($curctype = -1)
    {
        $this->ctype = $curctype;
 
        if (0 == $this->article_id && 0 == $this->getSlice) {
            return rex_i18n::msg('no_article_available');
        }
            [$this->priority - 1, $this->articleId, $this->clang, $this->ctype, $this->revision],
            self::ORDER_DESC
        );
    }
 
    /**
     * Gibt den Slice formatiert zurück.
     *
     * @since 4.1 - 29.05.2008
     * @see rex_article_content::getSlice()
     *
     * @return string
     */
    public function getSlice()
    {
        $art = new rex_article_content();
        $art->setArticleId($this->getArticleId());
        $art->setClang($this->getClangId());
        $art->setSliceRevision($this->getRevision());
        return $art->getSlice($this->getId());
    }
 
    /**
     * @param string $where
     * @psalm-param self::ORDER_* $orderDirection
     *
     * @return self|null
     */
    protected static function getSliceWhere($where, array $params = [], string $orderDirection = self::ORDER_ASC)
    {
        $slices = self::getSlicesWhere($where, $params, $orderDirection, 1);
        return $slices[0] ?? null;
    }
 
    /**
     * @param string $where
     * @psalm-param self::ORDER_* $orderDirection
     *
     * @return self[]
     */
<?php
$zIndexCounter = 2;
foreach($this->slices as $i => $slice) {
  /* @var $slice rex_article_slice */
  $sliceContent = $slice->getSlice();
  if($sliceContent != "") {
    if($slice->getModuleId() == 1 || $slice->getModuleId() == 79 || $slice->config['zIndexLower'] == 1) $zIndexCounter--;
    else $zIndexCounter++;
    //if module == störer, section has huge z-index
    //if module == fullscreen slider, self and following section are pulled up
    ?>
    <?// dump($slice->config['overrideTheme']); ?>
    <section class="entry <?= $slice->config['specialSkewBlock'] ?> <?= ($slice->getModuleId() == 1 || $slice->getModuleId() == 79) ? 'pullUp' : '' ?> <?= $slice->config['offsetTop'] ?> <?= isset($slice->config['visibility']) ? $slice->config['visibility'] : '' ?> <?= Color::getThemeStringById($slice->config['colorTheme']) ?> <?= $slice->config['paddingBottom'] ?> <?= $slice->config['paddingTop'] ?> <?//= $slice->config['overrideTheme'] ?>" id="entry<?= $slice->getId(); ?>" style="z-index: <?= $slice->getModuleId() == 5 ? '1000' : $zIndexCounter ?>;">
      <? //transparent, fullscreensliders and eyecatcher dont have skew element ?>
      <? if(Color::getById($slice->config['colorTheme'])->key != 'transparent' && $slice->getModuleId() != 10 && $slice->getModuleId() != 5) { ?>
        <div class="skewed color toviewport"></div>
      <? } ?>
      <?= $sliceContent ?>
    </section>
    <?
  }
}
     *
     * @throws InvalidArgumentException
     * @throws rex_exception
     *
     * @return string
     */
    public function parse($filename)
    {
        if (!is_string($filename)) {
            throw new InvalidArgumentException(sprintf('Expecting $filename to be a string, %s given!', gettype($filename)));
        }
 
        $this->filename = $filename;
 
        foreach (self::$fragmentDirs as $fragDir) {
            $fragment = $fragDir . $filename;
            if (is_readable($fragment)) {
                $content = rex_timer::measure('Fragment: '.$filename, function () use ($fragment) {
                    ob_start();
                    require $fragment;
 
                    return rex_type::string(ob_get_clean());
                });
 
                if ($this->decorator) {
                    $this->decorator->setVar('rexDecoratedContent', $content, false);
                    $content = $this->decorator->parse($this->decorator->filename);
                }
 
                return $content;
            }
        }
 
        throw new rex_exception(sprintf('Fragmentfile "%s" not found!', $filename));
    }
 
    /**
     * Decorate the current fragment, with another fragment.
     * The decorated fragment receives the parameters which are passed to this method.
     *
Arguments
  1. "/var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/addons/project/fragments/sliceLoop.php"
    
     *
     * On sufficient user permissions - or in debug mode - this timings will be sent over the wire to the browser via server timing api http headers.
     *
     * @template T
     *
     * @param string $label
     * @param callable():T $callable
     *
     * @return T result of callable
     */
    public static function measure($label, callable $callable)
    {
        if (!rex::isDebugMode()) {
            return $callable();
        }
 
        $timer = new self();
 
        try {
            return $callable();
        } finally {
            $timer->stop();
 
            self::measured($label, $timer);
        }
    }
 
    /**
     * Saves the measurement of the given timer.
     *
     * This method should be used only if the measured code can not be wrapped inside a callable, otherwise use `measure()`.
     */
    public static function measured(string $label, self $timer): void
    {
        $duration = self::$serverTimings[$label]['sum'] ?? 0;
        $duration += $timer->getDelta(self::MILLISEC);
 
        self::$serverTimings[$label]['sum'] = $duration;
        self::$serverTimings[$label]['timings'][] = [
            'start' => $timer->start,
     *
     * @param string $filename the filename of the fragment to parse
     *
     * @throws InvalidArgumentException
     * @throws rex_exception
     *
     * @return string
     */
    public function parse($filename)
    {
        if (!is_string($filename)) {
            throw new InvalidArgumentException(sprintf('Expecting $filename to be a string, %s given!', gettype($filename)));
        }
 
        $this->filename = $filename;
 
        foreach (self::$fragmentDirs as $fragDir) {
            $fragment = $fragDir . $filename;
            if (is_readable($fragment)) {
                $content = rex_timer::measure('Fragment: '.$filename, function () use ($fragment) {
                    ob_start();
                    require $fragment;
 
                    return rex_type::string(ob_get_clean());
                });
 
                if ($this->decorator) {
                    $this->decorator->setVar('rexDecoratedContent', $content, false);
                    $content = $this->decorator->parse($this->decorator->filename);
                }
 
                return $content;
            }
        }
 
        throw new rex_exception(sprintf('Fragmentfile "%s" not found!', $filename));
    }
 
    /**
     * Decorate the current fragment, with another fragment.
  <?= /* REX_TEMPLATE[3] */ rex_var_template::getTemplateOutput(3, new rex_timer(), require rex_var_template::getTemplateStream(3, $this)), "\n" ?>
  <main>
 
    <?
    //get slices by custom function to wrap them all the same way and format
    $slices = Project::formatSlices(rex_article_slice::getSlicesForArticle(rex_article::getCurrentId()));
    if (count($slices) > 0) {
 
      //if first slice is not a fullscreen image, show headerpush
      if ($slices[0]->getModuleId() != 1 && $slices[0]->getModuleId() != 58 && $slices[0]->getModuleId() != 64) {
    ?>
        <div class="headerPush invisible-s" aria-hidden="true">
          <div class="innerWrapper"><a class="logo"><img src="<?= rex_url::assets('/frontend/img/logo.svg') ?>" alt="maltech"></a></div>
        </div>
    <?
      }
 
      $sliceFrag = new rex_fragment();
      $sliceFrag->setVar("slices", $slices);
      echo $sliceFrag->parse("sliceLoop.php", false);
    }
    ?>
  </main>
  <?= /* REX_TEMPLATE[4] */ rex_var_template::getTemplateOutput(4, new rex_timer(), require rex_var_template::getTemplateStream(4, $this)), "\n" ?>
 
  REX_MINIFY[type=js set=Bottom JS]
  <script type="text/javascript">
    $(document).ready(function() {
      if ($('.article6').length == 1) {
        $('.mobileSwiper .box-textbox .buttons a.button.button-primary').attr("target", "");
      }
    });
  </script>
</body>
 
</html>
    }
 
    // ----- Template inklusive Artikel zurückgeben
 
    /**
     * @return string
     */
    public function getArticleTemplate()
    {
        if (0 != $this->template_id && 0 != $this->article_id) {
            ob_start();
            try {
                ob_implicit_flush(0);
 
                $TEMPLATE = new rex_template($this->template_id);
 
                rex_timer::measure('Template: '.($TEMPLATE->getKey() ?? $TEMPLATE->getId()), function () use ($TEMPLATE) {
                    $tplContent = $this->replaceCommonVars($TEMPLATE->getTemplate());
 
                    require rex_stream::factory('template/' . $this->template_id, $tplContent);
                });
            } finally {
                $CONTENT = ob_get_clean();
            }
 
            return $this->replaceLinks($CONTENT);
        }
 
        return 'no template';
    }
 
    /**
     * @param string $path
     * @param string $content
     * @return string
     */
    protected function getStreamOutput($path, $content)
    {
        if (!$this->eval) {
            $key = 'EOD_' . strtoupper(sha1((string) time()));
Arguments
  1. "rex:///template/1"
    
     *
     * On sufficient user permissions - or in debug mode - this timings will be sent over the wire to the browser via server timing api http headers.
     *
     * @template T
     *
     * @param string $label
     * @param callable():T $callable
     *
     * @return T result of callable
     */
    public static function measure($label, callable $callable)
    {
        if (!rex::isDebugMode()) {
            return $callable();
        }
 
        $timer = new self();
 
        try {
            return $callable();
        } finally {
            $timer->stop();
 
            self::measured($label, $timer);
        }
    }
 
    /**
     * Saves the measurement of the given timer.
     *
     * This method should be used only if the measured code can not be wrapped inside a callable, otherwise use `measure()`.
     */
    public static function measured(string $label, self $timer): void
    {
        $duration = self::$serverTimings[$label]['sum'] ?? 0;
        $duration += $timer->getDelta(self::MILLISEC);
 
        self::$serverTimings[$label]['sum'] = $duration;
        self::$serverTimings[$label]['timings'][] = [
            'start' => $timer->start,
    {
        // nichts tun
        return $articleContent;
    }
 
    // ----- Template inklusive Artikel zurückgeben
 
    /**
     * @return string
     */
    public function getArticleTemplate()
    {
        if (0 != $this->template_id && 0 != $this->article_id) {
            ob_start();
            try {
                ob_implicit_flush(0);
 
                $TEMPLATE = new rex_template($this->template_id);
 
                rex_timer::measure('Template: '.($TEMPLATE->getKey() ?? $TEMPLATE->getId()), function () use ($TEMPLATE) {
                    $tplContent = $this->replaceCommonVars($TEMPLATE->getTemplate());
 
                    require rex_stream::factory('template/' . $this->template_id, $tplContent);
                });
            } finally {
                $CONTENT = ob_get_clean();
            }
 
            return $this->replaceLinks($CONTENT);
        }
 
        return 'no template';
    }
 
    /**
     * @param string $path
     * @param string $content
     * @return string
     */
    protected function getStreamOutput($path, $content)
        $content = $ep->getSubject();
 
        $article = new rex_article_content();
        $article->setCLang(rex_clang::getCurrentId());
 
        if (!$article->setArticleId(rex_article::getCurrentId())) {
            if (!rex::isDebugMode() && !rex_backend_login::hasSession()) {
                throw new rex_exception('Article with id '.rex_article::getCurrentId().' does not exist');
            }
 
            $fragment = new rex_fragment([
                'content' => '<p><b>Article with ID '.rex_article::getCurrentId().' not found.</b><br />If this is a fresh setup, an article must be created first.<br />Enter <a href="' . rex_url::backendController() . '">REDAXO</a>.</p>',
            ]);
            $content .= $fragment->parse('core/fe_ooops.php');
            rex_response::sendPage($content);
            exit;
        }
 
        try {
            $content .= $article->getArticleTemplate();
        } catch (rex_article_not_found_exception $exception) {
            $article = new rex_article_content();
            $article->setCLang(rex_clang::getCurrentId());
            $article->setArticleId(rex_article::getNotfoundArticleId());
 
            $content .= $article->getArticleTemplate();
        }
 
        $artId = $article->getArticleId();
        if ($artId == rex_article::getNotfoundArticleId() && $artId != rex_article::getSiteStartArticleId()) {
            rex_response::setStatus(rex_response::HTTP_NOT_FOUND);
        }
 
        // ----- inhalt ausgeben
        rex_response::sendPage($content, $article->getValue('updatedate'));
    });
}
 
rex_extension::register('EDITOR_URL', static function (rex_extension_point $ep) {
    static $urls = [
     */
    public static function registerPoint(rex_extension_point $extensionPoint)
    {
        if ($factoryClass = static::getExplicitFactoryClass()) {
            return $factoryClass::registerPoint($extensionPoint);
        }
 
        $name = $extensionPoint->getName();
 
        rex_timer::measure('EP: '.$name, static function () use ($extensionPoint, $name) {
            foreach ([self::EARLY, self::NORMAL, self::LATE] as $level) {
                if (!isset(self::$extensions[$name][$level]) || !is_array(self::$extensions[$name][$level])) {
                    continue;
                }
 
                foreach (self::$extensions[$name][$level] as $extensionAndParams) {
                    [$extension, $params] = $extensionAndParams;
                    $extensionPoint->setExtensionParams($params);
                    /** @var T|null $subject */
                    $subject = call_user_func($extension, $extensionPoint);
                    // Update subject only if the EP is not readonly and the extension has returned something
                    if ($extensionPoint->isReadonly()) {
                        continue;
                    }
                    if (null === $subject) {
                        continue;
                    }
                    $extensionPoint->setSubject($subject);
                }
            }
        });
 
        return $extensionPoint->getSubject();
    }
 
    /**
     * Registers an extension for an extension point.
     *
     * @param string|string[] $extensionPoint Name(s) of extension point(s)
     * @param callable        $extension      Callback extension
     *
     * On sufficient user permissions - or in debug mode - this timings will be sent over the wire to the browser via server timing api http headers.
     *
     * @template T
     *
     * @param string $label
     * @param callable():T $callable
     *
     * @return T result of callable
     */
    public static function measure($label, callable $callable)
    {
        if (!rex::isDebugMode()) {
            return $callable();
        }
 
        $timer = new self();
 
        try {
            return $callable();
        } finally {
            $timer->stop();
 
            self::measured($label, $timer);
        }
    }
 
    /**
     * Saves the measurement of the given timer.
     *
     * This method should be used only if the measured code can not be wrapped inside a callable, otherwise use `measure()`.
     */
    public static function measured(string $label, self $timer): void
    {
        $duration = self::$serverTimings[$label]['sum'] ?? 0;
        $duration += $timer->getDelta(self::MILLISEC);
 
        self::$serverTimings[$label]['sum'] = $duration;
        self::$serverTimings[$label]['timings'][] = [
            'start' => $timer->start,
    private static $extensions = [];
 
    /**
     * Registers an extension point.
     *
     * @template T
     * @param rex_extension_point<T> $extensionPoint Extension point
     * @return T Subject, maybe adjusted by the extensions
     *
     * @psalm-taint-specialize
     */
    public static function registerPoint(rex_extension_point $extensionPoint)
    {
        if ($factoryClass = static::getExplicitFactoryClass()) {
            return $factoryClass::registerPoint($extensionPoint);
        }
 
        $name = $extensionPoint->getName();
 
        rex_timer::measure('EP: '.$name, static function () use ($extensionPoint, $name) {
            foreach ([self::EARLY, self::NORMAL, self::LATE] as $level) {
                if (!isset(self::$extensions[$name][$level]) || !is_array(self::$extensions[$name][$level])) {
                    continue;
                }
 
                foreach (self::$extensions[$name][$level] as $extensionAndParams) {
                    [$extension, $params] = $extensionAndParams;
                    $extensionPoint->setExtensionParams($params);
                    /** @var T|null $subject */
                    $subject = call_user_func($extension, $extensionPoint);
                    // Update subject only if the EP is not readonly and the extension has returned something
                    if ($extensionPoint->isReadonly()) {
                        continue;
                    }
                    if (null === $subject) {
                        continue;
                    }
                    $extensionPoint->setSubject($subject);
                }
            }
if (rex::isSetup()) {
    rex_response::sendRedirect(rex_url::backendController());
}
 
if (rex::isDebugMode()) {
    header('X-Robots-Tag: noindex, nofollow, noarchive');
}
 
// ----- INCLUDE ADDONS
include_once rex_path::core('packages.php');
 
// ----- caching end für output filter
$CONTENT = ob_get_clean();
 
// trigger api functions. the api function is responsible for checking permissions.
rex_api_function::handleCall();
 
if (rex_extension::isRegistered('FE_OUTPUT')) {
    // ----- EXTENSION POINT
    rex_extension::registerPoint(new rex_extension_point('FE_OUTPUT', $CONTENT));
} else {
    // ----- inhalt ausgeben
    rex_response::sendPage($CONTENT);
}
 
    $clangId = rex_request('clang', 'int', rex_clang::getStartId());
    if (rex::isBackend() || rex_clang::exists($clangId)) {
        rex_clang::setCurrentId($clangId);
    }
}
 
// ----------------- HTTPS REDIRECT
if ('cli' !== PHP_SAPI && !rex::isSetup()) {
    if ((true === rex::getProperty('use_https') || rex::getEnvironment() === rex::getProperty('use_https')) && !rex_request::isHttps()) {
        rex_response::enforceHttps();
    }
 
    if (true === rex::getProperty('use_hsts') && rex_request::isHttps()) {
        rex_response::setHeader('Strict-Transport-Security', 'max-age='.rex::getProperty('hsts_max_age', 31536000)); // default 1 year
    }
}
 
if (isset($REX['LOAD_PAGE']) && $REX['LOAD_PAGE']) {
    unset($REX);
    require rex_path::core(rex::isBackend() ? 'backend.php' : 'frontend.php');
}
 
Arguments
  1. "/var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/core/frontend.php"
    
<?php
//error_reporting(0); // TODO: don't forget !!!
 
unset($REX);
$REX['REDAXO'] = false;
$REX['HTDOCS_PATH'] = './';
$REX['BACKEND_FOLDER'] = 'redaxo';
$REX['LOAD_PAGE'] = true;
require $REX['BACKEND_FOLDER'] . '/src/core/boot.php';
 
Arguments
  1. "/var/www/vhosts/maltech.ch/dev.maltech.ch/redaxo/src/core/boot.php"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
USER
"maltech"
HOME
"/var/www/vhosts/maltech.ch"
SCRIPT_NAME
"/index.php"
REQUEST_URI
"/de/firma/interview/interview-kopie/"
QUERY_STRING
""
REQUEST_METHOD
"GET"
SERVER_PROTOCOL
"HTTP/1.0"
GATEWAY_INTERFACE
"CGI/1.1"
REDIRECT_URL
"/de/firma/interview/interview-kopie/"
REMOTE_PORT
"49300"
SCRIPT_FILENAME
"/var/www/vhosts/maltech.ch/dev.maltech.ch/index.php"
SERVER_ADMIN
"[no address given]"
CONTEXT_DOCUMENT_ROOT
"/var/www/vhosts/maltech.ch/dev.maltech.ch"
CONTEXT_PREFIX
""
REQUEST_SCHEME
"https"
DOCUMENT_ROOT
"/var/www/vhosts/maltech.ch/dev.maltech.ch"
REMOTE_ADDR
"18.207.126.53"
SERVER_PORT
"443"
SERVER_ADDR
"92.205.25.28"
SERVER_NAME
"dev.maltech.ch"
SERVER_SOFTWARE
"Apache"
SERVER_SIGNATURE
"<address>Apache Server at dev.maltech.ch Port 443</address>\n"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
HTTP_USER_AGENT
"claudebot"
HTTP_ACCEPT
"*/*"
HTTP_CONNECTION
"close"
HTTP_X_ACCEL_INTERNAL
"/internal-nginx-static-location"
HTTP_X_REAL_IP
"18.207.126.53"
HTTP_HOST
"dev.maltech.ch"
proxy-nokeepalive
"1"
HTTPS
"on"
PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY
"0"
PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY
"0"
SCRIPT_URI
"https://dev.maltech.ch/de/firma/interview/interview-kopie/"
SCRIPT_URL
"/de/firma/interview/interview-kopie/"
UNIQUE_ID
"ZgbNhV7dD4eN2hk-7in@qwAAAJM"
REDIRECT_STATUS
"200"
REDIRECT_HTTPS
"on"
REDIRECT_PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY
"0"
REDIRECT_PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY
"0"
REDIRECT_SCRIPT_URI
"https://dev.maltech.ch/de/firma/interview/interview-kopie/"
REDIRECT_SCRIPT_URL
"/de/firma/interview/interview-kopie/"
REDIRECT_UNIQUE_ID
"ZgbNhV7dD4eN2hk-7in@qwAAAJM"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1711721861.8721
REQUEST_TIME
1711721861
empty
0. Whoops\Handler\PrettyPageHandler
Report a REDAXO bug