Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

downloadReport function is returning the wrong directory seperator on linux #42

Open
nlhooper opened this issue Mar 30, 2021 · 0 comments

Comments

@nlhooper
Copy link

The downloadReport funciton in ExternalConfiguration.php is using a hardcoded backslash in the returned path, which is incorrect on Linux. (apologies I dont know why the line breaks arent appearing in the code block):

function downloadReport($downloadData, $fileName){ $filePathName = __DIR__. DIRECTORY_SEPARATOR .$fileName; $file = fopen($filePathName, "w"); fwrite($file, $downloadData); fclose($file); return __DIR__.'\\'.$fileName; }

It should use the php constant DIRECTORY_SEPARATOR and as the path is already stored in the filePathName variable the return fucntion can be corrected to
return $filePathName;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant