htmlspecialchars() error
6 posts
• Page 1 of 1
Hello Steve,
I use Dataface v0.7.1 from date of its release. Up to now everything was worked right but today I received surprising error on the end of all result list: Warning: htmlspecialchars() expects parameter 1 to be string, array given in C:\foss\fas.sfu.ca\dataface-0.7.1\Dataface\ResultList.php on line 302 I changed nothing in application or environment for last 2 weeks (win xp / php 5.2.2 / apache 2.2.4 / mysql 5.). Do you have some idea where I need to looking for this warning reasons ? Ivan
Look at the html source for that page to look at the code just before the warning.Ê This error is occurring when it is rendering the selected records form.. evidently there is an array value in the query parameters -- I just want to see what this array. Thanks for the report. -Steve
I goes through the html code. There I found a reference to mbfcookie. According to my search it is the array.
Warning: htmlspecialchars() expects parameter 1 to be string, array given in C:\foss\fas.sfu.ca\dataface-0.7.1\Dataface\ResultList.php on line 302 When I delete this cookie everything is fine and warning disappeared. Ivan
I attach HTML Source copy selection:
form id="result_list_selected_items_form" method="post" input type="hidden" name="PHPSESSID" value="b149bb66724ae4aa7ccea6a27e0dac2d"> Warning: htmlspecialchars() expects parameter 1 to be string, array given in b>C:\foss\fas.sfu.ca\dataface-0.7.1\Dataface\ResultList.php on line 302 input type="hidden" name="mbfcookie" value="" input type="hidden" name="dataface__lang" value="en" input type="hidden" name="-table" value="smf_organization"
On line 299 of ResultList.php, change: ÊÊÊ ÊÊÊ if ( strlen($key)>1 and $key{0} == '-' and $key{1} == '-' ){ to:
urlencode($key) This should be htmlspecialchars($key) Best regards Steve
Hi Steve,
same problem is on the line 474 in Dataface/RelatedList.php file I used proposed solution for ResultList.php and changed : if ( strlen($key)>1 and $key{0} == '-' and $key{1} == '-' ){ to : if ( (strlen($key)>1 and $key{0} == '-' and $key{1} == '-') or is_array($val) ){ Best regards, Ivan
6 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 20 guests |