Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed versionnable infinite loop when no diff.

  • Loading branch information...
commit 68fe0600b76437c81bc02f95e9206f38541f2731 1 parent 47e9a2c
@themouette authored
View
4 generator/lib/behavior/versionable/VersionableBehaviorObjectBuilderModifier.php
@@ -192,11 +192,15 @@ public function isVersioningNecessary(\$con = null)
foreach ($this->behavior->getVersionableReferrers() as $fk) {
$fkGetter = $this->builder->getRefFKPhpNameAffix($fk, $plural = true);
$script .= "
+ // to avoid infinite loops, emulate in save
+ \$this->alreadyInSave = true;
foreach (\$this->get{$fkGetter}(null, \$con) as \$relatedObject) {
if (\$relatedObject->isVersioningNecessary(\$con)) {
+ \$this->alreadyInSave = false;
return true;
}
}
+ \$this->alreadyInSave = false;
";
}
$script .= "
Please sign in to comment.
Something went wrong with that request. Please try again.