mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20:56 +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:
parent
43bee4562c
commit
4169d7bfd5
2 changed files with 7 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -186,7 +186,12 @@ abstract class PhabricatorStandardCustomField
|
|||
}
|
||||
|
||||
public function shouldUseStorage() {
|
||||
try {
|
||||
$object = $this->newStorageObject();
|
||||
return true;
|
||||
} catch (PhabricatorCustomFieldImplementationIncompleteException $ex) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getValueForStorage() {
|
||||
|
|
Loading…
Reference in a new issue