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

filepath variable is not always set #242

Merged
merged 1 commit into from
Apr 7, 2019
Merged

Conversation

johnennewdeeson
Copy link
Contributor

@johnennewdeeson johnennewdeeson commented Jan 10, 2019

Getting this error when executing moosh file-upload --filename=169.mbz /app/moodledata/backup.mdz

Notice: Undefined variable: filepath in /app/vendor/tmuras/moosh/Moosh/Command/Moodle23/File/FileUpload.php on line 71
Default exception handler: Cannot read file. Either the file does not exist or there is a permission problem. Debug:
Error code: storedfilecannotread```

Looking at the code in `FileUpload.php` $filepath variable is only set when the specified file does not start with a leading forward slash. In addition, $arguments[0] is used to reference the filepath throughout the code so suggest its more consistent to just use that throughout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants