Skip to content

Commit

Permalink
Merge pull request #7668 from Automattic/fix/php-deprecations-and-war…
Browse files Browse the repository at this point in the history
…nings

Fix PHP deprecation notice about passing null to parameter of type st…
  • Loading branch information
donnapep authored Aug 19, 2024
2 parents 9886da6 + 4e03e26 commit ed5e840
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog/fix-php-deprecations-and-warnings
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Fix PHP deprecation notice when opening site editor
3 changes: 2 additions & 1 deletion includes/class-sensei-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -2917,8 +2917,9 @@ public static function is_teacher_archive_page() {
public static function output_query_params_as_inputs( array $excluded = [], string $url = '', bool $echo = true ) {
// phpcs:ignore WordPress.Security.NonceVerification -- The nonce should be checked before calling this method.
$query_params = $_GET;

if ( $url ) {
parse_str( wp_parse_url( $url, PHP_URL_QUERY ), $query_params );
parse_str( (string) wp_parse_url( $url, PHP_URL_QUERY ), $query_params );
}

$output = '';
Expand Down

0 comments on commit ed5e840

Please sign in to comment.