Errors with latest version of PWS_loadfiles.php (SOLVED)

Hi there
I had the same upgrading to PHP 8 You are using PHP 8.1
Take a look at this thread it might help?