Title: Uncaught Exception TypeError in documentcloud
Last modified: March 4, 2026

---

# Uncaught Exception TypeError in documentcloud

 *  [John Spellman](https://wordpress.org/support/users/jspellman/)
 * (@jspellman)
 * [2 months, 3 weeks ago](https://wordpress.org/support/topic/uncaught-exception-typeerror-in-documentcloud/)
 * Hello,
 * We’re encountering an error in the `documentcloud` plugin after a change to the
   following code block in the most recent version.
 * It previously checked that the value was a string:
 *     ```wp-block-code
       if (    is_string( $value )    && 0 === strpos( $value, '#' )) {
       ```
   
 * This block has been changed to:
 *     ```wp-block-code
       if ( 0 === strpos( $value, '#' ) ) {    $value = rawurlencode( $value );}
       ```
   
 * We occasionally see the following error:
 *     ```wp-block-code
       Uncaught exception 'TypeError' with message 'strpos(): Argument #1 ($haystack) must be of type string, array given' in /var/www/wp-content/plugins/documentcloud/documentcloud.php:286
       ```
   
 * Would you consider restoring the type check (e.g., `is_string( $value )`) before
   calling `strpos()` in a future release to prevent this error?
 * Thanks for your work on the plugin.

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-exception-typeerror-in-documentcloud%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/documentcloud/assets/icon-256x256.png?rev=1304817)
 * [DocumentCloud](https://wordpress.org/plugins/documentcloud/)
 * [Support Threads](https://wordpress.org/support/plugin/documentcloud/)
 * [Active Topics](https://wordpress.org/support/plugin/documentcloud/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/documentcloud/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/documentcloud/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [John Spellman](https://wordpress.org/support/users/jspellman/)
 * Last activity: [2 months, 3 weeks ago](https://wordpress.org/support/topic/uncaught-exception-typeerror-in-documentcloud/)
 * Status: not resolved