mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Removing method chaining from core session library & adding assign by references for php4 compatibility.
This commit is contained in:
parent
cadc64c7b6
commit
75f303f7b8
1 changed files with 9 additions and 5 deletions
|
@ -698,7 +698,7 @@ class CakeSession extends Object {
|
|||
* @access private
|
||||
*/
|
||||
function __read($id) {
|
||||
$model = ClassRegistry::getObject('Session');
|
||||
$model =& ClassRegistry::getObject('Session');
|
||||
|
||||
$row = $model->find('first', array(
|
||||
'conditions' => array($model->primaryKey => $id)
|
||||
|
@ -733,7 +733,9 @@ class CakeSession extends Object {
|
|||
}
|
||||
|
||||
$expires = time() + Configure::read('Session.timeout') * $factor;
|
||||
$return = ClassRegistry::getObject('Session')->save(compact('id', 'data', 'expires'));
|
||||
|
||||
$model =& ClassRegistry::getObject('Session');
|
||||
$return = $model->save(compact('id', 'data', 'expires'));
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
@ -745,7 +747,9 @@ class CakeSession extends Object {
|
|||
* @access private
|
||||
*/
|
||||
function __destroy($id) {
|
||||
$return = ClassRegistry::getObject('Session')->delete($id);
|
||||
$model =& ClassRegistry::getObject('Session');
|
||||
$return = $model->delete($id);
|
||||
|
||||
return $return;
|
||||
}
|
||||
/**
|
||||
|
@ -756,7 +760,7 @@ class CakeSession extends Object {
|
|||
* @access private
|
||||
*/
|
||||
function __gc($expires = null) {
|
||||
$model = ClassRegistry::getObject('Session');
|
||||
$model =& ClassRegistry::getObject('Session');
|
||||
|
||||
if (!$expires) {
|
||||
$expires = time();
|
||||
|
|
Loading…
Add table
Reference in a new issue