use new temppath function

This commit is contained in:
Matthew Exon 2022-03-03 11:33:35 +01:00
parent 56519cf49a
commit 71e9d28d48

View file

@ -276,7 +276,7 @@ function retrieve_resource($resource) {
$redirects = 0;
$cookiejar = '';
if (array_key_exists('storecookies', $rule_data) && $rule_data['storecookies']) {
$cookiejar = tempnam(get_temppath(), 'cookiejar-retriever-');
$cookiejar = tempnam(System::getTempPath(), 'cookiejar-retriever-');
file_put_contents($cookiejar, $rule_data['cookiedata']);
}
$fetch_result = DI::httpClient()->fetchFull($resource['url'], $redirects, '', $cookiejar);