WebDevStudios / oops-wp

A collection of abstract classes, interfaces, and traits to promote object-oriented programming practices in WordPress.
57 stars 9 forks source link

Wrap example require_once in is_readable() check #33

Closed salcode closed 4 years ago

salcode commented 4 years ago

If the plugin is being loaded as a dependency of something larger (e.g. the project is loading plugins via Composer), the vendor directory may not be local to this plugin. We don't want to throw a fatal error if this is the case, so we check the file exists and is readable first.

Fixes #28

salcode commented 4 years ago

@jmichaelward Good call, it was silly of me to make the PR against master - I should know better, thanks.

Would you be open to changing the default branch to develop in the branches settings? (I'd appreciate it being more difficult for me to make the same mistake again 😀)