mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
fix: remove unserialize() in old()
I can't think of any use cases.
This commit is contained in:
parent
76ad2ad24e
commit
18138fa4c7
@ -813,11 +813,6 @@ if (! function_exists('old')) {
|
||||
return $default;
|
||||
}
|
||||
|
||||
// If the result was serialized array or string, then unserialize it for use...
|
||||
if (is_string($value) && (strpos($value, 'a:') === 0 || strpos($value, 's:') === 0)) {
|
||||
$value = unserialize($value);
|
||||
}
|
||||
|
||||
return $escape === false ? $value : esc($value, $escape);
|
||||
}
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ final class CommonFunctionsTest extends CIUnitTestCase
|
||||
$_GET = ['foo' => 'bar'];
|
||||
$_POST = [
|
||||
'bar' => 'baz',
|
||||
'zibble' => serialize('fritz'),
|
||||
'zibble' => 'fritz',
|
||||
];
|
||||
|
||||
$response = new RedirectResponse(new App());
|
||||
|
Loading…
x
Reference in New Issue
Block a user