aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/mysql.php
diff options
context:
space:
mode:
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>2019-03-24 15:04:32 +0100
committerThiemo Kreuz (WMDE) <thiemo.kreuz@wikimedia.de>2019-03-24 20:12:23 +0000
commit9314453c93e9daa502a706063b66d003adcbee0b (patch)
treeabddbf296449ba18e485e9e26384312e95ffda0b /maintenance/mysql.php
parent0449f653c7147328e9ddcce9861733fc29e6f961 (diff)
downloadmediawikicore-9314453c93e9daa502a706063b66d003adcbee0b.tar.gz
mediawikicore-9314453c93e9daa502a706063b66d003adcbee0b.zip
Make use of the list() feature where it makes sense
This code is functionally identical, but less error prone (not so easy to forget or mix these numerical indexes). This patch happens to touch the Parser, which might be a bit scary. We can remove this file from this patch if you prefer. Change-Id: I8cbe3a9a6725d1c42b86e67678c1af15fbc5961a
Diffstat (limited to 'maintenance/mysql.php')
-rw-r--r--maintenance/mysql.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/maintenance/mysql.php b/maintenance/mysql.php
index 34a6cb695187..c1e403cd3a09 100644
--- a/maintenance/mysql.php
+++ b/maintenance/mysql.php
@@ -137,9 +137,7 @@ class MysqlMaintenance extends Maintenance {
} elseif ( substr_count( $realServer, ':' ) == 1 ) {
// If we have a colon and something that's not a port number
// inside the hostname, assume it's the socket location
- $hostAndSocket = explode( ':', $realServer, 2 );
- $realServer = $hostAndSocket[0];
- $socket = $hostAndSocket[1];
+ list( $realServer, $socket ) = explode( ':', $realServer, 2 );
}
if ( $dbName === false ) {