Skip to content

Commit 9a43f02

Browse files
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #11513: Modify Report processor to return 500 (by @andrewhowdencom) - #13914: Pass Expected Data Type in backgroundColor Call (2.2) (by @northernco) Fixed GitHub Issues: - #11512: Incorrect use of 503 status code (reported by @andrewhowdencom) has been fixed in #11513 by @andrewhowdencom in 2.2-develop branch Related commits: 1. b4bfe4b
2 parents 3f3287f + 70a0048 commit 9a43f02

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

app/code/Magento/Swatches/Helper/Media.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ protected function setupImageProperties(\Magento\Framework\Image $image, $isSwat
207207
if ($isSwatch) {
208208
$image->keepFrame(true);
209209
$image->keepTransparency(true);
210-
$image->backgroundColor('#FFF');
210+
$image->backgroundColor([255, 255, 255]);
211211
}
212212
return $this;
213213
}

app/code/Magento/Swatches/Test/Unit/Helper/MediaTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ public function testGenerateSwatchVariations()
166166
$this->imageFactoryMock->expects($this->any())->method('create')->willReturn($image);
167167
$this->generateImageConfig();
168168
$image->expects($this->any())->method('resize')->will($this->returnSelf());
169+
$image->expects($this->atLeastOnce())->method('backgroundColor')->with([255, 255, 255])->willReturnSelf();
169170
$this->mediaHelperObject->generateSwatchVariations('/e/a/earth.png');
170171
}
171172

pub/errors/processor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public function process503()
215215
public function processReport()
216216
{
217217
$this->pageTitle = 'There has been an error processing your request';
218-
$this->_response->setHttpResponseCode(503);
218+
$this->_response->setHttpResponseCode(500);
219219

220220
$this->showErrorMsg = false;
221221
$this->showSentMsg = false;

0 commit comments

Comments
 (0)