Simplify a few list() that only care about the first element
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Fri, 17 May 2019 14:54:47 +0000 (16:54 +0200)
committerThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Fri, 17 May 2019 14:54:47 +0000 (16:54 +0200)
commit3a66680ec587e131a288f01ac75cf6242bc406d7
tree392aaafef7a4142e9bbd8fb039326db904058d14
parent48f1bf98a2a205ee82e942cc1316c788f6f25a56
Simplify a few list() that only care about the first element

The nice thing about explode() is that the resulting array is
guaranteed to contain at least one element. The array can not be
empty.

In some of these cases it might be possible to use strstr() instead,
but that returns an empty string when the needle character is not
found. explode() returns the original string in this case.

Change-Id: I6ad1f3273defeaf36e2305fd871eaaf9d3c1e134
includes/OutputHandler.php
includes/installer/Installer.php
includes/media/FormatMetadata.php
includes/specials/SpecialRedirect.php
includes/specials/pagers/UsersPager.php
maintenance/update.php