Bug #23214 Clarification Requested

Addons.php should check if get_post(‘search’) is a string before running it through htmlentities

Version: 3.5.11 Reporter: Matt Weinberg

This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report

Hello,

I’m with DevDemon. We use the “search” POST param in AJAX requests in some addons . It looks like Addons.php line 72 assumes “search” will always be a string:

ee()->view->search_value = htmlentities(ee()->input->get_post('search'), ENT_QUOTES, 'UTF-8');

We use it as an array so get “htmlentities() expects parameter 1 to be string, array given” if the server has PHP debugging turned on. I fixed it on a specific copy with:

if (is_string(ee()->input->get_post('search'))) {
    ee()->view->search_value = htmlentities(ee()->input->get_post('search'), ENT_QUOTES, 'UTF-8');
}

You might want to consider updating this for future versions. Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases