PHP fatal error in custom redirection module, and fix
-
I’ve found that on 6.3.8 / WP 3.6, I can reliably induce a fatal error when using the custom redirection module. The fatal error comes from the final line of this, from ./modules/custom-redirection/custom-redirection.php:
public function login_form() { $template =& Theme_My_Login::get_object()->get_active_instance(); echo wp_original_referer_field( false, $template->get_option( 'instance' ) ? 'current' : 'previous' ) . "\n"; }
Investigation showed that $template was null. So I fixed it by changing the line to:
echo wp_original_referer_field( false, (!empty($template) && $template->get_option( 'instance' )) ? 'current' : 'previous' ) . "\n";
That doesn’t really feel like the proper solution – it doesn’t seem that $template should be able to be null. But that was good enough for me for now.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHP fatal error in custom redirection module, and fix’ is closed to new replies.