...
 
Commits (2)
......@@ -75,11 +75,11 @@ class BoostCampaignResolverDelegate implements ResolverDelegate
*/
public function map($urn, $campaign)
{
if (!$campaign->getEntityUrns()) {
if (!$campaign || !$campaign->getEntityUrns()) {
return null;
}
$entity = $this->resolver->setOpts(['ignoreAcl' => true])->single($campaign->getEntityUrns()[0]);
$entity = $this->resolver->setOpts(['ignoreAcl' => true])->single(new Urn($campaign->getEntityUrns()[0]));
$entity->boost = true;
$entity->boosted_guid = $campaign->getGuid();
$entity->urn = $campaign->getUrn();
......
......@@ -77,7 +77,7 @@ class BoostGuidResolverDelegate implements ResolverDelegate
*/
public function map($urn, $entity)
{
$boostedEntity = $entity->getEntity();
$boostedEntity = $entity ? $entity->getEntity() : null;
if ($boostedEntity) {
$boostedEntity->boosted = true;
......