syamilmj / aqua-page-builder

Aqua Page Builder WordPress Plugin
238 stars 114 forks source link

aq_field_multiselect error #169

Closed presslayer closed 9 years ago

presslayer commented 9 years ago

When I use aq_field_multiselect, got error: "Warning: stripslashes() expects parameter 1 to be string, array given in D:\www\liquid\wp-content\plugins\aqua-page-builder\classes\class-aq-block.php on line 46"

Then I removed: "$new_instance = array_map('htmlspecialchars', array_map('stripslashes', $new_instance));" and It's work.

I know this will be not safe for data.

Can you update your plugin with other way to strip a array?

syamilmj commented 9 years ago

You can just override the update callback method from your block. The default callback is necessary for most of the default blocks.

I think the comments there explained the caveat very well ;)

You should use this to do any filtering, sanitation etc. The default filtering is sufficient for most cases, but nowhere near perfect!