PHP errors in help.php if file/directory does not exist [patch attached]

Project:ProjectPier
Version:0.8.8-stable
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:patch - code needs review
Description

In the check_directory() and check_file() functions in help.php, there are a bunch of checks that will fail with a PHP notice if the file/directory doesn't exist. Also, checks such as whether the file is readable are a bit meaningless for non-existent items.

This patch updates the functions so that they bail out after the first test if the item does not exist. This avoids the PHP errors and meaningless information that is otherwise displayed.

Hope you can incorporate into the next release.

AttachmentSize
help.php.patch1.05 KB
#1
Status:new» patch - code needs review
#2

I have created a pull request on GitHub containing this patch. Hopefully it will be applied to the main repository soon!