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

PHP warning when attempting to autoload a directory that does not exist #1

Open
philipnewcomer opened this issue Jan 12, 2017 · 0 comments

Comments

@philipnewcomer
Copy link

When attempting to autoload from a directory that does not exist, a warning is generated on line 22 ($scanned_dir = scandir( $directory );):

Warning: scandir(/nas/content/staging/cnvbillkristol/wp-content/mu-plugins/app/src): failed to open dir: No such file or directory in /nas/content/staging/cnvbillkristol/wp-content/mu-plugins/app/vendor/aaronholbrook/autoload/autoload.php on line 21

Warning: scandir(): (errno 13): Permission denied in /nas/content/staging/cnvbillkristol/wp-content/mu-plugins/app/vendor/aaronholbrook/autoload/autoload.php on line 21

The autoload script should check to make sure the directory exists before scanning it, and should fail gracefully if it does not.

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

No branches or pull requests

1 participant