jenkins-bot has submitted this change and it was merged.

Change subject: Revert "wfShellExec: Work around PHP 5.3 stream_select() issue"
......................................................................


Revert "wfShellExec: Work around PHP 5.3 stream_select() issue"

No longer needed. Currently, MediaWiki supports neither PHP 5.3
nor HHVM 3.4 or lower. The minimum HHVM version stated in the
Compatibility section of the RELEASE-NOTES file is 3.6.5.

This reverts commit 8bd6f698ccb990c9a9d37f495b8b5b7620832018.

Change-Id: I2edd25c4ce00eb324f7f6e04b2034ad28f7c6964
---
M includes/GlobalFunctions.php
1 file changed, 1 insertion(+), 10 deletions(-)

Approvals:
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index d5c6553..66e2440 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -2499,14 +2499,6 @@
        $eintr = defined( 'SOCKET_EINTR' ) ? SOCKET_EINTR : 4;
        $eintrMessage = "stream_select(): unable to select [$eintr]";
 
-       // Build a table mapping resource IDs to pipe FDs to work around a
-       // PHP 5.3 issue in which stream_select() does not preserve array keys
-       // <https://bugs.php.net/bug.php?id=53427>.
-       $fds = [];
-       foreach ( $pipes as $fd => $pipe ) {
-               $fds[(int)$pipe] = $fd;
-       }
-
        $running = true;
        $timeout = null;
        $numReadyPipes = 0;
@@ -2539,9 +2531,8 @@
                                break;
                        }
                }
-               foreach ( $readyPipes as $pipe ) {
+               foreach ( $readyPipes as $fd => $pipe ) {
                        $block = fread( $pipe, 65536 );
-                       $fd = $fds[(int)$pipe];
                        if ( $block === '' ) {
                                // End of file
                                fclose( $pipes[$fd] );

-- 
To view, visit https://gerrit.wikimedia.org/r/270452
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2edd25c4ce00eb324f7f6e04b2034ad28f7c6964
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: PleaseStand <pleasest...@live.com>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: PleaseStand <pleasest...@live.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to