• Resolved Steph

    (@sglaserliventus)


    We are getting a ton of these PHP Notices in our debug.log coming from your plugin. About a dozen every page load. After debugging, we determined that $urlParsed['scheme'] on that line does not check if it exists before using and in our case it is not set in that array. Can you please correct in an upcoming version?

    Undefined index: scheme in wp-content/plugins/shortpixel-image-optimiser/class/front/img-to-picture-webp.php on line 457

    For reference, running the following Google search also uncovers a handful of sites displaying the same error that seem to have WP_DEBUG_DISPLAY set to true so it is visible on the frontend.

    "Undefined index: scheme" in wp-content/plugins/shortpixel-image-optimiser/class/front/img-to-picture-webp.php

    As an interim fix, we update the above referenced line with the following which appears to have fixed the issue.

    $baseurl = str_replace($baseParsed['scheme'] . '://' . $baseParsed['host'], '//' . $urlParsed['host'], $updir['baseurl']);

    We are running the latest version of the plugin, 4.19.3. If you need any further information, please let me know.

    Thanks!

    • This topic was modified 4 years, 6 months ago by Steph. Reason: Added interim fix
Viewing 1 replies (of 1 total)
  • Plugin Support Gerard Blanco

    (@sixaxis)

    Hi Steph,

    Thank you very much for reporting this.

    I talked with our team and this will be fixed if not in the next version, very soon ?? It’s a part of code that is planned to be removed.

    Cheers!

Viewing 1 replies (of 1 total)
  • The topic ‘Undefined index: scheme in … class/front/img-to-picture-webp.php on line 457’ is closed to new replies.