Project

General

Profile

Bug #19182 » bug0009100.diff

Administrator Admin, 2008-08-15 12:53

View differences:

t3lib/class.t3lib_div.php (working copy)
* @return mixed POST var named $var and if not set, the GET var of the same name.
* @see GPvar()
*/
public static function _GP($var) {
if(empty($var)) return;
$value = isset($_POST[$var]) ? $_POST[$var] : $_GET[$var];
if (isset($value)) {
if (is_array($value)) { t3lib_div::stripSlashesOnArray($value); } else { $value = stripslashes($value); }
}
return $value;
public static function _GP($var) {
if(empty($var)) return;
$postA = is_array($_POST[$var]) ? $_POST[$var] : array();
$getA = is_array($_GET[$var]) ? $_GET[$var] : array();
$value = t3lib_div::array_merge_recursive_overrule($getA,$postA);
if (isset($value)) {
if (is_array($value)) {
t3lib_div::stripSlashesOnArray($value);
}
else {
$value = stripslashes($value);
}
}
return $value;
}
/**
(1-1/4)