Skip to content

Stop fatal errors when the SCSS or CSS folder is not readable - #279

Merged
shadoath merged 1 commit into
masterfrom
fix/unreadable-dir-fatal
Nov 3, 2026
Merged

shadoath merged 1 commit into
masterfrom
fix/unreadable-dir-fatal

Conversation

@shadoath

@shadoath shadoath commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Done when: with the SCSS or CSS folder set to mode 000, the front end loads without a PHP fatal, and wp-admin shows "The SCSS directory does not exist or is not readable". Checked in Docker (WP 7.1.4, PHP 8.4): master prints Fatal error: Uncaught UnexpectedValueException on both; this branch doesn't.
  • Fixes Permission Denied #187: DirectoryIterator and RecursiveDirectoryIterator throw when they can't open a folder, and nothing catches it, so one bad permission took down every page. The existing "directory exists" checks now also check that the folder is readable. The recursive change scan now skips unreadable subfolders (CATCH_GET_CHILD) and passes SKIP_DOTS to the right constructor; before, it was passed as the iterator mode.
  • How this could fail: if a subfolder of partials is unreadable, its changes are no longer noticed, so the CSS goes stale without a warning until the main file changes and the import fails with a normal compile error. That's an improvement on a fatal, but it is silent.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shadoath

shadoath commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@shadoath
shadoath merged commit f9bc764 into master Nov 3, 2026
@shadoath
shadoath deleted the fix/unreadable-dir-fatal branch November 3, 2026 02:56
@shadoath shadoath mentioned this pull request Nov 3, 2026
shadoath added a commit that referenced this pull request Nov 3, 2026
* Version bump to 5.1.0

Ships the Compile Now button and deploy webhook (#281), the WP_SCSS_OPTIONS wp-config override (#282), the File sourcemap fix (#280) and the unreadable-directory fatal fix (#279). Updates the version in wp-scss.php, the readme.txt Stable tag, and adds the 5.1.0 changelog entry to readme.txt and readme.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Remove the looking-for-a-maintainer notice from both readmes

Issue #242 is closed; the plugin is actively maintained again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

Permission Denied

1 participant