function cr_unserialize($var) { return stripslashes_recursive(urldecode_recursive(unserialize($var))); }
function cr_unserialize($var) { return urldecode_recursive(unserialize($var)); }
/** * Removes url stuff from the array/variable. * What it does: * - takes off url encoding (%20, etc.) from the array or string var. * - importantly, does it to keys too! * - calls itself recursively if there are any sub arrays. * * @todo not used, consider removing * @deprecated since 1.0 * * @param mixed[]|string $var * @param int $level = 0 * @return array|string */ public function urldecode_recursive($var, $level = 0) { if (!is_array($var)) { return urldecode($var); } // Reindex the array... $new_var = array(); // Add the htmlspecialchars to every element. foreach ($var as $k => $v) { $new_var[urldecode($k)] = $level > 25 ? null : urldecode_recursive($v, $level + 1); } return $new_var; }