• Resolved Koli14

    (@koli14)


    Dear Plugin Developers!
    First of all, thanks for this plugin, it’s really cool!
    Since the last update (v. 2022.1.0) your plugin generates the following log message for my site:
    PHP Notice: Undefined index: data in wp-content/plugins/wp-rest-cache/includes/api/class-endpoint-api.php on line 232

    The mentioned line looks like this:
    if ( ! empty( $result ) && is_array( $result ) && ( ( is_array( $result['data'] ) && isset( $result['data']['status'] ) && 200 !== (int) $result['data']['status'] ) || 200 !== http_response_code() ) ) {

    With a small modification, the notice goes away:
    if ( ! empty( $result ) && is_array( $result ) && ( ( isset($result['data']) && is_array( $result['data'] ) && isset( $result['data']['status'] ) && 200 !== (int) $result['data']['status'] ) || 200 !== http_response_code() ) ) {

    I’m happy to create a PR, if you have a git repo.
    Cheers: Kolos

    • This topic was modified 2 years, 3 months ago by Koli14.
    • This topic was modified 2 years, 3 months ago by Koli14.
    • This topic was modified 2 years, 3 months ago by Koli14.
    • This topic was modified 2 years, 3 months ago by Koli14.
Viewing 1 replies (of 1 total)
  • Plugin Author Richard Korthuis

    (@rockfire)

    Hi @koli14

    Thank you for using our plugin and for bringing this to our attention.

    We just released a new version of our plugin, which should solve the notice. (N.B. It might take some time before the new version shows up on www.ads-software.com)

Viewing 1 replies (of 1 total)
  • The topic ‘Undefined index PHP Notice’ is closed to new replies.