mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Allowing SessionComponent::write() to accept an associative array of keys/values
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3763 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
b68181311c
commit
40381bf3ff
1 changed files with 7 additions and 1 deletions
|
@ -69,7 +69,13 @@ class SessionComponent extends Object{
|
||||||
* @param unknown_type $value
|
* @param unknown_type $value
|
||||||
* @return unknown
|
* @return unknown
|
||||||
*/
|
*/
|
||||||
function write($name, $value) {
|
function write($name, $value = null) {
|
||||||
|
if (is_array($name)) {
|
||||||
|
foreach ($name as $key => $val) {
|
||||||
|
$this->CakeSession->writeSessionVar($key, $val);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
return $this->CakeSession->writeSessionVar($name, $value);
|
return $this->CakeSession->writeSessionVar($name, $value);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue