Error in php 8.1

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

Nobody has claimed this yet.

Assessment

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

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.

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);

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

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.

More from Masterminds/html5-php

All issues in Masterminds/html5-php

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.