Page MenuHomePhorge

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

Authored by valerio.bozzolan on Feb 28 2023, 09:39.

Details

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

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This is how it will render after this change:

Phorge Search Servers with MySQL without exception.png (367×456 px, 24 KB)

It's just something to avoid that exception.

It can surely improve saying that it's "Active" but it's probably not appropriate to assume this positive status condition in this position, and so any further improvement about the status itself is probably out of the scope of this fix and should be put in the getConnectionStatus() method maybe.

src/applications/config/controller/services/PhabricatorConfigClusterSearchController.php
78
NOTE: I'm not very happy about the fact that here we are, in a single line, creating the array and assigning the first value.

But I think it's out of the scope of this patch to improve that part.

avivey subscribed.

Thanks - this logic could use some more love, as you say.

This revision is now accepted and ready to land.Mar 3 2023, 10:33