rocket-lazy-load
rocket-lazy-load copied to clipboard
$lazy_sources triggers a undefined variable PHP notice
Undefined variable: lazy_sources in Image.php on line 273
We need to either move $lazy_sources = 0;
outside of if ( preg_match_all()){}
or move if ( 0 === $lazy_sources ){}
inside of if ( preg_match_all()){}
(like we do on WP Rocket).
https://github.com/wp-media/rocket-lazy-load/blob/4332a0d187ca39bf3ba893390e9b0bd109ee1846/src/Dependencies/RocketLazyload/Image.php#L259-L275
Request - https://wordpress.org/support/topic/undefined-variable-lazy_sources-in-image-php-on-line-273/