Skip to content
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

51423: AtomParser: fixes PHP 8 fatal error in wp-includes/atomlib.php #718

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Nov 9, 2020

  1. Configuration menu
    Copy the full SHA
    ed241ea View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2020

  1. Configuration menu
    Copy the full SHA
    3e538e3 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2020

  1. Skips while and fclose to ensure rest of code runs.

    If a plugin/theme changes AtomParser::FILE to an invalid or unavailable
    resource, fopen will return `false`.
    
    - PHP 8: `fread` throws a fatal error as its 1st param requires
      a resource type.
    - <PHP 8: `fread` and `fclose` throw a warning, but code continues
      to run.
    
    This commit:
    
    - wraps the entire `while` block and `fclose` to prevent the PHP 8
      fatal error.
    - allows the remaining code to run to ensure the parser is freed
      and error handler restored.
    hellofromtonya committed Nov 22, 2020
    Configuration menu
    Copy the full SHA
    ba0ef76 View commit details
    Browse the repository at this point in the history