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

Download is not working properly after updating to 4.0.2 #196

Closed
mediaessenz opened this issue Sep 26, 2022 · 6 comments
Closed

Download is not working properly after updating to 4.0.2 #196

mediaessenz opened this issue Sep 26, 2022 · 6 comments
Assignees
Labels

Comments

@mediaessenz
Copy link
Contributor

mediaessenz commented Sep 26, 2022

The problem is the change came with commit 54b1a45 in the FileDumpHook::fileDumpContens method:

[pre commit]  $downloadName = $file->getProperty('download_name') ?: $file->getName();
[new] $downloadName = $file->hasProperty('download_name') ? $file->getProperty('download_name') : $file->getName();

The problem is, that $file->hasProperty('download_name') is alway true, if the sysext:filemetadata is installed.

Changing this line to the following solves the issue:

$downloadName = $file->hasProperty('download_name') && $file->getProperty('download_name') ? $file->getProperty('download_name') : $file->getName();
@mediaessenz mediaessenz changed the title Download is not working properly after updateing to 4.0.2 Download is not working properly after updating to 4.0.2 Sep 26, 2022
@FamousWolf FamousWolf self-assigned this Sep 26, 2022
@FamousWolf FamousWolf added the bug label Sep 26, 2022
@FamousWolf
Copy link
Contributor

@mediaessenz Do you want to create a PR for this (so you get the credit) or do you want me to do it?

@mediaessenz
Copy link
Contributor Author

I will do it :-)

mediaessenz added a commit to mediaessenz/fal_securedownload that referenced this issue Sep 26, 2022
@FamousWolf
Copy link
Contributor

Thanks. I'll test and merge it tomorrow.

@FamousWolf
Copy link
Contributor

Unfortunately I didn't have time for this yesterday. I've moved it to Friday.

@aWuttig
Copy link

aWuttig commented Nov 23, 2022

@FamousWolf Could you please release a new version 4.0.3 with the fix.

@FamousWolf
Copy link
Contributor

@aWuttig I was waiting for a reply to a different issue, but they're not replying. So I just released 4.0.3.

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

No branches or pull requests

3 participants