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 deprecation notice #254

Merged
merged 2 commits into from
Nov 11, 2023
Merged

Fix deprecation notice #254

merged 2 commits into from
Nov 11, 2023

Conversation

janboddez
Copy link
Contributor

@janboddez janboddez commented Nov 11, 2023

rawurldecode() does not or no longer (I'm on PHP 8.1 right now) accept null as a first param. As such, a deprecation warning occasionally pops up in WordPress' debug log (if it happens to be enabled, of course).

By setting it to an empty string instead, this is notice no longer appears.

Also, later on wp_login_url( $redirect_to ) is run; I checked the documentation for wp_login_url() and found that the default value for its first argument is an empty string, and that it actually expects a string. I.e., I think a string is okay. :-)

Copy link
Member

@dshanske dshanske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@janboddez
Copy link
Contributor Author

Fixed another one, I think the $title var (which doesn't exist) on line 121 of class-indieauth-client-taxonomy.php should really be $path? Although I do hope this doesn't accidentally break anything else.

@dshanske
Copy link
Member

It wouldn't.. that it me thinking about generating slugs for post titles...which this isn't.

Actually working on a bunch of cleanup for this plugin right now...so anything you see can get rolled up into the 4.4 release I'm planning

@dshanske dshanske merged commit 23f1aed into indieweb:trunk Nov 11, 2023
1 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants