2010-10-19 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_io.php: fixed the function "safe_input" when the
	parameter is a array.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3421 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-10-19 10:28:26 +00:00
parent 40f27f4576
commit 5ab8eef006
2 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-10-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_io.php: fixed the function "safe_input" when the
parameter is a array.
2010-10-18 Sancho Lerena <slerena@artica.es> 2010-10-18 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Alter some trecon_task info to avoid problems on new * pandoradb.sql: Alter some trecon_task info to avoid problems on new

View File

@ -1,4 +1,15 @@
<?php <?php
/**
* Safe input function for array.
*
* @param mixed $item The item pass as reference of item.
*
* @return void
*/
function safe_input_array(&$item) {
$item = safe_input($item);
}
/** /**
* Cleans a string by encoding to UTF-8 and replacing the HTML * Cleans a string by encoding to UTF-8 and replacing the HTML
* entities. UTF-8 is necessary for foreign chars like asian * entities. UTF-8 is necessary for foreign chars like asian
@ -16,7 +27,7 @@ function safe_input($value) {
return $value; return $value;
if (is_array($value)) { if (is_array($value)) {
array_walk($value, "safe_input"); array_walk($value, "safe_input_array");
return $value; return $value;
} }