Skip to content

Commit 32a2b4f

Browse files
committed
CLI - switch blog to saved blog id
1 parent 16fae8e commit 32a2b4f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/router.cls.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -512,14 +512,15 @@ private function verify_action()
512512
return;
513513
}
514514

515+
$save_blog = get_current_blog_id();
515516
if ($_REQUEST['switch_blog']) {
516517
// If request parameter "switch_blog", switch to correct blog to generate hash.
517518
switch_to_blog($_REQUEST['switch_blog']);
518519
}
519520
$hash = Router::get_hash(self::VALIDATE_PURGE);
520521
if ($_REQUEST['switch_blog']) {
521522
// Restore blog if needed.
522-
restore_current_blog();
523+
switch_to_blog($save_blog);
523524
}
524525

525526

0 commit comments

Comments
 (0)