Skip to content

Commit

Permalink
bailout if old version is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
wordpressfan committed Jan 28, 2025
1 parent fefa3b0 commit d23037f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/Engine/Media/Lazyload/CSS/Admin/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function add_option_safemode( array $options ) {
* @return void
*/
public function clear_background_css_with_upgrade( $new_version, $old_version ) {

Check warning on line 91 in inc/Engine/Media/Lazyload/CSS/Admin/Subscriber.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

inc/Engine/Media/Lazyload/CSS/Admin/Subscriber.php#L91

Avoid unused parameters such as '$new_version'.
if ( version_compare( $old_version, '3.18', '>' ) ) {
if ( empty( $old_version ) || version_compare( $old_version, '3.18', '>' ) ) {
return;
}
// Completely clear background-css directory.
Expand Down

0 comments on commit d23037f

Please sign in to comment.