Whoops \ Exception \ ErrorException (E_WARNING)
count(): Parameter must be an array or an object that implements Countable Whoops\Exception\ErrorException thrown with message "count(): Parameter must be an array or an object that implements Countable" Stacktrace: #13 Whoops\Exception\ErrorException in /var/www/vhosts/studiof.be/httpsdocs/site/snippets/common-elements/newsletter/newsletter-form.php:52 #12 Whoops\Run:handleError in /var/www/vhosts/studiof.be/httpsdocs/site/snippets/common-elements/newsletter/newsletter-form.php:52 #11 require in /var/www/vhosts/studiof.be/httpsdocs/kirby/src/Toolkit/Tpl.php:38 #10 Kirby\Toolkit\Tpl:load in /var/www/vhosts/studiof.be/httpsdocs/kirby/config/components.php:161 #9 Kirby\Cms\App:{closure} in /var/www/vhosts/studiof.be/httpsdocs/kirby/src/Cms/App.php:1192 #8 Kirby\Cms\App:snippet in /var/www/vhosts/studiof.be/httpsdocs/kirby/config/helpers.php:683 #7 snippet in /var/www/vhosts/studiof.be/httpsdocs/site/templates/newsletter-form.php:14 #6 require in /var/www/vhosts/studiof.be/httpsdocs/kirby/src/Toolkit/Tpl.php:38 #5 Kirby\Toolkit\Tpl:load in /var/www/vhosts/studiof.be/httpsdocs/kirby/src/Cms/Template.php:168 #4 Kirby\Cms\Template:render in /var/www/vhosts/studiof.be/httpsdocs/site/plugins/kirby-twig/src/classes/Template.php:86 #3 mgfagency\Twig\Template:render in /var/www/vhosts/studiof.be/httpsdocs/kirby/src/Cms/Page.php:1130 #2 Kirby\Cms\Page:render in /var/www/vhosts/studiof.be/httpsdocs/kirby/src/Cms/App.php:584 #1 Kirby\Cms\App:io in /var/www/vhosts/studiof.be/httpsdocs/kirby/src/Cms/App.php:870 #0 Kirby\Cms\App:render in /var/www/vhosts/studiof.be/httpsdocs/index.php:5
Stack frames (14)
13
Whoops
\
Exception
\
ErrorException
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
site
/
snippets
/
common-elements
/
newsletter
/
newsletter-form.php
52
12
Whoops
\
Run
handleError
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
site
/
snippets
/
common-elements
/
newsletter
/
newsletter-form.php
52
11
require
/
src
/
Toolkit
/
Tpl.php
38
10
Kirby
\
Toolkit
\
Tpl
load
/
config
/
components.php
161
9
Kirby
\
Cms
\
App
{closure}
/
src
/
Cms
/
App.php
1192
8
Kirby
\
Cms
\
App
snippet
/
config
/
helpers.php
683
7
snippet
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
site
/
templates
/
newsletter-form.php
14
6
require
/
src
/
Toolkit
/
Tpl.php
38
5
Kirby
\
Toolkit
\
Tpl
load
/
src
/
Cms
/
Template.php
168
4
Kirby
\
Cms
\
Template
render
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
site
/
plugins
/
kirby-twig
/
src
/
classes
/
Template.php
86
3
mgfagency
\
Twig
\
Template
render
/
src
/
Cms
/
Page.php
1130
2
Kirby
\
Cms
\
Page
render
/
src
/
Cms
/
App.php
584
1
Kirby
\
Cms
\
App
io
/
src
/
Cms
/
App.php
870
0
Kirby
\
Cms
\
App
render
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
index.php
5
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
site
/
snippets
/
common-elements
/
newsletter
/
newsletter-form.php
<label for="<?=$unique_prefix?>_newsletter-form__email" class="form__label">Email*</label>
<div class="form__input-info-marker">*Required</div>
<input type="email" id="<?=$unique_prefix?>_newsletter-form__email" class="form__input form__textinput newsletter-form__input--email" name="email" required maxlength="254" data-pristine-required-message="Please enter your email." <?=isset($data['email']) ? ' value="' . html($data['email']) . '"' : ''?>>
</div>
<div class="form__input-container">
<label for="<?=$unique_prefix?>_newsletter-form__first-name" class="form__label">First name*</label>
<div class="form__input-info-marker">*Required</div>
<input type="text" id="<?=$unique_prefix?>_newsletter-form__first-name" class="form__input form__textinput newsletter-form__input--first-name" name="merge_fields[FNAME]" required maxlength="100" data-pristine-required-message="Please enter your first name." <?=isset($data['merge_fields']['FNAME']) ? ' value="' . html($data['merge_fields']['FNAME']) . '"' : ''?>>
</div>
<div class="form__input-container">
<label for="<?=$unique_prefix?>_newsletter-form__last-name" class="form__label">Last name*</label>
<div class="form__input-info-marker">*Required</div>
<input type="text" id="<?=$unique_prefix?>_newsletter-form__last-name" class="form__input form__textinput newsletter-form__input--last-name" name="merge_fields[LNAME]" required maxlength="100" data-pristine-required-message="Please enter your last name." <?=isset($data['merge_fields']['LNAME']) ? ' value="' . html($data['merge_fields']['LNAME']) . '"' : ''?>>
</div>
<div class="form__input-container">
<label for="<?=$unique_prefix?>_newsletter-form__store" class="form__label">Store</label>
<input type="text" id="<?=$unique_prefix?>_newsletter-form__store" class="form__input form__textinput newsletter-form__input--store" name="merge_fields[STORE]" maxlength="100" <?=isset($data['merge_fields']['STORE']) ? ' value="' . html($data['merge_fields']['STORE']) . '"' : ''?>>
</div>
<div class="newsletter-form__subject-choices">
<?php if (count($general_category_interest_groups) > 0): ?>
<div class="form__input-container newsletter-form__category_choice">
<fieldset class="form__fieldset newsletter-form__fieldset--category_choice" id="<?=$unique_prefix?>_newsletter-form__category_choice">
<legend class="form__legend">I want to receive updates about:</legend>
<?php
$input_validation_attributes = 'required data-pristine-required-message="Please select a topic to receive updates about."';
$data_category_choice = isset($data['category_choice']) ? $data['category_choice'] : null;
?>
<?php foreach ($general_category_interest_groups as $interest_group): ?>
<label class="form__radio"><input type="radio" name="category_choice" value="<?=$interest_group['id']?>" class="form__input"<?=$input_validation_attributes?><?=$data_category_choice == $interest_group['id'] ? ' checked' : ''?>><b class="form__radio__radio-button"></b> <?=html($interest_group['name'])?></label>
<?php endforeach?>
<label class="form__radio"><input type="radio" name="category_choice" value="SPECIFIC_BRANDS" class="form__input"<?=$input_validation_attributes?><?=$data_category_choice == 'SPECIFIC_BRANDS' ? ' checked' : ''?> <?=$input_validation_attributes?>><b class="form__radio__radio-button"></b> <?=$site->mailchimp_general_category_some_brands_name()->isNotEmpty() ? $site->mailchimp_general_category_some_brands_name()->html() : 'Some&hellip;'?></label>
</fieldset>
</div>
<div class="form__input-container newsletter-form__brand-choice">
<fieldset class="form__fieldset newsletter-form__fieldset--brand-choice" id="<?=$unique_prefix?>_newsletter-form__brand-choice">
<legend class="form__legend">Select the brands you want to receive updates about</legend>
<?php
$data_brand_choice = isset($data['brand_choice']) ? $data['brand_choice'] : [];
if (!is_array($data_brand_choice)) {
    $data_brand_choice = [];
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
site
/
snippets
/
common-elements
/
newsletter
/
newsletter-form.php
<label for="<?=$unique_prefix?>_newsletter-form__email" class="form__label">Email*</label>
<div class="form__input-info-marker">*Required</div>
<input type="email" id="<?=$unique_prefix?>_newsletter-form__email" class="form__input form__textinput newsletter-form__input--email" name="email" required maxlength="254" data-pristine-required-message="Please enter your email." <?=isset($data['email']) ? ' value="' . html($data['email']) . '"' : ''?>>
</div>
<div class="form__input-container">
<label for="<?=$unique_prefix?>_newsletter-form__first-name" class="form__label">First name*</label>
<div class="form__input-info-marker">*Required</div>
<input type="text" id="<?=$unique_prefix?>_newsletter-form__first-name" class="form__input form__textinput newsletter-form__input--first-name" name="merge_fields[FNAME]" required maxlength="100" data-pristine-required-message="Please enter your first name." <?=isset($data['merge_fields']['FNAME']) ? ' value="' . html($data['merge_fields']['FNAME']) . '"' : ''?>>
</div>
<div class="form__input-container">
<label for="<?=$unique_prefix?>_newsletter-form__last-name" class="form__label">Last name*</label>
<div class="form__input-info-marker">*Required</div>
<input type="text" id="<?=$unique_prefix?>_newsletter-form__last-name" class="form__input form__textinput newsletter-form__input--last-name" name="merge_fields[LNAME]" required maxlength="100" data-pristine-required-message="Please enter your last name." <?=isset($data['merge_fields']['LNAME']) ? ' value="' . html($data['merge_fields']['LNAME']) . '"' : ''?>>
</div>
<div class="form__input-container">
<label for="<?=$unique_prefix?>_newsletter-form__store" class="form__label">Store</label>
<input type="text" id="<?=$unique_prefix?>_newsletter-form__store" class="form__input form__textinput newsletter-form__input--store" name="merge_fields[STORE]" maxlength="100" <?=isset($data['merge_fields']['STORE']) ? ' value="' . html($data['merge_fields']['STORE']) . '"' : ''?>>
</div>
<div class="newsletter-form__subject-choices">
<?php if (count($general_category_interest_groups) > 0): ?>
<div class="form__input-container newsletter-form__category_choice">
<fieldset class="form__fieldset newsletter-form__fieldset--category_choice" id="<?=$unique_prefix?>_newsletter-form__category_choice">
<legend class="form__legend">I want to receive updates about:</legend>
<?php
$input_validation_attributes = 'required data-pristine-required-message="Please select a topic to receive updates about."';
$data_category_choice = isset($data['category_choice']) ? $data['category_choice'] : null;
?>
<?php foreach ($general_category_interest_groups as $interest_group): ?>
<label class="form__radio"><input type="radio" name="category_choice" value="<?=$interest_group['id']?>" class="form__input"<?=$input_validation_attributes?><?=$data_category_choice == $interest_group['id'] ? ' checked' : ''?>><b class="form__radio__radio-button"></b> <?=html($interest_group['name'])?></label>
<?php endforeach?>
<label class="form__radio"><input type="radio" name="category_choice" value="SPECIFIC_BRANDS" class="form__input"<?=$input_validation_attributes?><?=$data_category_choice == 'SPECIFIC_BRANDS' ? ' checked' : ''?> <?=$input_validation_attributes?>><b class="form__radio__radio-button"></b> <?=$site->mailchimp_general_category_some_brands_name()->isNotEmpty() ? $site->mailchimp_general_category_some_brands_name()->html() : 'Some&hellip;'?></label>
</fieldset>
</div>
<div class="form__input-container newsletter-form__brand-choice">
<fieldset class="form__fieldset newsletter-form__fieldset--brand-choice" id="<?=$unique_prefix?>_newsletter-form__brand-choice">
<legend class="form__legend">Select the brands you want to receive updates about</legend>
<?php
$data_brand_choice = isset($data['brand_choice']) ? $data['brand_choice'] : [];
if (!is_array($data_brand_choice)) {
    $data_brand_choice = [];
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
kirby
/
src
/
Toolkit
/
Tpl.php
    /**
     * Renders the template
     *
     * @param string $__file
     * @param array $__data
     * @return string
     */
    public static function load(string $__file = null, array $__data = []): string
    {
        if (file_exists($__file) === false) {
            return '';
        }
 
        $exception = null;
 
        ob_start();
        extract($__data);
 
        try {
            require $__file;
        } catch (Throwable $e) {
            $exception = $e;
        }
 
        $content = ob_get_contents();
        ob_end_clean();
 
        if ($exception === null) {
            return $content;
        }
 
        throw $exception;
    }
}
 
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
kirby
/
config
/
components.php
     * @param string|array $name Snippet name
     * @param array $data Data array for the snippet
     * @return string|null
     */
    'snippet' => function (App $kirby, $name, array $data = []): ?string {
        $snippets = A::wrap($name);
 
        foreach ($snippets as $name) {
            $file = $kirby->root('snippets') . '/' . $name . '.php';
 
            if (file_exists($file) === false) {
                $file = $kirby->extensions('snippets')[$name] ?? null;
            }
 
            if ($file) {
                break;
            }
        }
 
        return Snippet::load($file, $data);
    },
 
    /**
     * Add your own template engine
     *
     * @param Kirby\Cms\App $kirby Kirby instance
     * @param string $name Template name
     * @param string $type Extension type
     * @param string $defaultType Default extension type
     * @return Kirby\Cms\Template
     */
    'template' => function (App $kirby, string $name, string $type = 'html', string $defaultType = 'html') {
        return new Template($name, $type, $defaultType);
    },
 
    /**
     * Add your own thumb generator
     *
     * @param Kirby\Cms\App $kirby Kirby instance
     * @param string $src The root of the original file
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
kirby
/
src
/
Cms
/
App.php
    {
        $options = $this->option('smartypants', []);
 
        if ($options === true) {
            $options = [];
        }
 
        return $this->component('smartypants')($this, $text, $options);
    }
 
    /**
     * Uses the snippet component to create
     * and return a template snippet
     *
     * @internal
     * @return string
     */
    public function snippet($name, array $data = []): ?string
    {
        return $this->component('snippet')($this, $name, array_merge($this->data, $data));
    }
 
    /**
     * System check class
     *
     * @return Kirby\Cms\System
     */
    public function system()
    {
        return $this->system = $this->system ?? new System($this);
    }
 
    /**
     * Uses the template component to initialize
     * and return the Template object
     *
     * @internal
     * @return Kirby\Cms\Template
     */
    public function template(string $name, string $type = 'html', string $defaultType = 'html')
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
kirby
/
config
/
helpers.php
function smartypants(string $text = null): string
{
    return App::instance()->smartypants($text);
}
 
/**
 * Embeds a snippet from the snippet folder
 *
 * @param string|array $name
 * @param array|object $data
 * @param boolean $return
 * @return string
 */
function snippet($name, $data = [], bool $return = false)
{
    if (is_object($data) === true) {
        $data = ['item' => $data];
    }
 
    $snippet = App::instance()->snippet($name, $data);
 
    if ($return === true) {
        return $snippet;
    }
 
    echo $snippet;
}
 
/**
 * Includes an SVG file by absolute or
 * relative file path.
 *
 * @param string $file
 * @return string
 */
function svg(string $file)
{
    $extension = F::extension($file);
 
    // check for valid svg files
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
site
/
templates
/
newsletter-form.php
<?php snippet('page-skeleton/page-start-template', array('pageStartParams' => array('bodyClass' => 'page page--newsletter-form')))?>
<?php
$form_snippet_params = [];
if ($page->response_data()->isNotEmpty()) {
    $form_snippet_params['response_data'] = $page->response_data()->value();
}
if ($page->data()->isNotEmpty()) {
    $form_snippet_params['data'] = $page->data()->value();
}
if ($page->email_prefilled()->isNotEmpty()) {
    $form_snippet_params['email_prefilled'] = $page->email_prefilled()->value();
}
?>
<?php snippet('common-elements/newsletter/newsletter-form', $form_snippet_params);?>
<?php snippet('page-skeleton/page-end-template')?>
 
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
kirby
/
src
/
Toolkit
/
Tpl.php
    /**
     * Renders the template
     *
     * @param string $__file
     * @param array $__data
     * @return string
     */
    public static function load(string $__file = null, array $__data = []): string
    {
        if (file_exists($__file) === false) {
            return '';
        }
 
        $exception = null;
 
        ob_start();
        extract($__data);
 
        try {
            require $__file;
        } catch (Throwable $e) {
            $exception = $e;
        }
 
        $content = ob_get_contents();
        ob_end_clean();
 
        if ($exception === null) {
            return $content;
        }
 
        throw $exception;
    }
}
 
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
kirby
/
src
/
Cms
/
Template.php
        }
    }
 
    /**
     * Returns the template name
     *
     * @return string
     */
    public function name(): string
    {
        return $this->name;
    }
 
    /**
     * @param array $data
     * @return string
     */
    public function render(array $data = []): string
    {
        return Tpl::load($this->file(), $data);
    }
 
    /**
     * Returns the root to the templates directory
     *
     * @return string
     */
    public function root(): string
    {
        return App::instance()->root($this->store());
    }
 
    /**
     * Returns the template type
     *
     * @return string
     */
    public function type(): string
    {
        return $this->type;
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
site
/
plugins
/
kirby-twig
/
src
/
classes
/
Template.php
                return App::instance()->extension('templates', $name);
            }
        }
    }
 
    /**
     * Renders the template by page with the additional data
     * @param Page|string $template
     * @param array $data
     * @param boolean $return
     * @return string
     * @throws Exception
     */
    // public function render($template, $data = [], $return = true)
    public function render(array $data = []): string
    {
        if ($this->isTwig()) {
            return $this->twig->renderPath($this->name() . '.' . $this->extension(), $data, true);
        }
        return parent::render($data);
    }
}
 
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
kirby
/
src
/
Cms
/
Page.php
        }
 
        // fetch the page regularly
        if ($html === null) {
            $kirby->data = $this->controller($data, $contentType);
 
            if ($contentType === 'html') {
                $template = $this->template();
            } else {
                $template = $this->representation($contentType);
            }
 
            if ($template->exists() === false) {
                throw new NotFoundException([
                    'key' => 'template.default.notFound'
                ]);
            }
 
            // render the page
            $html = $template->render($kirby->data);
 
            // convert the response configuration to an array
            $response = $kirby->response()->toArray();
 
            // cache the result
            if ($cache !== null) {
                $cache->set($cacheId, [
                    'html'     => $html,
                    'response' => $response
                ]);
            }
        }
 
        return $html;
    }
 
    /**
     * @internal
     * @return Kirby\Cms\Template
     */
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
kirby
/
src
/
Cms
/
App.php
        }
 
        // Empty input
        if (empty($input) === true) {
            return $this->io(new NotFoundException());
        }
 
        // Response Configuration
        if (is_a($input, 'Kirby\Cms\Responder') === true) {
            return $input->send();
        }
 
        // Responses
        if (is_a($input, 'Kirby\Http\Response') === true) {
            return $input;
        }
 
        // Pages
        if (is_a($input, 'Kirby\Cms\Page')) {
            $html = $input->render();
 
            if ($input->isErrorPage() === true) {
                if ($response->code() === null) {
                    $response->code(404);
                }
            }
 
            return $response->send($html);
        }
 
        // Files
        if (is_a($input, 'Kirby\Cms\File')) {
            return $response->redirect($input->mediaUrl(), 307)->send();
        }
 
        // Simple HTML response
        if (is_string($input) === true) {
            return $response->send($input);
        }
 
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
kirby
/
src
/
Cms
/
App.php
 
        $requestUri  = '/' . $this->request()->url()->path();
        $scriptName  = $_SERVER['SCRIPT_NAME'];
        $scriptFile  = basename($scriptName);
        $scriptDir   = dirname($scriptName);
        $scriptPath  = $scriptFile === 'index.php' ? $scriptDir : $scriptName;
        $requestPath = preg_replace('!^' . preg_quote($scriptPath) . '!', '', $requestUri);
 
        return $this->setPath($requestPath)->path;
    }
 
    /**
     * Returns the Response object for the
     * current request
     *
     * @return Kirby\Http\Response
     */
    public function render(string $path = null, string $method = null)
    {
        return $this->io($this->call($path, $method));
    }
 
    /**
     * Returns the Request singleton
     *
     * @return Kirby\Http\Request
     */
    public function request()
    {
        return $this->request = $this->request ?? new Request;
    }
 
    /**
     * Path resolver for the router
     *
     * @internal
     * @param string $path
     * @param string|null $language
     * @return mixed
     */
