Hello,
I’m working on a website that uses Download Manager Pro and revisions are enabled for Download Manager post type.
The fields __wpdm_files, __wpdm_version and __wpdm_fileinfo are included to be saved in revisions.
When I publish or update a Download Manager post type, for example, there is a warning in PHP 7.4 :
Warning: trim() expects parameter 1 to be string, array given in [sitePath]/wp-includes/formatting.php on line 5365
It’s because the normalize_whitespace function expecting a string.
When I use PHP 8.1, it has become a fatal error :
Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in [sitePath]/wp-includes/formatting.php:5365 Stack trace: #0 [sitePath]/wp-includes/formatting.php(5365): trim(Array) #1 [sitePath]/wp-includes/revision.php(163): normalize_whitespace(Array)
How can I include this fields with PHP 8.1 without to patch the normalize_whitespace function ?
Thank you for your help.
David