Skip to content

#57: Do not fatal if empty/null manifest is passed to registration functions #59

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

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

kadamwhite
Copy link
Collaborator

For #57

Currently, if a theme implements the common pattern of using its own system to identify the manifest to use, and no matching manifest is found, the theme sometimes passes null to the registration or manifest loader functions. In both cases this caused a TypeError, since functions like is_readable cannot accept a null argument.

This patch guards against these errors by catching a missing manifest, and logs a notice instead indicating the theme or plugin call that corresponds to the missing file. This is a much more reliable way to indicate a rebuild is needed, and (among other things) makes it possible to bisect back and forth through theme code while tracing non-asset-related errors without having to make a time-consuming rebuild on each step.

Copy link
Contributor

@MiguelAxcar MiguelAxcar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome @kadamwhite

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.

2 participants