After update issue

Getting alot of this? Anyideas?



(#1893) Catchable Fatal Error: Argument 1 passed to Proxies__CG__MauticLeadBundleEntityLead::addTag() must be an instance of MauticLeadBundleEntityTag, null given, called in /opt/bitnami/apps/mautic/htdocs/app/bundles/LeadBundle/Model/LeadModel.php on line 1904 and defined

Getting alot of this? Anyideas?

(#1893) Catchable Fatal Error: Argument 1 passed to Proxies__CG__MauticLeadBundleEntityLead::addTag() must be an instance of MauticLeadBundleEntityTag, null given, called in /opt/bitnami/apps/mautic/htdocs/app/bundles/LeadBundle/Model/LeadModel.php on line 1904 and defined

I worked around this so I could finish an import with the following hack:

index b095f92..dbde105 100644
--- a/app/bundles/LeadBundle/Model/LeadModel.php
+++ b/app/bundles/LeadBundle/Model/LeadModel.php
@@ -1901,8 +1901,10 @@ class LeadModel extends FormModel
                     $tagToBeAdded = $foundTags[$tag];
                 }
 
+if ($tagToBeAdded !== NULL) {
                 $lead->addTag($tagToBeAdded);
                 $tagsModified = true;
+}
 
                 $this->logger->debug('CONTACT: Added '.$tag);
             }