From: Seb35 Date: Mon, 10 Apr 2017 11:32:15 +0000 (+0200) Subject: Prevent PHPDBG from issuing notices in unit tests X-Git-Tag: 1.31.0-rc.0~3531^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=e00f7180b3ce09a33f1e900feb3d42fc4bfdaa42;p=lhc%2Fweb%2Fwiklou.git Prevent PHPDBG from issuing notices in unit tests Although issuing PHP notices in unit tests is only a nice-to-have, the cause is PHPDBG has no special treatment in JobQueueGroup at the contrary of the PHP SAPI 'cli', and it may be desirable both 'command line SAPIs' have the same behaviour. This is the most apparent difference between cli and phpdbg but there could be a dozen of other occurrences (see bug), potentially creating differences in unit tests depending on the SAPI. Bug: T162591 Change-Id: Idf9c14db72f1f768c5a17b49ed689a05922c57d3 --- diff --git a/includes/jobqueue/JobQueueGroup.php b/includes/jobqueue/JobQueueGroup.php index 71d68d9f93..9f78404efe 100644 --- a/includes/jobqueue/JobQueueGroup.php +++ b/includes/jobqueue/JobQueueGroup.php @@ -170,7 +170,7 @@ class JobQueueGroup { * @since 1.26 */ public function lazyPush( $jobs ) { - if ( PHP_SAPI === 'cli' ) { + if ( PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg' ) { $this->push( $jobs ); return; }