-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
Fixed deprecation warning if downloadable sample is a url #3619
Fixed deprecation warning if downloadable sample is a url #3619
Conversation
The method
public function getFilePath($path, $file)
{
if (!$file) {
return $path . DS;
}
// ... |
@kiatng thanks for your feedback. I didn't change that method intentionally for several reasons:
But I'm happy to change it if that's the way to go. |
I think @kiatng is right. Before deprecation |
I agree in somehow later having typehints, but at this time we maybe have rector or phpstan who let you know about issues you mention. In case that checks looks pretty safe. Even with typehints it avoids running str-functions on empty string. |
@ma4nn can you please check my last comment? I can't modify this PR because you didn't allow edits by admins. other than that I'd approve it |
80e6eb6
to
d0b50c2
Compare
@fballiano thanks I have rebased to |
@ma4nn - Could you please check this PR https://github.com/sreichel/openmage-future/pull/8 which seems to be related to yours? |
@addison74 I must admit the contribution process here in the OpenMage repo is really weired and not very encouraging 🙈 Why check another repo after I have updated this PR according to @fballiano? What do you mean with "check"? etc. |
@ma4nn - Thank you for your question and I assure you that you have no reason to worry. I personally appreciate any contribution. I noticed that your PR has a reference to another repository attached today. I looked over the other proposal, which is made by an important OpenMage contributor, who unfortunately no longer has the rights to post here and I can say that he has analyzed the issues discussed here. If it is a better PR then it should be in OpenMage, if the author agrees for his work to be brought here. If not, then I approve this PR after @kiatng expresses his opinion and we move on. |
Description (*)
This PR fixes the error
Deprecated functionality: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /app/htdocs/app/code/core/Mage/Downloadable/Helper/File.php on line 149
.It occurs when a downloadable product is edited in backend that uses urls for the samples (as opposed to files).
Manual testing scenarios (*)
Contribution checklist (*)