Title: Polymetis's Replies | WordPress.org

---

# Polymetis

  [  ](https://wordpress.org/support/users/polymetis/)

 *   [Profile](https://wordpress.org/support/users/polymetis/)
 *   [Topics Started](https://wordpress.org/support/users/polymetis/topics/)
 *   [Replies Created](https://wordpress.org/support/users/polymetis/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/polymetis/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/polymetis/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/polymetis/engagements/)
 *   [Favorites](https://wordpress.org/support/users/polymetis/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Easy Sign Up] Warning: Illegal string offset 'type' in esu-front-end-class.php](https://wordpress.org/support/topic/warning-illegal-string-offset-type-in-esu-front-end-classphp/)
 *  [Polymetis](https://wordpress.org/support/users/polymetis/)
 * (@polymetis)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-type-in-esu-front-end-classphp/#post-3871904)
 * Here’s a solution I found which does not require you to change your version of
   PHP (thank you to Boann at stackoverflow.com):
 * “_The posted code is valid, but it expects the parameter $inputs to be an array.
   The “Illegal string offset” warning in the part $inputs[‘type’] means that the
   function is being passed a string instead of an array. (And then since a string
   offset is a number, ‘type’ is not suitable.)_
 * So in theory the problem lies elsewhere, with the caller of the code not providing
   a correct parameter.
 * That said, this warning message is new to PHP 5.4. Old versions didn’t warn if
   this happened. They would silently convert ‘type’ to 0, then try to get character
   0 (the first character) of the string. So if this code was supposed to work, 
   that’s because abusing a string like this didn’t cause any complaints on PHP 
   5.3 and below. (A lot of old PHP code has experienced this problem after upgrading.)
 * You might want to debug why the function is being given a string by examining
   the calling code, and find out what value it has by doing a var_dump($inputs);
   in the function. But if you just want to shut the warning up to make it behave
   like PHP 5.3, change the line to:
 * `if (is_array($inputs) && $inputs['type'] == 'attach') {"`

Viewing 1 replies (of 1 total)