PHRETS
PHRETS copied to clipboard
ErrorException tempnam(): file created in the system's temporary directory
Brief
Tried to fire up a small lumen server with this library but crashed on this error
Problem
The issue seems to be:
tempnam('/tmp', 'phrets')
in Session.php (line 484)
Why this is occurring
- In PHP 7 they introduced a warning for when you call
tempnam
and it falls back to the system's temporary directory. More info here - In Lumen and Laravel, I believe that all notices/warnings are treated like errors to enforce better coding practices.
Stats
PHP: 7.1.1
Lumen: 5.5
OS: Windows 10
PHRETS: 2.4
Is there any updates or progress on this?
I agree that hard-coded paths do not belong in the library.
Replacing /tmp
with a function call makes more sense, doesn't it?
'curl' => [ CURLOPT_COOKIEFILE => tempnam(sys_get_temp_dir(), 'phrets') ]