Page MenuHomePhorge

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

Authored by valerio.bozzolan on Feb 28 2023, 09:39.
Referenced Files
F304494: D25070.diff
Sat, Jun 3, 00:59
Unknown Object (File)
Wed, May 31, 06:05
Unknown Object (File)
Apr 30 2023, 19:13
Unknown Object (File)
Apr 13 2023, 12:57
Unknown Object (File)
Apr 9 2023, 19:37
Unknown Object (File)
Mar 19 2023, 00:18
Unknown Object (File)
Mar 18 2023, 02:32
Unknown Object (File)
Mar 17 2023, 02:36
"Love" token, awarded by valerio.bozzolan.



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

rP Phorge
Lint Not Applicable
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.

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 added a subscriber: avivey.

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