Skip to content

Commit

Permalink
Check the URL to avoid PHP warnings. ref: https://wordpress.org/suppo…
Browse files Browse the repository at this point in the history
  • Loading branch information
donnchawp committed Aug 7, 2018
1 parent 9e3a4fc commit bed4fcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-cache-base.php
Expand Up @@ -17,7 +17,7 @@
$base = '';
}
$request_uri = str_replace( '..', '', preg_replace( '/[ <>\'\"\r\n\t\(\)]/', '', $_SERVER['REQUEST_URI'] ) );
if ( strpos( $request_uri, '/', 1 ) ) {
if ( strlen( $request_uri ) > 0 && strpos( $request_uri, '/', 1 ) ) {
if ( $base == '/' ) {
$blogcacheid = substr( $request_uri, 1, strpos( $request_uri, '/', 1 ) - 1 );
} else {
Expand Down

0 comments on commit bed4fcc

Please sign in to comment.