@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix "Undefined index: icon" when visiting Search Servers using MySQL

Summary:
Fix "Undefined index: icon" when visiting Search Servers using MySQL

NOTE: This patch just fixes the exception at my best but this section probably deserves more improvement to show a better default.

Closes T15155

Test Plan:
- use the default Search Server configuration (that is MySQL)
- open the page Search Servers (/config/cluster/search/)
- verify that it does not explode anymore but it displays something unuseful

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15155

Differential Revision: https://we.phorge.it/D25070

+13 -1
+13 -1
src/applications/config/controller/services/PhabricatorConfigClusterSearchController.php
··· 60 60 61 61 foreach ($service->getHosts() as $host) { 62 62 try { 63 + // Default status icon 64 + // 65 + // At the moment the default status is shown also when 66 + // you just use MySQL as search server. So, on MySQL it 67 + // shows "Unknown" even if probably it should says "Active". 68 + // If you have time, please improve the MySQL getConnectionStatus() 69 + // to return something more useful than this default. 70 + $default_status = array( 71 + 'icon' => 'fa-question-circle', 72 + 'color' => 'blue', 73 + 'label' => pht('Unknown'), 74 + ); 63 75 $status = $host->getConnectionStatus(); 64 - $status = idx($status_map, $status, array()); 76 + $status = idx($status_map, $status, $default_status); 65 77 } catch (Exception $ex) { 66 78 $status['icon'] = 'fa-times'; 67 79 $status['label'] = pht('Connection Error');