Check contact existence before using its email address

refs #3088
This commit is contained in:
Alexander A. Klimov 2018-04-06 12:30:46 +02:00
parent a187966277
commit 96aac70109
1 changed files with 5 additions and 4 deletions

View File

@ -3,16 +3,17 @@
<?php if (! $this->compact): ?>
<?= $this->tabs; ?>
<?php endif ?>
<h1><?= $this->translate('Contact details') ?></h1>
<div class="circular" style="background-image: url('<?=
$this->href('static/gravatar', array('email' => $contact->contact_email))
?>')"></div>
<?php if (! $contact): ?>
<?= $this->translate('No such contact') ?>: <?= $contactName ?>
</div>
<?php return; endif ?>
<h1><?= $this->translate('Contact details') ?></h1>
<div class="circular" style="background-image: url('<?=
$this->href('static/gravatar', array('email' => $contact->contact_email))
?>')"></div>
<table class="avp" style="width: 70%">
<tbody>
<tr>