Closed rob1256 closed 6 years ago
The trigger of the 'afterConstruct' event is not done the same as other events and means that the resulting event does not have the document as a target. The line in question is: https://github.com/sokil/php-mongo/blob/master/src/Document.php#L124
And should just need changing to: $this->triggerEvent('afterConstruct');
$this->triggerEvent('afterConstruct');
fixed
The trigger of the 'afterConstruct' event is not done the same as other events and means that the resulting event does not have the document as a target. The line in question is: https://github.com/sokil/php-mongo/blob/master/src/Document.php#L124
And should just need changing to:
$this->triggerEvent('afterConstruct');