Skip to content

Call function instead of the global variable#317

Merged
pfefferle merged 5 commits into
indieweb:trunkfrom
lostfocus:trunk
Jul 8, 2026
Merged

Call function instead of the global variable#317
pfefferle merged 5 commits into
indieweb:trunkfrom
lostfocus:trunk

Conversation

@lostfocus

Copy link
Copy Markdown
Contributor

See #313 and #315

pfefferle and others added 5 commits July 6, 2026 13:39
The error path in the authenticate form template called __e(), which
does not exist in WordPress, causing a fatal error whenever the current
user could not be determined. Use esc_html_e() instead and close the
login page with login_footer() before exiting.

Fixes indieweb#313
@pfefferle
pfefferle merged commit 324d275 into indieweb:trunk Jul 8, 2026
8 checks passed
@pfefferle pfefferle mentioned this pull request Jul 8, 2026
pfefferle added a commit that referenced this pull request Jul 8, 2026
The nullsafe operator introduced in #317 is PHP 8.0 syntax and causes a
parse error on PHP 7.4, which the plugin still supports. Assign the
local $current_user from wp_get_current_user() instead, which also
fixes the remaining usages of the unset global in the template.
pfefferle added a commit that referenced this pull request Jul 8, 2026
* Bump version to 4.7.0

Update the changelog and stable tag for the 4.7.0 release. Also sync
INDIEAUTH_PLUGIN_VERSION, which was still set to 4.5.5.

* Add #317 to the changelog and fix PHP 7.4 compatibility

The nullsafe operator introduced in #317 is PHP 8.0 syntax and causes a
parse error on PHP 7.4, which the plugin still supports. Assign the
local $current_user from wp_get_current_user() instead, which also
fixes the remaining usages of the unset global in the template.
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