You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
web2project_autoload() includes without checking the file exists #468
It doesn't check that the file exists first. So any w2p_* name that has no matching file emits include(...): Failed to open stream and include(): Failed opening ... warnings before the real Class not found error. That covers a typo, a class an add-on module still expects (for example w2p_Output_PDFRenderer, which dev-6.0.0 removes), or a class_exists('w2p_...') probe. On installs with display_errors on, those warnings also leak the absolute install path.
An autoloader also shouldn't return a value. SPL ignores it, and include returns 1 on success.
Fix: build the path, return early when !is_file($path), and use require_once for files that do exist. This goes away entirely if the classes move to Composer PSR-4 autoloading (PSR-4 migration proposal, #470), but it's worth fixing on dev-5.0.0 now.
Activity
web2project_autoload(): skip class names with no file