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

Prevent errors when wp_insert_post filters send an unexpected type #131

Merged
merged 3 commits into from
May 11, 2023

Commits on May 9, 2023

  1. Prevent errors when wp_insert_post filters send an unexpected type

    The third argument passed along with the `wp_insert_post_data` hook can
    be a number of different types. This adds a type check to avoid PHP
    error trying to access a WP_Post object as an array.
    goldenapples committed May 9, 2023
    Configuration menu
    Copy the full SHA
    0865fcc View commit details
    Browse the repository at this point in the history
  2. Remove "array" type hint

    This function also fatals if a WP_Post is passed into it. (It'd be nice
    to specify union types, but pre-PHP 8 that wasn't supported.)
    goldenapples committed May 9, 2023
    Configuration menu
    Copy the full SHA
    cceed74 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2023

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