Title: PHP Warning: explode() expects parameter 2 to be string
Last modified: September 8, 2021

---

# PHP Warning: explode() expects parameter 2 to be string

 *  [toddlevy](https://wordpress.org/support/users/toddlevy/)
 * (@toddlevy)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-explode-expects-parameter-2-to-be-string/)
 * ​Hi there –
 * We are using JWT Authentication plugin v1.2.6 on a staging server that ALSO uses
   Basic Authentication.
 * When trying to retrieve a token, the plugin is throwing two PHP warnings.
 *     ```
       <b>Warning</b>:  explode() expects parameter 2 to be string, object given in <b>/wp-content/plugins/jwt-authentication-for-wp-rest-api/includes/vendor/firebase/php-jwt/src/JWT.php</b> on line 76
       ```
   
 *     ```
       <b>Warning</b>:  count(): Parameter must be an array or an object that implements Countable in <b>/wp-content/plugins/jwt-authentication-for-wp-rest-api/includes/vendor/firebase/php-jwt/src/JWT.php</b> on line 77
       ```
   
 * This is happening on a staging server so I can’t really share the URL.
 * Any help understanding / tracking down the cause of this would be greatly appreciated.
 * Thank you.

The topic ‘PHP Warning: explode() expects parameter 2 to be string’ is closed to
new replies.

 * ![](https://ps.w.org/jwt-authentication-for-wp-rest-api/assets/icon-256x256.jpg?
   rev=3372068)
 * [JWT Authentication for WP REST API](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jwt-authentication-for-wp-rest-api/)
 * [Active Topics](https://wordpress.org/support/plugin/jwt-authentication-for-wp-rest-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jwt-authentication-for-wp-rest-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jwt-authentication-for-wp-rest-api/reviews/)

## Tags

 * [count](https://wordpress.org/support/topic-tag/count/)
 * [explode](https://wordpress.org/support/topic-tag/explode/)
 * [jwt](https://wordpress.org/support/topic-tag/jwt/)

 * 0 replies
 * 1 participant
 * Last reply from: [toddlevy](https://wordpress.org/support/users/toddlevy/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-explode-expects-parameter-2-to-be-string/)
 * Status: not resolved