Use getPathname() instead of string casting to get BinaryFileReponse file path
bug #11837 Use getPathname() instead of string casting to get BinaryFileReponse file path (nervo)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11837).

Discussion
----------

Use getPathname() instead of string casting to get BinaryFileReponse file path

According to the code, should be "File" instead of "\SplFileInfo"

Commits
-------

e1eb788 Use getPathname() instead of string casting to get BinaryFileReponse file path