Skip to content

Commit

Permalink
make sure $src is not empty/ null.
Browse files Browse the repository at this point in the history
  • Loading branch information
futtta committed Mar 10, 2024
1 parent 1e6007c commit 56f5e00
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions classes/autoptimizeExtra.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 56f5e00

Please sign in to comment.