Block Supports: Avoid PHP warnings on libxml < 2.7.8#26210
Closed
getsource wants to merge 1 commit into
Closed
Conversation
Only specifies `LIBXML_HTML_NODEFDTD` when defined. Fix ported from the AMP WordPress Plugin: https://github.com/ampproject/amp-wp/pull/4486/files Props @schlessera. See WordPress#25122.
|
|
||
| // LIBXML_HTML_NODEFDTD is only available in libxml 2.7.8+. | ||
| if ( defined( 'LIBXML_HTML_NODEFDTD' ) ) { | ||
| $options |= constant( 'LIBXML_HTML_NODEFDTD' ); |
Member
There was a problem hiding this comment.
I think we should just be able to use the constant at this point, we don't need to wrap it in constant().
Member
Author
|
Closing this out, as it was solved in PR #26192 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Only include
LIBXML_HTML_NODEFDTDas aloadHTML()option if it is defined.Fix ported from the AMP WordPress Plugin:
https://github.com/ampproject/amp-wp/pull/4486/files
(amp-wp is GPLv2: https://github.com/ampproject/amp-wp/blob/develop/LICENSE)
Props @schlessera.
See #25122.
Description
Only include
LIBXML_HTML_NODEFDTDas aloadHTML()option if it is defined.How has this been tested?
Types of changes
This is a bug fix to avoid PHP warnings when PHP is compiled with libxml < 2.7.8
Checklist: