[Vtigercrm-commits] [vtiger development] #7818: Warnings from SaveAjax.php, wrong parameter in htmlentities()
vtiger development
vtiger-tickets at trac.vtiger.com
Wed Nov 20 08:29:15 GMT 2013
#7818: Warnings from SaveAjax.php, wrong parameter in htmlentities()
-----------------------+------------------------
Reporter: tymanski | Owner: developer
Type: defect | Status: new
Priority: trivial | Milestone: Unassigned
Component: vtigercrm | Version: 6.0.0 Beta
Severity: Low | Keywords: SaveAjax
-----------------------+------------------------
Error occurs in Leads module. When you go to detail page, there is an
activity widget on the right.
If you change the status of task it sends AJAX, but it some cases it
stops.
I figured out that it stops, when the task has set "reminders". In this
case before JSON response tehre is an PHP warning (wrong parameter in
htmlentities) and it messes up.
The problem is in Vtiger_SaveAjax_Action class
(/modules/Vtiger/actions/SaveAjax.php) in function process(). Here all
fields are passed to Vtiger_Util_Helper::toSafeHTML() which doesnt expects
an array.
My quick solution is to add this check before:
{{{
if(is_array($recordFieldValue) && $fieldName == 'reminder_time' ) {
$recordFieldValue = implode(' ; ', $recordFieldValue);
}
}}}
So that array is converted to string
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7818>
vtiger development <http://trac.vtiger.com/>
vtiger CRM
More information about the vtigercrm-commits
mailing list