From 0afc3cf016da0284e011cd7f8d5489a57d615698 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Mon, 22 Aug 2016 21:16:21 +0200 Subject: [PATCH] ApiUpload: Fix fatal in dieStatusWithCode() If $extraData was null, but $moreExtraData was given, the following fatal would occur: Fatal error: Unsupported operand types in /var/www/html/w/includes/api/ApiUpload.php on line 408 Follow-up to c9b5b3e988e3554c231860a2da587dff16b05e0c. Change-Id: I613eed1f7429247fe46afa454d36f518f6a81ebe --- includes/api/ApiUpload.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index ac817ba3c9..f7ce55214e 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -405,6 +405,7 @@ class ApiUpload extends ApiBase { $code = $overrideCode; } if ( $moreExtraData ) { + $extraData = $extraData ?: []; $extraData += $moreExtraData; } $this->dieUsage( $msg, $code, 0, $extraData ); -- 2.20.1