-
Notifications
You must be signed in to change notification settings - Fork 354
ValueError: Path cannot be empty in file_put_contents() #480
Copy link
Copy link
Open
Description
The problem occurs here:
htmlpurifier/library/HTMLPurifier/URIScheme/data.php
Lines 89 to 94 in b287d2a
| 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+.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels