preg_replace(): Argument #3 ($subject) must be of type array|string, null given 📋

TypeError
Toggle Vendor Stack Frames
           $linkMap[] = explode(','$row); 
        
        foreach($linkMap as $row
        
                $str preg_replace('/(<a.*?>\s*)('.$row[0].')(\s*<\/a>)/sui''${2}'$str); 
        
        $tmpKwds = array(); 
        foreach($linkMap as $i=>$row) { 
        list($kwd$url) = $row
Error in: ROOT/src/Controller/YuanmaController.php, line 2583

If you want to customize this error message, create templates/Error/error500.php