Masterminds / Masterminds/html5-php

Error in php 8.1

Open
#225 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.8k
Forks
122
PR merge metrics
No merged PRs in 30d

Description

src/HTML5/Parser/UTF8Utils.php

$data = mb_convert_encoding($data, 'UTF-8', $encoding);

error if $data is null in PHP 8.1
help this:

$data = mb_convert_encoding($data.'', 'UTF-8', $encoding);

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/HTML5/Parser/UTF8Utils.php at the mb_convert_encoding call and reproduce the reported behavior under PHP 8.1. Done means null data no longer causes the reported error and the relevant project checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
web-dev
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.