phacility/phabricator · error · Exception
Incorrect Property Passed
Error message
Incorrect Property Passed
What it means
PHUIHeaderView supports exactly one property type on the header itself: the integer constant PROPERTY_STATUS. addProperty($property, $value) stores values keyed by that type, and at render time a switch accepts only PHUIHeaderView::PROPERTY_STATUS — any other key (a string like 'due-date', an invented constant, or arguments shifted so a value lands in the type slot) hits the default case and throws. The supported entry point for status tags is setStatus($icon, $color, $name), which internally adds a PROPERTY_STATUS entry.
Source
Thrown at src/view/phui/PHUIHeaderView.php:362
$left[] = phutil_tag(
'div',
array(
'class' => 'phui-header-subheader',
),
array(
$this->subheader,
));
}
if ($this->properties || $this->policyObject || $this->tags) {
$property_list = array();
foreach ($this->properties as $type => $property) {
switch ($type) {
case self::PROPERTY_STATUS:
$property_list[] = $property;
break;
default:
throw new Exception(pht('Incorrect Property Passed'));
break;
}
}
if ($this->policyObject) {
$property_list[] = $this->renderPolicyProperty($this->policyObject);
}
if ($this->tags) {
$property_list[] = $this->tags;
}
$left[] = phutil_tag(
'div',
array(
'class' => 'phui-header-subheader',
),
$property_list);View on GitHub (pinned to 5720a38cfe)
Solutions
- Use $header->setStatus($icon, $color, $name) for status tags.
- Or add the status entry directly: $header->addProperty(PHUIHeaderView::PROPERTY_STATUS, $tag).
- For arbitrary key/value data, use PHUIPropertyListView (via PHUIObjectBoxView), setSubheader(), setTags(), or setPolicyObject() instead of the header property slot.
Example fix
// before
$header->addProperty('due-date', $date_tag); // invalid type key: throws
// after
$header->setStatus('fa-clock-o', 'indigo', pht('Due Soon'));
// for arbitrary key/value data, use a property list:
$properties = id(new PHUIPropertyListView())
->addProperty(pht('Due Date'), $date_tag); Defensive patterns
Strategy: type-guard
Validate before calling
$valid_types = array(PHUIHeaderView::PROPERTY_STATUS);
if (!in_array($type, $valid_types, true)) {
// not a header property type: route the value to a PHUIPropertyListView
$properties->addProperty($label, $value);
} else {
$header->addProperty($type, $value);
} Type guard
function isKnownHeaderPropertyType($type) {
return $type === PHUIHeaderView::PROPERTY_STATUS;
} Prevention
- Treat addProperty() on headers as internal: prefer setStatus() for status tags.
- The first argument is a type enum, not a display label.
- Arbitrary key/value data belongs in PHUIPropertyListView, not on the header.
When it happens
Trigger: Calling $header->addProperty('some-key', $value) with a made-up key instead of PHUIHeaderView::PROPERTY_STATUS; or copying PHUIPropertyListView-style addProperty($key, $value) usage onto the header, where the first argument is a type enum rather than a label.
Common situations: Trying to display arbitrary metadata directly on a header; argument-order mistakes; code ported from property-list usage where keys are free-form strings.
Related errors
- Unknown condition "%s"!
- Invalid effect!
- Service "%s" is unrecognized, restricted, or you do not have
- When creating a new Almanac interface via the Conduit API, y
- Device "%s" is unrecognized, restricted, or you do not have
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/8538c8b2ef000b7b.
Report an issue: GitHub.