Commit 506aa74
committed
Login and Registration: Fix "passing null to non-nullable" deprecation for
If there is no URL query in the `$_GET['redirect_to'], `wp_parse_url()` will return `null`. Passing `null` to `parse_str()` results in a PHP 8.1 deprecation notice
{{{
Deprecated: parse_str(): Passing null to parameter #1 ($string) of type string is deprecated
}}}
This commit:
- Fixes the deprecation notice.
- Skips doing the `parse_str()` when there's no URL query.
- Provides a micro-optimization performance boost.
Follow-up to [49109].
Props jrf, hellofromTonya, BinaryKitten.
See #53635.
git-svn-id: https://develop.svn.wordpress.org/trunk@51829 602fd350-edb4-49c9-b593-d223f7449a82authorize_application error message.1 parent fe9f6a2 commit 506aa74
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1267 | 1267 | | |
1268 | 1268 | | |
1269 | 1269 | | |
1270 | | - | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
1271 | 1274 | | |
1272 | 1275 | | |
1273 | 1276 | | |
| |||
0 commit comments