Home Forums WoodMart support forum PHP error Undefined array key – line 1680

PHP error Undefined array key – line 1680

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #457845

    Caspar
    Participant

    I’m having troubles with a php error and cannot find where it goes wrong. Every images that is showed on our website generates an error. Can you help me out with this?

    The error says:
    PHP Warning: Undefined array key “file” in *** /public/wp-includes/media.php on line 1680″ while reading upstream.

    Here is the full block of code on line 1680:
    1679 // Bail early if an image has been inserted and later edited.
    1680 if ( preg_match( ‘/-e[0-9]{13}/’, $image_meta[‘file’], $img_edit_hash ) &&
    1681 strpos( wp_basename( $image_src ), $img_edit_hash[0] ) === false ) {
    1682
    1683 return $image;
    1684 }

    *Note: after updating to wordpress 6.2 the code above is in line 1686

    #457870

    Artem Temos
    Keymaster

    Hello,

    Could you please check how it works with some default WordPress themes like TwentyTwenty or WooCommerce Storefront to understand is it our theme issue or not?

    Regards

    #457873

    Caspar
    Participant

    Hi, yes when I switch to s default theme (Twenty Twenty-Three) in this case, the issue is not there.

    #457894

    Artem Temos
    Keymaster

    This error seems to be generated by this custom code https://monosnap.com/file/PIME0ThPySP3w6IYEFVjNtTeTCWOWH
    You don’t see the error with the default theme because it doesn’t display this widget.

    Kind Regards

    #457915

    Caspar
    Participant

    Hi Artem,

    That seems to be the issue yes. I will change the image. Thank you very much. We couldn’t find it ourselves.

    Resolved now.

    #458057

    Artem Temos
    Keymaster

    You are always welcome. Feel free to contact us if you have any further questions.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘PHP error Undefined array key – line 1680’ is closed to new replies.