cancel
Showing results for 
Search instead for 
Did you mean: 

After migration Uncaught TypeError: Argument of the type array, null given

Highlighted

After migration Uncaught TypeError: Argument of the type array, null given

What is the mean Argument of the type array, null given,

Error:

 

Fatal error: Uncaught TypeError: Argument 3 passed to Magento\Framework\View\Element\UiComponentFactory::mergeMetadataElement() must be of the type array, null given, called in /var/www/html/giriusa/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php on line 384 and defined in /var/www/html/giriusa/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php:337 Stack trace: #0 /var/www/html/giriusa/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php(384): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataElement(Array, 'configurableExi...', NULL, false) #1 /var/www/html/giriusa/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php(412): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false) #2 /var/www/html/giriusa/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php(412): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false) #3 /var/www/html/giriusa/lib/internal/Magento/Fram in /var/www/html/giriusa/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php on line 337

 

Path : lib/internal/Magento/Framework/View/Element/UiComponentFactory.php

 

UiComponentFactory::mergeMetadataElement() must be of the type array, null given

 

protected function mergeMetadataElement(array $bundleComponents, $name, array $data, $reverseMerge = false)
{
    if (isset($bundleComponents[$name])) {
        $bundleComponents[$name] = $reverseMerge
            ? array_replace_recursive($data, $bundleComponents[$name])
            : array_replace_recursive($bundleComponents[$name], $data);
        return [$bundleComponents, true];
    } else {
        foreach ($bundleComponents as &$childData) {
            if (isset($childData['attributes']['class'])
                && is_a($childData['attributes']['class'], \Magento\Ui\Component\Container::class, true)
                && isset($childData['children']) && is_array($childData['children'])
            ) {
                list($childData['children'], $isMerged) = $this->mergeMetadataElement(
                    $childData['children'],
                    $name,
                    $data,
                    $reverseMerge
                );
                if ($isMerged) {
                    return [$bundleComponents, true];
                }
            }
        }
    }
    return [$bundleComponents, false];
}

Note: After migration from 1.9 getting above error before its working good.