Skip to content

Commit

Permalink
[Bugfix] Project abstract has to be a string for nl2br and strip_tags
Browse files Browse the repository at this point in the history
Abstract has to be a string

```
[8192] strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated
  /srv/lzm/temp/lizmap/www/compiled/templates/modules/view/view_html_t_15.php 41
  /index.php/view/
   array (   \'module\' => \'view\',   \'action\' => \'default:index\', )
   ref:Unknown referer
  0 strip_tags() /srv/lzm/temp/lizmap/www/compiled/templates/modules/view/view_html_t_15.php : 41
  1 template_97ecf81651077e876942eb1c8b4df3b8() /srv/lzm/lizmap/vendor/jelix/castor/lib/Castor/CastorCore.php : 290
  2 Jelix\\Castor\\CastorCore->_fetch() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/tpl/jTpl.class.php : 181
  3 jTpl->fetch() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/utils/jZone.class.php : 287
  4 jZone->_createContent()\t/srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/utils/jZone.class.php : 217
  5 jZone->getContent()\t/srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/utils/jZone.class.php : 373
  6 jZone::_callZone()\t/srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/utils/jZone.class.php : 114
  7 jZone::get() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/tpl/jTpl.class.php : 52
  8 jTpl->assignZone() /srv/lzm/lizmap/modules/view/controllers/default.classic.php : 157
  9 defaultCtrl->index()\t/srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/core/jCoordinator.class.php : 266
  10 jCoordinator->process() /srv/lzm/lizmap/www/index.php : 23

[8192]\tnl2br(): Passing null to parameter #1 ($string) of type string is deprecated
  /srv/lzm/lizmap/vendor/jelix/castor/lib/plugins/html/modifier.nl2br.php 26
  /index.php/view/\n array (   \'module\' => \'view\',   \'action\' => \'default:index\', )
   ref:Unknown referer
  0 nl2br() /srv/lzm/lizmap/vendor/jelix/castor/lib/plugins/html/modifier.nl2br.php : 26
  1 jtpl_modifier_html_nl2br() /srv/lzm/temp/lizmap/www/compiled/templates/modules/view/view_html_t_15.php : 86
  2 template_97ecf81651077e876942eb1c8b4df3b8() /srv/lzm/lizmap/vendor/jelix/castor/lib/Castor/CastorCore.php : 290
  3 Jelix\\Castor\\CastorCore->_fetch() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/tpl/jTpl.class.php : 181
  4 jTpl->fetch() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/utils/jZone.class.php : 287
  5 jZone->_createContent() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/utils/jZone.class.php : 217
  6 jZone->getContent() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/utils/jZone.class.php : 373
  7 jZone::_callZone() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/utils/jZone.class.php : 114
  8 jZone::get() /srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/tpl/jTpl.class.php : 52
  9 jTpl->assignZone() /srv/lzm/lizmap/modules/view/controllers/default.classic.php : 157
  10 defaultCtrl->index()\t/srv/lzm/lizmap/vendor/jelix/jelix/lib/jelix/core/jCoordinator.class.php : 266
  11 jCoordinator->process()\t/srv/lzm/lizmap/www/index.php : 23
```
  • Loading branch information
rldhont authored and github-actions[bot] committed Dec 6, 2024
1 parent 861558c commit 8210bfe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lizmap/modules/lizmap/lib/Project/ProjectMainData.php
Original file line number Diff line number Diff line change
Expand Up @@ -547,13 +547,13 @@ protected function readCachedData($cachedData, $requiredTargetLwcVersion, $appCo
);

$qgisCachedData = $cachedData['qgis']['data'];
if (array_key_exists('title', $qgisCachedData)) {
if (array_key_exists('title', $qgisCachedData) && !is_null($qgisCachedData['title'])) {
$data['title'] = $qgisCachedData['title'];
}
if (array_key_exists('abstract', $qgisCachedData)) {
if (array_key_exists('abstract', $qgisCachedData) && !is_null($qgisCachedData['abstract'])) {
$data['abstract'] = $qgisCachedData['abstract'];
}
if (array_key_exists('keywordList', $qgisCachedData)) {
if (array_key_exists('keywordList', $qgisCachedData) && !is_null($qgisCachedData['keywordList'])) {
$data['keywordList'] = $qgisCachedData['keywordList'];
}

Expand Down

0 comments on commit 8210bfe

Please sign in to comment.