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

update index.php to eliminate deprecation warning for PHP 8.2 #51

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sugardave
Copy link

Should fix #50 (comment)

This fixes the deprecation warning for PHP 8.2
Copy link
Collaborator

@Zegnat Zegnat left a comment

Choose a reason for hiding this comment

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

Note that selfauth is compatible with PHP 5.6. I am not sure we are currently thinking of dropping that backwards compatibility because of the earlier audience for this project.

The null coalescing operator used in this PR was first introduced in PHP 7.0. Could we use a PHP 5.6 compatible solution instead?

@@ -132,7 +132,7 @@ function get_q_value($mime, $accept)

function base64_url_encode($string)
{
$string = base64_encode($string);
$string = base64_encode($string ?? '');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
$string = base64_encode($string ?? '');
$string = base64_encode(isset($string) ? $string : "");

Copy link
Author

Choose a reason for hiding this comment

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

I never saw this comment, oops! I have moved off my indieweb/selfauth project for a bit, but should hopefully be back to it soon and I can revisit this.

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.

Deprecation
2 participants