Skip to content

Commit

Permalink
No scraping error text when transient is not existing v2
Browse files Browse the repository at this point in the history
No scraping error text when transient is not existing

Trac ticket:
https://core.trac.wordpress.org/ticket/62105
  • Loading branch information
Georg-Git authored Sep 24, 2024
1 parent 40d49f5 commit 0017844
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/wp-includes/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -1806,12 +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'] );

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

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

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Opening parenthesis of a multi-line function call must be the last content on the line

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

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Empty lines are not allowed in multi-line function calls

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

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Whitespace found at end of line
if ( $transient ) === false ) {

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

View workflow job for this annotation

GitHub Actions / Check PHP compatibility / Run compatibility checks

Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4. Found: get_transient( 'scrape_key_' . $key; if ( $transient ) === false ) { return; }

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

Inline control structures are not allowed

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

Closing parenthesis of a multi-line function call must be on a line by itself
return;
}

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

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Line indented incorrectly; expected 0 tabs, found 1

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

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

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Line indented incorrectly; expected 0 tabs, found 1

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

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Expected 1 space after closing parenthesis; found " !== $nonce ) "
echo "###### wp_scraping_result_start:$key ######";
echo wp_json_encode(
array(
Expand Down

0 comments on commit 0017844

Please sign in to comment.