#57: Do not fatal if empty/null manifest is passed to registration functions #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 likeis_readable
cannot accept anull
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.