Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-16834

DOMDocument does not like HTML5 and SVGs - PHP 8

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.0-a1
    • Fix Version/s: None
    • Component/s: Template Engine
    • Labels:
    • Environment:
      php 8.0.9
      phpbb latest master branch on this date of posting

      Description

      Only visible if you have "debug.show_errors: true" in the yaml file.

       

      [phpBB Debug] PHP Warning: in file [ROOT]/phpbb/template/twig/extension/icon.php on line 202: DOMDocument::loadHTML(): Tag svg invalid in Entity, line: 1
      

      DOMDocument does not like HTML5 and SVGs but `@` suppression does not work with PHP 8

      Line 202 of icon.php

      		@$doc->loadHTML($code, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
      

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            3Di 3Di
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: