Page 1 of 1

HTMLPurifier - str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Posted: Tue Aug 09, 2022 2:20 pm
by iggabz

Good day,

I was working on a project then suddenly after the latest generation this error occurred

C:\xampp\htdocs\project1\vendor\ezyang\htmlpurifier\library\HTMLPurifier\Lexer.php(309): str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

anyone encountered and has resolved this?


Re: HTMLPurifier - str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Posted: Tue Aug 09, 2022 2:23 pm
by arbei

Current release (v4.14.0) of HTMLPurifier does not support PHP 8.1 yet, but you may try to change to the "dev-master" version, see Composer Packages.


Re: HTMLPurifier - str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Posted: Tue Aug 09, 2022 2:53 pm
by iggabz

sorry i did not get your suggestion as i am a still a monkey at coding.

what do i search on the composer package?


Re: HTMLPurifier - str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Posted: Tue Aug 09, 2022 4:23 pm
by arbei

iggabz wrote:

C:\xampp\htdocs\project1\vendor\ ezyang\htmlpurifier \library\HTMLPurifier\Lexer.php(309):


Re: HTMLPurifier - str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Posted: Wed Aug 10, 2022 1:01 pm
by iggabz

thank you for the assistance.