Commit 38cb99a9 authored by Elias Villiger's avatar Elias Villiger
Browse files

Support 6645 - better error message for incomplete download as link

parent d42b5711
Pipeline #884 passed with stage
in 1 minute and 36 seconds
...@@ -226,7 +226,8 @@ class Download { ...@@ -226,7 +226,8 @@ class Download {
$arr = explode(':', $element, 2); $arr = explode(':', $element, 2);
if (count($arr) != 2) { if (count($arr) != 2) {
throw new DownloadException('Missing parameter for "' . $element . '"', ERROR_MISSING_REQUIRED_PARAMETER); $possibleReason = ($element === '') ? 'If this is a download link, did you forget to include s:1?' : '';
throw new DownloadException("Missing parameter for '$element'. $possibleReason", ERROR_MISSING_REQUIRED_PARAMETER);
} }
$token = $arr[0]; $token = $arr[0];
......
Supports Markdown
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