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

Fixed deprecation warning if downloadable sample is a url #3619

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,15 @@
"contributions": [
"code"
]
},
{
"login": "ma4nn",
"name": "Christoph Massmann",
"avatar_url": "https://avatars.githubusercontent.com/u/26252058?v=4",
"profile": "https://www.vianetz.com/",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/leissbua"><img src="https://avatars.githubusercontent.com/u/68073221?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Michael Leiss</b></sub></a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.riseart.com/"><img src="https://avatars.githubusercontent.com/u/26821235?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Marcos Steverlynck</b></sub></a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ahudock"><img src="https://avatars.githubusercontent.com/u/33500977?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Andy Hudock</b></sub></a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.vianetz.com/"><img src="https://avatars.githubusercontent.com/u/26252058?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Christoph Massmann</b></sub></a></td>
</tr>
</tbody>
</table>
Expand Down
6 changes: 5 additions & 1 deletion app/code/core/Mage/Downloadable/Helper/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,15 @@ protected function _moveFileFromTmp($baseTmpPath, $basePath, $file)
* Return full path to file
*
* @param string $path
* @param string $file
* @param string|null $file
* @return string
*/
public function getFilePath($path, $file)
{
if ($file === null || $file === '') {
return $path . DS;
}

$file = $this->_prepareFileForPath($file);

if (substr($file, 0, 1) == DS) {
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Downloadable/Model/Sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @method $this setProductId(int $value)
* @method string getSampleUrl()
* @method $this setSampleUrl(string $value)
* @method string getSampleFile()
* @method string|null getSampleFile()
* @method $this setSampleFile(string $value)
* @method string getSampleType()
* @method $this setSampleType(string $value)
Expand Down
Loading