Undefined index: scheme in … class/front/img-to-picture-webp.php on line 457
-
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.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!
- The topic ‘Undefined index: scheme in … class/front/img-to-picture-webp.php on line 457’ is closed to new replies.