Issue Bug Closed

#97658Import/Export too: htmlspecialchars() expects parameter 1 to be string, null given

Lina Wolf 05/19/22, 06:29 updated 10/04/22, 14:04

Description

Export from TYPO3 8.7.46 (eLTS) into 11.5.10:

Simple pagetree, 2 levels with content elements and some missing pictures.

I get the following error up-on hitting the preview button:

htmlspecialchars() expects parameter 1 to be string, null given
in /var/www/html/web/typo3/sysext/impexp/Classes/ImportExport.php line 854
            $line['title'] = sprintf(
                '<em>%s, "%s"</em> : <span title="%s">%s</span>',
                $softref['field'],
                $softref['spKey'],
                htmlspecialchars($softref['matchString']),
                htmlspecialchars(GeneralUtility::fixed_lgd_cs($softref['matchString'], 60))
            );
            if ($softref['subst']['type'] ?? false) {
                if ($softref['subst']['title'] ?? false) {

When I replace `htmlspecialchars($softref[‘matchString’])`, with `htmlspecialchars($softref[‘matchString’]??’‘),` the import works without issue

Reviews 2