Skip to content

Commit 4a574a5

Browse files
committed
Fixed Critical Errors in MFTF tests
1 parent 0857bd7 commit 4a574a5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/code/Magento/Bundle/Model/Product/SelectionProductsDisabledRequired.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Framework\EntityManager\MetadataPool;
1111
use Magento\Catalog\Model\Product\Attribute\Source\Status;
1212
use Magento\Bundle\Model\ResourceModel\Selection as BundleSelection;
13+
use Magento\Store\Model\Store;
1314
use Magento\Store\Model\StoreManagerInterface;
1415
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory as ProductCollectionFactory;
1516
use Magento\Catalog\Model\Product;
@@ -128,7 +129,8 @@ public function getChildProductIds(int $bundleId, ?int $websiteId = null): array
128129
private function getProducts(array $selectionProductIds, int $websiteId): array
129130
{
130131
$productIds = [];
131-
$defaultStoreId = $this->storeManager->getWebsite($websiteId)->getDefaultStore()->getId();
132+
$defaultStore = $this->storeManager->getWebsite($websiteId)->getDefaultStore();
133+
$defaultStoreId = $defaultStore ? $defaultStore->getId() : Store::DEFAULT_STORE_ID;
132134
foreach ($selectionProductIds as $optionProductIds) {
133135
$productIds = array_merge($productIds, $optionProductIds);
134136
}

lib/internal/Magento/Framework/Filesystem/Driver/Http.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ protected function getScheme($scheme = null)
246246
* @param string $hostname
247247
* @param int $port
248248
* @throws \Magento\Framework\Exception\FileSystemException
249-
* @return array
249+
* @return resource|bool
250250
*/
251251
protected function open($hostname, $port)
252252
{
253-
$result = @fsockopen($hostname, $port, $errorNumber = null, $errorMessage = null);
253+
$result = @fsockopen($hostname, $port, $errorNumber, $errorMessage);
254254
if ($result === false) {
255255
throw new FileSystemException(
256256
new \Magento\Framework\Phrase(

0 commit comments

Comments
 (0)