Issue #2190421 by amateescu: Fix some services that shouldn't be serialized.
parent
f9c316f9fd
commit
5bcaf27b05
|
@ -338,6 +338,10 @@ abstract class ContentEntityBase extends Entity implements \IteratorAggregate, C
|
|||
$this->fields = array();
|
||||
$this->fieldDefinitions = NULL;
|
||||
$this->clearTranslationCache();
|
||||
|
||||
// Don't serialize the url generator.
|
||||
$this->urlGenerator = NULL;
|
||||
|
||||
return array_keys(get_object_vars($this));
|
||||
}
|
||||
|
||||
|
|
|
@ -394,4 +394,14 @@ abstract class Entity implements EntityInterface {
|
|||
return $this->urlGenerator;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __sleep() {
|
||||
// Don't serialize the url generator.
|
||||
$this->urlGenerator = NULL;
|
||||
|
||||
return array_keys(get_object_vars($this));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -30,6 +30,13 @@ class CommentFormController extends ContentEntityFormController {
|
|||
*/
|
||||
protected $fieldInfo;
|
||||
|
||||
/**
|
||||
* The current user.
|
||||
*
|
||||
* @var \Drupal\Core\Session\AccountInterface
|
||||
*/
|
||||
protected $currentUser;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue