Zend certified PHP/Magento developer

Magento 2.4.2 Notice: Undefined index: src in /var/www/html/magento2/lib/internal/Magento/Framework/View/Page/Config/Generator/Head.php on line 126

My problem is that I used a third part theme, and by my own mistake it turned out that version 2.3.2 should be used for this template.
But after I tried to get my base theme back, my interface gave an error. I’m new to Magento and not really sure how to fix this. Can anyone help?

Here is line 126 in Head.php

           126     $data['src'],

And here is the function

protected function processAssets(Structure $pageStructure)
{
    foreach ($pageStructure->getAssets() as $name => $data) {
        if (isset($data['src_type']) && in_array($data['src_type'], $this->remoteAssetTypes)) {
            if ($data['src_type'] === self::SRC_TYPE_CONTROLLER) {
                $data['src'] = $this->url->getUrl($data['src']);
            }

            $this->pageConfig->addRemotePageAsset(
                $data['src'],
                isset($data['content_type']) ? $data['content_type'] : self::VIRTUAL_CONTENT_TYPE_LINK,
                $this->getAssetProperties($data),
                $name
            );
        } else {
            $this->pageConfig->addPageAsset($name, $this->getAssetProperties($data));
        }
    }
    return $this;