Skip to content

Commit

Permalink
fix Str::limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Smol-An committed Feb 2, 2024
1 parent 48be11b commit 07cee4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@

if (!empty($resBody)) {
$document = new Document($resBody);
$h1 = Str::limit(optional($document->first('h1'))->text(), 250, '(...)');
$title = Str::limit(optional($document->first('title'))->text(), 250, '(...)');
$h1 = Str::limit(optional($document->first('h1'))->text() ?? '', 250, '(...)');
$title = Str::limit(optional($document->first('title'))->text() ?? '', 250, '(...)');
$description = Str::limit(optional($document->first('meta[name="description"]'))
->getAttribute('content'), 250, '(...)');
->getAttribute('content') ?? '', 250, '(...)');
}

$newCheckQuery = 'INSERT INTO url_checks(
Expand Down

0 comments on commit 07cee4b

Please sign in to comment.