Fehler in Rocksolid-Template: non-numeric value encountered (PHP 7.1)
Ich hab das nachfolgende Template gebaut und erhalte im Backend nun unter Contao 4.4 immer die Meldung:
Code:
Warning: A non-numeric value encountered in /www/htdocs/XXX/templates/da-theme/rsce_service.html5 on line 10
0
Warning: A non-numeric value encountered in /www/htdocs/XXX/templates/da-theme/rsce_service.html5 on line 11
0
Warning: A non-numeric value encountered in /www/htdocs/XXX/templates/da-theme/rsce_service.html5 on line 19
0
Warning: A non-numeric value encountered in /www/htdocs/XXX/templates/da-theme/rsce_service.html5 on line 21
0
Hat jemand einen Tipp, wo ich den Fehler reingeschmissen habe?
rsc_service_config.php:
PHP-Code:
<?php
// rsce_service_config.php
return array(
'label' => array(
'de' => array(
'Leistungen',
'Eine Liste von Dienstleistungen mit Titel, Kurzbeschreibung uvm.',
),
'en' => array(
'Services',
'A list of services with title, short description and more.',
),
),
'types' => array('content'),
'contentCategory' => 'texts',
'standardFields' => array('cssID'),
'fields' => array(
'services' => array(
'label' => array(
'de' => array(
'Leistungen',
'Fügen Sie eine beliebige Anzahl an Dienstleistungen ein.',
),
'en' => array(
'Services',
'Add any number of services.',
),
),
'elementLabel' => array(
'de' => 'Leistung %s',
'en' => 'Service %s',
),
'inputType' => 'list',
'fields' => array(
'service-title' => array(
'label' => array(
'de' => array('Titel', 'Titel der Leistung'),
'en' => array('Title', 'Title of service'),
),
'inputType' => 'text',
'eval' => array(
'tl_class' => 'w50',
'mandatory' => true,
'allowHtml' => true,
),
),
'service-subtitle' => array(
'label' => array(
'de' => array('Untertitel', 'Untertitel der Leistung'),
'en' => array('Subtitle', 'Subtitle of service'),
),
'inputType' => 'text',
'eval' => array(
'tl_class' => 'w50',
'mandatory' => true,
'allowHtml' => true,
),
),
'image' => array(
'label' => array(
'de' => array('Bild', 'Bild der Leistung'),
'en' => array('Picture', 'Picture of service'),
),
'inputType' => 'fileTree',
'eval' => array(
'fieldType' => 'radio',
'filesOnly' => true,
'extensions' => 'jpg,jpeg,png,gif,svg',
),
),
'service-shortdesc' => array(
'label' => array(
'de' => array('Kurzbeschreibung', 'Kurzbeschreibung der Leistung'),
'en' => array('Short description', 'Short description of service'),
),
'inputType' => 'text',
'eval' => array(
'tl_class' => 'w50',
),
),
'service-link' => array(
'label' => array(
'de' => array('Link', 'Link auswählen'),
'en' => array('Link', 'Choose link'),
),
'inputType' => 'url',
),
),
),
),
);
Und eine rudimentäre rsce_service.html5 zum Testen:
HTML-Code:
<!-- rsce_service.html5 -->
<section class="solution-area <?php echo $this->class ?> block"<?php echo $this->cssID ?>>
<div class="container">
<div class="row">
<?php foreach ($this->services as $service): ?>
<div class="col-md-4">
<div class="single-solution-item">
<div class="title-holder">
<h3><?php echo $service->service-title ?></h3>
<h4><?php echo $service->service-subtitle ?></h4>
<p>
<?php if ($image = $this->arrData['getImageObject']($service->image, array(120, 120))): ?>
<img src="<?php echo $image->src ?>" alt="<?php echo $image->alt ?: $service->service-title ?>"<?php echo $image->imgSize ?>>
<?php endif ?>
<?php echo $service->service-shortdesc ?><br>
<?php echo $service->service-link ?>
</p>
</div>
</div>
</div>
<?php endforeach ?>
</div>
</div>
</section>