Skip to content

Commit

Permalink
Replace null with empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvang21 committed Oct 3, 2024
1 parent 4f83615 commit 6f48a9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/wp-admin/authorize-application.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@

$app_name = ! empty( $_REQUEST['app_name'] ) ? $_REQUEST['app_name'] : '';
$app_id = ! empty( $_REQUEST['app_id'] ) ? $_REQUEST['app_id'] : '';
$success_url = ! empty( $_REQUEST['success_url'] ) ? $_REQUEST['success_url'] : null;
$success_url = ! empty( $_REQUEST['success_url'] ) ? $_REQUEST['success_url'] : '';

if ( ! empty( $_REQUEST['reject_url'] ) ) {
$reject_url = $_REQUEST['reject_url'];
} elseif ( $success_url ) {
$reject_url = add_query_arg( 'success', 'false', $success_url );
} else {
$reject_url = null;
$reject_url = '';
}

$user = wp_get_current_user();
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/formatting.php
Original file line number Diff line number Diff line change
Expand Up @@ -4464,7 +4464,7 @@ function esc_url( $url, $protocols = null, $_context = 'display' ) {
return $url;
}

$url = str_replace( ' ', '%20', ltrim( (string) $url ) );
$url = str_replace( ' ', '%20', ltrim( $url ) );
$url = preg_replace( '|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\[\]\\x80-\\xff]|i', '', $url );

if ( '' === $url ) {
Expand Down

0 comments on commit 6f48a9c

Please sign in to comment.