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

Certain configuration will lead to fatal error #918

Open
4 tasks done
groenroos opened this issue Oct 25, 2024 · 1 comment
Open
4 tasks done

Certain configuration will lead to fatal error #918

groenroos opened this issue Oct 25, 2024 · 1 comment

Comments

@groenroos
Copy link

Checklist

  • I have looked into the Readme and the documentation, and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

During setup of the Auth0 plugin, the following error would be logged and displayed at the bottom of the settings page:

PHP Fatal error: Uncaught TypeError: implode(): Argument #1 ($array) must be of type array, string given in /wp-content/plugins/auth0/lib/WP_Auth0_Ip_Check.php:133
Stack trace:
	#0 /wp-content/plugins/auth0/lib/WP_Auth0_Ip_Check.php(133): implode('</code> <code>', NULL)
	#1 /wp-content/plugins/auth0/lib/WP_Auth0_Ip_Check.php(119): WP_Auth0_Ip_Check->get_ip_by_region('uk', '</code> <code>')
	#2 /wp-content/plugins/auth0/lib/admin/WP_Auth0_Admin_Advanced.php(364): WP_Auth0_Ip_Check->get_ips_by_domain('dev-b8wysasu08j...', '</code> <code>')
	#3 /wp-admin/includes/template.php(1836): WP_Auth0_Admin_Advanced->render_migration_ws_ips(Array)
	#4 /wp-admin/includes/template.php(1790): do_settings_fields('wp_auth0_settin...', 'wp_auth0_advanc...')
	#5 /wp-content/plugins/auth0/templates/settings.php(33): do_settings_sections('wp_auth0_settin...')
	#6 /wp-content/plugins/auth0/lib/admin/WP_Auth0_Admin.php(148): include('/nas/content/li...')
	#7 /wp-includes/class-wp-hook.php(324): WP_Auth0_Admin->render_settings_page('')
	#8 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
	#9 /wp-includes/plugin.php(517): WP_Hook->do_action(Array)
	#10 /wp-admin/admin.php(259): do_action('toplevel_page_w...')
	#11 {main}
	 thrown in /wp-content/plugins/auth0/lib/WP_Auth0_Ip_Check.php on line 133

This error also malforms the Settings page such that the tab controls no longer work.

It's unclear what exact combination of settings causes this error to appear. Nevertheless, a fatal error should not go uncaught like this.

Reproduction

  1. Configure the Auth0 plugin with basic settings, as per documentation
  2. Error will appear on the Settings page of the Auth0 plugin

Additional context

The error will go away if the plugin is re-installed or otherwise reset.

Potentially a reoccurrence of #875

wp-auth0 version

4.6.2

WordPress version

6.6.2

PHP version

8.2

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

No branches or pull requests

3 participants
@groenroos and others