Title: htmlspecialchars_decode &#8211; should be string, is array
Last modified: February 2, 2023

---

# htmlspecialchars_decode – should be string, is array

 *  Resolved [Robert](https://wordpress.org/support/users/hartlrobert/)
 * (@hartlrobert)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/htmlspecialchars_decode-should-be-string-is-array/)
 * Since PHP 8(.2) there is an error:
 *     ```wp-block-code
       Fatal error: Uncaught TypeError: htmlspecialchars_decode(): Argument #1 ($string) must be of type string, array given in .../wp-content/plugins/user-submitted-posts/library/core-functions.php:315
       ```
   
 * Thank You!

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/htmlspecialchars_decode-should-be-string-is-array/#post-16435102)
 * Thanks, will add it to the list. Note that technically we’re not supporting PHP
   8.2 yet, still testing up to PHP 8.1.
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/htmlspecialchars_decode-should-be-string-is-array/#post-16915174)
 * Hey [Robert](https://wordpress.org/support/users/hartlrobert/), I am testing 
   on PHP 8.2 and have not been able to replicate this error. Do you know the steps
   to make it happen? That way I can try to resolve asap. Thank you.
 *  Thread Starter [Robert](https://wordpress.org/support/users/hartlrobert/)
 * (@hartlrobert)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/htmlspecialchars_decode-should-be-string-is-array/#post-16917536)
 * I tried again with PHP 8.2, the error is gone. Thank You!
 * Now: TDOMF: Bad data submitted.
 * Can be my single problem/user topic.
    -  This reply was modified 2 years, 10 months ago by [Robert](https://wordpress.org/support/users/hartlrobert/).
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/htmlspecialchars_decode-should-be-string-is-array/#post-16919287)
 * No problem, thanks for the update. Let me know if I can provide any further information,
   glad to help anytime.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘htmlspecialchars_decode – should be string, is array’ is closed to new
replies.

 * ![](https://ps.w.org/user-submitted-posts/assets/icon-256x256.png?rev=2567685)
 * [User Submitted Posts – Enable Users to Submit Posts from the Front End](https://wordpress.org/plugins/user-submitted-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-submitted-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-submitted-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/user-submitted-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-submitted-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-submitted-posts/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/htmlspecialchars_decode-should-be-string-is-array/#post-16919287)
 * Status: resolved