My guess that you are running PHP 5.4 . This plugin is optimized for PHP 5.3x. As that is what 99% of my users have.
Quick fix would be to change the version of PHP your web server is running. PHP 5.3 is still actively developed with the latest version was pushed out on 06-Jun-2013 http://www.php.net/ChangeLog-5.php#5.3.26
WordPress minimum requirements are here: http://wordpress.org/about/requirements/
I don’t know much about xampp but there should be a config file somewhere that you can edit to load the correct version of PHP. Have a look at their docs: http://www.apachefriends.org/en/faq-xampp.html
Thanks for your prompt reply.
I’m using XAMPP 1.8.1 with PHP 5.4. Unfortunately downsizing de PHP version with XAMPP is not that easy. Maybe I’ll try it later, because I’m not sure which PHP version our hosting provider uses.
Almost every web hosts i have worked with will let you choose your version of PHP.
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') {"
Thanks for the research Polymetis!
I’m not a wordpress developer. However, I just tried Polymetis’ solution. I just took the php file that was referenced in the warnings and replaced the line at (or close to) the line 108. It helped to suppress all error messages but one (referencing line 135). This one didn’t look like it needed a replacement, but I’m not sure because I don’t really know what I’m doing. Maybe it’ll help other users if you could specify where exactly to replace the code and what piece of code to replace?
Great plugin though, really liked it.
This post should not be marked resolved, as CorneliaCycling has stated, what was proposed by Polymetis is only a partial fix.
Still left with a final error to suppress > /<home>/<useraccount>/public_html/wp-content/plugins/easy-sign-up/lib/esu-front-end-class.php on line 135
I am testing some coding and if I get it working I will post a resolution here, so this can officially be marked as resolved.
Mod please close this topic