[Plugin: Simple Google Connect] Patch: fix WP_DEBUG notice for sgc_login_disconnect
-
When define(‘WP_DEBUG’, true) is set in wp-config.php, the following notice is displayed by Simple Google Connect for every page:
[25-Sep-2012 14:18:09 UTC] PHP Notice: Undefined index: sgc_login_disconnect in /www/wp1/wordpress/wp-content/plugins/simple-google-connect/sgc-login.php on line 97
Here is a patch that removed the notice and also ensures that users can’t disconnect their account if the admin has disallowed this:
diff -up simple-google-connect/sgc-login.php.nowarn simple-google-connect/sgc-login.php --- simple-google-connect/sgc-login.php.nowarn 2012-09-25 14:29:08.963299799 +0000 +++ simple-google-connect/sgc-login.php 2012-09-25 14:32:21.709734342 +0000 @@ -94,7 +94,7 @@ exit; add_action('init','sgc_login_check_disconnect'); function sgc_login_check_disconnect() { - if ( $_GET['sgc_login_disconnect'] == 1 ) { + if ( SGC_ALLOW_DISCONNECT && isset($_GET['sgc_login_disconnect']) && $_GET['sgc_login_disconnect'] == 1 ) { check_admin_referer( 'sgc_login_disconnect' ); sgc_login_disconnect_user(); wp_safe_redirect(get_edit_profile_url($profile->ID));
Many thanks for providing this great plugin!
https://www.ads-software.com/extend/plugins/simple-google-connect/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Simple Google Connect] Patch: fix WP_DEBUG notice for sgc_login_disconnect’ is closed to new replies.