Skip to content

Commit

Permalink
fix(company): localised text comparisons expecting null instead of em…
Browse files Browse the repository at this point in the history
…pty string
  • Loading branch information
tomudding committed Jul 23, 2024
1 parent 85c3ea9 commit 9288a5f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion module/Company/view/company/company/job-list.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ $this->headScript()
<?= $this->escapeHtml($this->localiseText($job->getName())) ?>
</h2>
<p class="card-subtitle text-muted"><?= $this->escapeHtml($company->getName()) ?></p>
<?php if (null !== $this->localiseText($job->getLocation())): ?>
<?php if ('' !== $this->localiseText($job->getLocation())): ?>
<p class="job-location">
<?= $this->escapeHtml($this->localiseText($job->getLocation())) ?>
</p>
Expand Down
4 changes: 2 additions & 2 deletions module/Company/view/company/company/jobs.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ $this->headScript()
</a>
</p>
<?php endif; ?>
<?php if (null !== $this->localiseText($job->getWebsite())): ?>
<?php if ('' !== $this->localiseText($job->getWebsite())): ?>
<p class="job-website">
<a href="<?= $this->localiseText($job->getWebsite()) ?>" rel="noreferrer">
<?= $this->translate('View Website') ?>
</a>
</p>
<?php endif; ?>
<?php if (null !== $this->localiseText($job->getAttachment())): ?>
<?php if ('' !== $this->localiseText($job->getAttachment())): ?>
<p class="job-vacancy">
<a href="<?= $this->fileUrl($this->localiseText($job->getAttachment())) ?>">
<?= $this->translate('View Attachment') ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ $companyURL = $escaper->escapeHtmlAttr($this->localiseText($company->getWebsite(
<div class="col-md-12">
<h1 class="company-name">
<a href="<?= $companyURL ?>"><?= $this->escapeHtml($company->getName()) ?></a>
<?php
if (null !== $this->localiseText($company->getSlogan())):
?>
<?php if ('' !== $this->localiseText($company->getSlogan())): ?>
<small>&#124; <?= $this->escapeHtml($this->localiseText($company->getSlogan())) ?></small>
<?php
endif;
?>
<?php endif; ?>
</h1>
</div>
<div class="col-md-3">
Expand Down

0 comments on commit 9288a5f

Please sign in to comment.