summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorctrlaltca <>2012-11-28 09:35:01 +0000
committerctrlaltca <>2012-11-28 09:35:01 +0000
commiteb5c0cc2715d77dc16a6cfbb64e2503d168367d0 (patch)
treec501dde24683af880bac344888491b890cfb48e9 /framework
parent8c6333dec66222a5d83faabfc5af22d646986660 (diff)
TComponent: strip out in __sleep() variables that doesn't need to be saved (because they did not change from their default values) when the class gets serialized. References #337
This definitely needs better handling of subclasses properties
Diffstat (limited to 'framework')
-rw-r--r--framework/TComponent.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/framework/TComponent.php b/framework/TComponent.php
index 95fc2855..f1a5503f 100644
--- a/framework/TComponent.php
+++ b/framework/TComponent.php
@@ -1721,8 +1721,14 @@ class TComponent
$a = (array)$this;
$a = array_keys($a);
$exprops = array();
+ if($this->_listeningenabled===false)
+ $exprops[] = "\0TComponent\0_listeningenabled";
+ if($this->_behaviorsenabled===true)
+ $exprops[] = "\0TComponent\0_behaviorsenabled";
if ($this->_e===array())
$exprops[] = "\0TComponent\0_e";
+ if ($this->_m===null)
+ $exprops[] = "\0TComponent\0_m";
return array_diff($a,$exprops);
}
}