1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 04:20:55 +01:00

Fix an issue where Harbormaster might cycle while saving

The way custom field interact with storage is a little odd, and can send us
down a bad path when applying external effect while saving changes.
This commit is contained in:
epriestley 2015-10-14 02:56:39 -07:00
parent 43bee4562c
commit 4169d7bfd5
2 changed files with 7 additions and 4 deletions

View file

@ -540,9 +540,7 @@ abstract class PhabricatorCustomField extends Phobject {
* @task storage
*/
public function newStorageObject() {
if ($this->proxy) {
return $this->proxy->newStorageObject();
}
// NOTE: This intentionally isn't proxied, to avoid call cycles.
throw new PhabricatorCustomFieldImplementationIncompleteException($this);
}

View file

@ -186,7 +186,12 @@ abstract class PhabricatorStandardCustomField
}
public function shouldUseStorage() {
try {
$object = $this->newStorageObject();
return true;
} catch (PhabricatorCustomFieldImplementationIncompleteException $ex) {
return false;
}
}
public function getValueForStorage() {