Skip to content

Commit

Permalink
Merge pull request #20 from newfold-labs/fix/str-replace
Browse files Browse the repository at this point in the history
Fix issue where null is passed to str_replace()
  • Loading branch information
wpscholar authored Feb 22, 2024
2 parents 3599649 + 3f05819 commit c5da2a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/CacheTypes/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use NewfoldLabs\WP\Module\Performance\Performance;
use NewfoldLabs\WP\ModuleLoader\Container;
use WP_Forge\WP_Htaccess_Manager\htaccess;

use wpscholar\Url;

use function NewfoldLabs\WP\Module\Performance\getCacheLevel;
use function NewfoldLabs\WP\Module\Performance\removeDirectory;
use function NewfoldLabs\WP\Module\Performance\shouldCachePages;
Expand Down Expand Up @@ -299,7 +299,7 @@ protected function getStoragePathForRequest() {

if ( ! isset( $path ) ) {
$url = new Url();
$basePath = wp_parse_url( home_url(), PHP_URL_PATH );
$basePath = wp_parse_url( home_url('/'), PHP_URL_PATH );
$path = trailingslashit( self::CACHE_DIR . str_replace( $basePath, '', esc_url( $url->path ) ) );
}

Expand Down

0 comments on commit c5da2a9

Please sign in to comment.