/
var
/
www
/
vhosts
/
studiof.be
/
httpsdocs
/
index.php
<?php
 
require 'kirby/bootstrap.php';
 
echo (new Kirby)->render();
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
PP_CUSTOM_PHP_INI /var/www/vhosts/system/studiof.be/etc/php.ini
PP_CUSTOM_PHP_CGI_INDEX plesk-php74-fastcgi
SCRIPT_NAME /index.php
REQUEST_URI /newsletter/
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /newsletter/
REMOTE_PORT 58820
SCRIPT_FILENAME /var/www/vhosts/studiof.be/httpsdocs/index.php
SERVER_ADMIN root@localhost
CONTEXT_DOCUMENT_ROOT /var/www/vhosts/studiof.be/httpsdocs
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /var/www/vhosts/studiof.be/httpsdocs
REMOTE_ADDR 54.175.5.131
SERVER_PORT 443
SERVER_ADDR 185.95.44.53
SERVER_NAME studiof.be
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_CONNECTION close
HTTP_X_REAL_IP 54.175.5.131
HTTP_HOST studiof.be
HTTPS on
PERL5LIB /usr/share/awstats/lib:/usr/share/awstats/plugins
HTTP_AUTHORIZATION
SCRIPT_URI https://studiof.be/newsletter/
SCRIPT_URL /newsletter/
UNIQUE_ID ZgZ7ge9QtZ@yaaDQeTr5@AAAAAA
REDIRECT_STATUS 200
REDIRECT_HTTPS on
REDIRECT_PERL5LIB /usr/share/awstats/lib:/usr/share/awstats/plugins
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_SCRIPT_URI https://studiof.be/newsletter/
REDIRECT_SCRIPT_URL /newsletter/
REDIRECT_UNIQUE_ID ZgZ7ge9QtZ@yaaDQeTr5@AAAAAA
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711700865.2291
REQUEST_TIME 1711700865
empty
0. Whoops\Handler\PrettyPageHandler