phacility/phabricator · error · Exception

Logo configuration is not valid: value must be a dictionary.

Error message

Logo configuration is not valid: value must be a dictionary.

What it means

Type guard thrown from validateOption() when validating the ui.logo configuration: the stored value is not a PHP array. The logo option must be a dictionary with keys like logoImagePHID and wordmarkText, so a scalar or JSON list is rejected during config read/save.

Solutions

  1. Set ui.logo to a JSON object, e.g. {"logoImagePHID": "PHID-FILE-...", "wordmarkText": "..."}
  2. If editing config files by hand, check for JSON syntax errors producing a non-dictionary value
  3. Clear the bad value (bin/config delete ui.logo) and re-set it correctly
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at src/applications/config/custom/PhabricatorCustomLogoConfigType.php:18 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/7d695ff127190bdc. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/config/custom/PhabricatorCustomLogoConfigType.php:18

<?php

final class PhabricatorCustomLogoConfigType
  extends PhabricatorConfigOptionType {

  public static function getLogoImagePHID() {
    $logo = PhabricatorEnv::getEnvConfig('ui.logo');
    return idx($logo, 'logoImagePHID');
  }

  public static function getLogoWordmark() {
    $logo = PhabricatorEnv::getEnvConfig('ui.logo');
    return idx($logo, 'wordmarkText');
  }

  public function validateOption(PhabricatorConfigOption $option, $value) {
    if (!is_array($value)) {
      throw new Exception(
        pht(
          'Logo configuration is not valid: value must be a dictionary.'));
    }

    PhutilTypeSpec::checkMap(
      $value,
      array(
        'logoImagePHID' => 'optional string|null',
        'wordmarkText' => 'optional string|null',
      ));
  }

  public function readRequest(
    PhabricatorConfigOption $option,
    AphrontRequest $request) {

    $viewer = $request->getViewer();
    $view_policy = PhabricatorPolicies::POLICY_PUBLIC;

View on GitHub (pinned to 5720a38cfe)