The problem occurs here:
|
if (function_exists('sys_get_temp_dir')) { |
|
$file = tempnam(sys_get_temp_dir(), ""); |
|
} else { |
|
$file = tempnam("/tmp", ""); |
|
} |
|
file_put_contents($file, $raw_data); |
tempnam() can return false, which leads to file_put_contents() throwing ValueError: Path cannot be empty on PHP 8+.
The problem occurs here:
htmlpurifier/library/HTMLPurifier/URIScheme/data.php
Lines 89 to 94 in b287d2a
tempnam()can returnfalse, which leads tofile_put_contents()throwingValueError: Path cannot be emptyon PHP 8+.