Skip to content

Commit 0232a73

Browse files
swissspidyCopilot
andauthored
Update src/Context/FeatureContext.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ddaff50 commit 0232a73

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Context/FeatureContext.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1652,7 +1652,9 @@ public function install_wp( $subdir = '', $version = '' ): void {
16521652
$config_extra_php = "if ( defined( 'DISABLE_WP_CRON' ) === false ) { define( 'DISABLE_WP_CRON', true ); }\n";
16531653

16541654
if ( 'sqlite' === getenv( 'WP_CLI_TEST_OBJECT_CACHE' ) ) {
1655-
$config_extra_php .= "define( 'WP_CACHE_KEY_SALT', '" . bin2hex( random_bytes( 16 ) ) . "' );\n";
1655+
// Derive a deterministic cache key salt from the install cache directory and subdir
1656+
$salt = md5( self::$install_cache_dir . '/' . $subdir );
1657+
$config_extra_php .= "define( 'WP_CACHE_KEY_SALT', '" . $salt . "' );\n";
16561658
}
16571659

16581660
if ( 'sqlite' !== self::$db_type ) {

0 commit comments

Comments
 (0)