Changeset 48789
- Timestamp:
- 08/12/2020 03:23:47 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-oembed.php
r48586 r48789 598 598 } 599 599 600 $loader = libxml_disable_entity_loader( true ); 600 if ( PHP_VERSION_ID < 80000 ) { 601 // This function has been deprecated in PHP 8.0 because in libxml 2.9.0, external entity loading 602 // is disabled by default, so this function is no longer needed to protect against XXE attacks. 603 // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.libxml_disable_entity_loaderDeprecated 604 $loader = libxml_disable_entity_loader( true ); 605 } 606 601 607 $errors = libxml_use_internal_errors( true ); 602 608 … … 604 610 605 611 libxml_use_internal_errors( $errors ); 606 libxml_disable_entity_loader( $loader ); 612 613 if ( PHP_VERSION_ID < 80000 && isset( $loader ) ) { 614 // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.libxml_disable_entity_loaderDeprecated 615 libxml_disable_entity_loader( $loader ); 616 } 607 617 608 618 return $return;
Note: See TracChangeset
for help on using the changeset viewer.