Skip to content

Commit

Permalink
Fix: scraping error text while in normal operation
Browse files Browse the repository at this point in the history
Fix: scraping error text while in normal operation

https://core.trac.wordpress.org/ticket/62105
  • Loading branch information
Georg-Git authored Sep 24, 2024
1 parent ec80646 commit c03f4cb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/wp-includes/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -1806,8 +1806,13 @@ function wp_start_scraping_edited_file_errors() {

$key = substr( sanitize_key( wp_unslash( $_REQUEST['wp_scrape_key'] ) ), 0, 32 );
$nonce = wp_unslash( $_REQUEST['wp_scrape_nonce'] );
$transient = get_transient( 'scrape_key_' . $key );

if ( get_transient( 'scrape_key_' . $key ) !== $nonce ) {
if ( $transient === false ) {

Check failure on line 1811 in src/wp-includes/load.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Use Yoda Condition checks, you must.
return;
}

if ( $transient !== $nonce ) {
echo "###### wp_scraping_result_start:$key ######";
echo wp_json_encode(
array(
Expand Down

0 comments on commit c03f4cb

Please sign in to comment.