Page MenuHomePhabricator

D15451.diff
No OneTemporary

D15451.diff

diff --git a/src/applications/herald/engine/HeraldEngine.php b/src/applications/herald/engine/HeraldEngine.php
--- a/src/applications/herald/engine/HeraldEngine.php
+++ b/src/applications/herald/engine/HeraldEngine.php
@@ -274,7 +274,7 @@
} else {
foreach ($conditions as $condition) {
try {
- $object->getHeraldField($condition->getFieldName());
+ $this->getConditionObjectValue($condition, $object);
} catch (Exception $ex) {
$reason = pht(
'Field "%s" does not exist!',
@@ -366,14 +366,11 @@
}
public function getObjectFieldValue($field) {
- if (isset($this->fieldCache[$field])) {
- return $this->fieldCache[$field];
+ if (!array_key_exists($field, $this->fieldCache)) {
+ $this->fieldCache[$field] = $this->object->getHeraldField($field);
}
- $result = $this->object->getHeraldField($field);
-
- $this->fieldCache[$field] = $result;
- return $result;
+ return $this->fieldCache[$field];
}
protected function getRuleEffects(

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 19, 5:41 AM (7 h, 19 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6726660
Default Alt Text
D15451.diff (1 KB)

Event Timeline