diff --git a/classes/autoptimizeExtra.php b/classes/autoptimizeExtra.php index 60312e5a..75f8ea78 100644 --- a/classes/autoptimizeExtra.php +++ b/classes/autoptimizeExtra.php @@ -115,10 +115,12 @@ public function filter_disable_emojis_tinymce( $plugins ) public function filter_remove_qs( $src ) { - if ( strpos( $src, '?ver=' ) ) { - $src = remove_query_arg( 'ver', $src ); - } elseif ( strpos( $src, '?v=' ) ) { - $src = remove_query_arg( 'v', $src ); + if ( ! empty( $src ) ) { + if ( strpos( $src, '?ver=' ) ) { + $src = remove_query_arg( 'ver', $src ); + } elseif ( strpos( $src, '?v=' ) ) { + $src = remove_query_arg( 'v', $src ); + } } return $src;