PHP Notices when authentication failed
-
Hi there!
I just debugged my wordpress installation on my local machine and stumbled upon some PHP notices. Maybe you can fix this? I could also fix it but I don’t know how I can send you the patches – do you have a github account with the project?The notice occurs when the authentication with the zendesk API fails. Because then the answer of the zendesk api is no valid json but an error string. Because of that PHP cant access the id property of $data and the notice is thrown.
The Notices with callstack for your reference:
[24-Mar-2015 15:29:54 Europe/Berlin] PHP Notice: Undefined index: details in /wp-content/plugins/woocommerce-zendesk-connect/inc/wzn-funct.php on line 123 [24-Mar-2015 15:29:54 Europe/Berlin] PHP Stack trace: [24-Mar-2015 15:29:54 Europe/Berlin] PHP 1. {main}() /wp-admin/admin-ajax.php:0 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 2. do_action() /wp-admin/admin-ajax.php:85 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 3. call_user_func_array:/wp-includes/plugin.php:496}() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 4. WC_AJAX::checkout() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 5. WC_Checkout->process_checkout() /wp-content/plugins/woocommerce/includes/class-wc-ajax.php:369 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 6. do_action() /wp-content/plugins/woocommerce/includes/class-wc-checkout.php:369 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 7. call_user_func_array:{/wp-includes/plugin.php:496}() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 8. woo_wzn_checkout_process() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 9. woo_wzn_user() /wp-content/plugins/woocommerce-zendesk-connect/inc/wzn-funct.php:213 [24-Mar-2015 15:29:54 Europe/Berlin] PHP Notice: Undefined index: notes in /wp-content/plugins/woocommerce-zendesk-connect/inc/wzn-funct.php on line 123 [24-Mar-2015 15:29:54 Europe/Berlin] PHP Stack trace: [24-Mar-2015 15:29:54 Europe/Berlin] PHP 1. {main}() /wp-admin/admin-ajax.php:0 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 2. do_action() /wp-admin/admin-ajax.php:85 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 3. call_user_func_array: /wp-includes/plugin.php:496}() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 4. WC_AJAX::checkout() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 5. WC_Checkout->process_checkout() /wp-content/plugins/woocommerce/includes/class-wc-ajax.php:369 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 6. do_action() /wp-content/plugins/woocommerce/includes/class-wc-checkout.php:369 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 7. call_user_func_array:{/wp-includes/plugin.php:496}() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 8. woo_wzn_checkout_process() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:54 Europe/Berlin] PHP 9. woo_wzn_user() /wp-content/plugins/woocommerce-zendesk-connect/inc/wzn-funct.php:213 [24-Mar-2015 15:29:55 Europe/Berlin] PHP Notice: Undefined property: stdClass::$id in /wp-content/plugins/woocommerce-zendesk-connect/inc/wzn-funct.php on line 125 [24-Mar-2015 15:29:55 Europe/Berlin] PHP Stack trace: [24-Mar-2015 15:29:55 Europe/Berlin] PHP 1. {main}() /wp-admin/admin-ajax.php:0 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 2. do_action() /wp-admin/admin-ajax.php:85 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 3. call_user_func_array:{/wp-includes/plugin.php:496}() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 4. WC_AJAX::checkout() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 5. WC_Checkout->process_checkout() /wp-content/plugins/woocommerce/includes/class-wc-ajax.php:369 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 6. do_action() /wp-content/plugins/woocommerce/includes/class-wc-checkout.php:369 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 7. call_user_func_array:{/wp-includes/plugin.php:496}() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 8. woo_wzn_checkout_process() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 9. woo_wzn_user() /wp-content/plugins/woocommerce-zendesk-connect/inc/wzn-funct.php:213 [24-Mar-2015 15:29:55 Europe/Berlin] PHP Notice: Undefined property: stdClass::$id in /wp-content/plugins/woocommerce-zendesk-connect/inc/wzn-funct.php on line 126 [24-Mar-2015 15:29:55 Europe/Berlin] PHP Stack trace: [24-Mar-2015 15:29:55 Europe/Berlin] PHP 1. {main}() /wp-admin/admin-ajax.php:0 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 2. do_action() /wp-admin/admin-ajax.php:85 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 3. call_user_func_array:{/wp-includes/plugin.php:496}() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 4. WC_AJAX::checkout() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 5. WC_Checkout->process_checkout() /wp-content/plugins/woocommerce/includes/class-wc-ajax.php:369 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 6. do_action() /wp-content/plugins/woocommerce/includes/class-wc-checkout.php:369 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 7. call_user_func_array:{/wp-includes/plugin.php:496}() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 8. woo_wzn_checkout_process() /wp-includes/plugin.php:496 [24-Mar-2015 15:29:55 Europe/Berlin] PHP 9. woo_wzn_user() /wp-content/plugins/woocommerce-zendesk-connect/inc/wzn-funct.php:213
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘PHP Notices when authentication failed’ is closed to new replies.