Issue #3187004 by a.dmitriiev, mohit_aghera: DrupalDateTime serialization issue
2 unresolved threads
Closes #3187004
Merge request reports
Activity
added 1143 commits
-
40994dd3...2c979f05 - 1142 commits from branch
project:9.3.x
- f3e3cf7f - Issue #3187004 by a.dmitriiev, mohit_aghera: DrupalDateTime serialization issue
-
40994dd3...2c979f05 - 1142 commits from branch
168 173 174 /** 175 * {@inheritdoc} 176 */ 177 public function __sleep() { 178 return array_diff($this->defaultSleep(), ['formatTranslationCache']); 179 } 180 181 /** 182 * {@inheritdoc} 183 */ 184 public function __wakeup() { 185 $this->defaultWakeup(); 186 $this->formatTranslationCache = []; 187 } 188 166 171 return $value; 167 172 } 168 173 174 /** 175 * {@inheritdoc} 176 */ 177 public function __sleep() { 178 return array_diff($this->defaultSleep(), ['formatTranslationCache']); 179 } 180 - Comment on lines +174 to +180
This class really doesn't need any of the service detection magic. Lets just do this and get rid of the trait.
$vars = get_object_vars($this); unset($vars['formatTranslationCache']); // return $vars; return array_keys($vars);
Edited by James Gilliland
Please register or sign in to reply