Cast WordCount to string to fix PHPStan error

This commit is contained in:
Mike Colagrosso 2025-03-24 18:14:08 -06:00 committed by Alex Cabal
parent 8a3a05a264
commit dab857d127

View file

@ -118,7 +118,7 @@ catch(Exceptions\EbookNotFoundException){
<aside id="reading-ease">
<? if($ebook->WordCount !== null){ ?>
<meta property="schema:wordCount" content="<?= Formatter::EscapeHtml($ebook->WordCount) ?>"/>
<meta property="schema:wordCount" content="<?= Formatter::EscapeHtml((string)$ebook->WordCount) ?>"/>
<p><?= number_format($ebook->WordCount) ?> words (<?= $ebook->ReadingTime ?>) with a reading ease of <?= $ebook->ReadingEase ?> (<?= $ebook->ReadingEaseDescription ?>)</p>
<? } ?>
<? if($ebook->ContributorsHtml != ''){ ?>