Smarty-notice fix - use array_key_exists
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 22 Aug 2023 06:28:29 +0000 (18:28 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 22 Aug 2023 06:28:29 +0000 (18:28 +1200)
templates/CRM/Contact/Page/Inline/Address.tpl

index 9c248f2b65d41a906676f9a824bf87916180377a..7c18e020181c857360c634811c30a43de5033365 100644 (file)
@@ -36,7 +36,7 @@
           {/if}
         </div>
         <div class="crm-content">
-          {if !empty($sharedAddresses.$locationIndex.shared_address_display.name)}
+          {if array_key_exists($locationIndex, $sharedAddresses) && !empty($sharedAddresses.$locationIndex.shared_address_display.name)}
             <strong>{ts 1=$sharedAddresses.$locationIndex.shared_address_display.name}Address belongs to %1{/ts}</strong><br />
           {/if}
           {$add.display|smarty:nodefaults|purify|nl2br}