hofff / contao-calendarfield

GNU Lesser General Public License v3.0
18 stars 3 forks source link

Error - Attempted to call function "specialchars" from the global namespace. #58

Open berecont opened 8 months ago

berecont commented 8 months ago

Contao 5.3.0 php81 version dev-contao5

in my customized template I get this error: Attempted to call function "specialchars" from the global namespace. with a reference to line 31

<input type="<?= $this->type ?>" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="text<?php if ($this->class): ?> <?= $this->class ?><?php endif; ?>" value="<?= specialchars($this->value) ?>"<?= $this->getAttributes() ?> data-input autocomplete="off">

changing <?= specialchars($this->value) ?> to <?= htmlspecialchars($this->value, ENT_QUOTES, 'UTF-8') ?> prevents the error.