Merge "Use MediaWiki\SuppressWarnings around trigger_error('') instead @"
[lhc/web/wiklou.git] / includes / shell / Command.php
index 7b21c06..2afc548 100644 (file)
@@ -429,7 +429,7 @@ class Command {
                        }
 
                        // clear get_last_error without actually raising an error
-                       // from http://php.net/manual/en/function.error-get-last.php#113518
+                       // from https://secure.php.net/manual/en/function.error-get-last.php#113518
                        // TODO replace with clear_last_error when requirements are bumped to PHP7
                        set_error_handler( function () {
                        }, 0 );
@@ -438,12 +438,12 @@ class Command {
                        \MediaWiki\restoreWarnings();
                        restore_error_handler();
 
-                       $readPipes = wfArrayFilterByKey( $pipes, function ( $fd ) use ( $desc ) {
+                       $readPipes = array_filter( $pipes, function ( $fd ) use ( $desc ) {
                                return $desc[$fd][0] === 'pipe' && $desc[$fd][1] === 'r';
-                       } );
-                       $writePipes = wfArrayFilterByKey( $pipes, function ( $fd ) use ( $desc ) {
+                       }, ARRAY_FILTER_USE_KEY );
+                       $writePipes = array_filter( $pipes, function ( $fd ) use ( $desc ) {
                                return $desc[$fd][0] === 'pipe' && $desc[$fd][1] === 'w';
-                       } );
+                       }, ARRAY_FILTER_USE_KEY );
                        // stream_select parameter names are from the POV of us being able to do the operation;
                        // proc_open desriptor types are from the POV of the process doing it.
                        // So $writePipes is passed as the $read parameter and $readPipes as $write.