Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Fatal error when Klaviyo querystring was defined but empty
```[04-Aug-2022 19:55:09 UTC] PHP Fatal error: Uncaught BrianHenryIE\WP_Autologin_URLs\Klaviyo\ApiException: [400] Client error: `POST https://a.klaviyo.com/api/v2/people/exchange?api_key=pk_fba29ec017da114f45d68cbab138bc3e31` resulted in a `400 Bad Request` response: {"detail":["Missing exchange_id"]} in /path/to/wp-content/plugins/bh-wp-autologin-urls/vendor-prefixed/klaviyo/sdk/lib/API/ProfilesApi.php:159 Stack trace: #0 /path/to/wp-content/plugins/bh-wp-autologin-urls/vendor-prefixed/klaviyo/sdk/lib/API/ProfilesApi.php(135): BrianHenryIE\WP_Autologin_URLs\Klaviyo\API\ProfilesApi->exchangeWithHttpInfo(Array) #1 /path/to/wp-content/plugins/bh-wp-autologin-urls/vendor-prefixed/klaviyo/sdk/lib/Subclient.php(57): BrianHenryIE\WP_Autologin_URLs\Klaviyo\API\ProfilesApi->exchange(Array) #2 /path/to/wp-content/plugins/bh-wp-autologin-urls/src/API/Integrations/class-klaviyo.php(120): BrianHenryIE\WP_Autologin_URLs\Klaviyo\Subclient->__call('exchange', Array) #3 /path/to/wp-content/plugins/bh-wp-autologin-urls/src/API/Integrations/class-klaviyo.php(88): BrianHenryIE\WP_Autologin_URLs\API\Integrations\Klaviyo->get_user_data('') #4 /path/to/wp-content/plugins/bh-wp-autologin-urls/src/WP_Includes/class-login.php(84): BrianHenryIE\WP_Autologin_URLs\API\Integrations\Klaviyo->get_wp_user_array() #5 /path/to/wp-includes/class-wp-hook.php(307): BrianHenryIE\WP_Autologin_URLs\WP_Includes\Login->process('') #6 /path/to/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #7 /path/to/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #8 /path/to/wp-settings.php(461): do_action('plugins_loaded') #9 /path/to/wp-config.php(95): require_once('/chroot/home/ab...') #10 /path/to/wp-load.php(50): require_once('/chroot/home/ab...') #11 /path/to/wp-blog-header.php(13): require_once('/chroot/home/ab...') #12 /path/to/index.php(17): require('/chroot/home/ab...') #13 {main} thrown in /path/to/wp-content/plugins/bh-wp-autologin-urls/vendor-prefixed/klaviyo/sdk/lib/API/ProfilesApi.php on line 159 ```
- Loading branch information