Commit a60771f1 authored by Guy Thouret's avatar Guy Thouret

(fix) Cast values to integers in Feeds PropogateProperties delegate - #616

1 merge request!303Propogate Properties when entities get updated
Pipeline #79255879 running with stages
......@@ -9,12 +9,12 @@ class PropagateProperties extends Properties
{
public function toActivity($from, Activity $to): Activity
{
if ($this->valueHasChanged($from->getModeratorGuid(), $to->getModeratorGuid())) {
$to->setModeratorGuid($from->getModeratorGuid());
if ($this->valueHasChanged((int)$from->getModeratorGuid(), (int)$to->getModeratorGuid())) {
$to->setModeratorGuid((int)$from->getModeratorGuid());
}
if ($this->valueHasChanged($from->getTimeModerated(), $to->getTimeModerated())) {
$to->setTimeModerated($from->getTimeModerated());
if ($this->valueHasChanged((int)$from->getTimeModerated(), (int)$to->getTimeModerated())) {
$to->setTimeModerated((int)$from->getTimeModerated());
}
return $to;
......@@ -22,12 +22,12 @@ class PropagateProperties extends Properties
public function fromActivity(Activity $from, $to)
{
if ($this->valueHasChanged($from->getModeratorGuid(), $to->getModeratorGuid())) {
$to->setModeratorGuid($from->getModeratorGuid());
if ($this->valueHasChanged((int)$from->getModeratorGuid(), (int)$to->getModeratorGuid())) {
$to->setModeratorGuid((int)$from->getModeratorGuid());
}
if ($this->valueHasChanged($from->getTimeModerated(), $to->getTimeModerated())) {
$to->setTimeModerated($from->getTimeModerated());
if ($this->valueHasChanged((int)$from->getTimeModerated(), (int)$to->getTimeModerated())) {
$to->setTimeModerated((int)$from->getTimeModerated());
}
return $to;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment