Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PHP deprecation notice about passing null to parameter of type st… #7668

Merged
merged 3 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading