Commit 1d6b0ca0 authored by Keven's avatar Keven
Browse files

Fixed File service returning a File instance when querying a NULL URL/slug

parent 202daa19
......@@ -25,9 +25,7 @@ abstract class FileCommand extends Command
*/
protected function setFile($file)
{
if (!$file) {
$this->path = '/files';
} else if ($file instanceof FileInterface) {
if ($file instanceof FileInterface) {
if (!$href = $file->getHref()) {
throw new BadParameterException(sprintf('"%s" command requires a valid file.', __CLASS__));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment