Skip to content

Commit

Permalink
Throw exception when upload folder is not valid
Browse files Browse the repository at this point in the history
  • Loading branch information
vboctor committed Jan 17, 2018
1 parent 9d10ee2 commit a80842f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/file_api.php
Expand Up @@ -951,7 +951,9 @@ function file_allow_bug_upload( $p_bug_id = null, $p_user_id = null ) {
*/
function file_ensure_valid_upload_path( $p_upload_path ) {
if( !file_exists( $p_upload_path ) || !is_dir( $p_upload_path ) || !is_writable( $p_upload_path ) || !is_readable( $p_upload_path ) ) {
trigger_error( ERROR_FILE_INVALID_UPLOAD_PATH, ERROR );
throw new ServiceException(
'Upload folder not valid',
ERROR_FILE_INVALID_UPLOAD_PATH );
}
}

Expand Down

0 comments on commit a80842f

Please sign in to comment.