Skip to content

Commit

Permalink
text content and ?->
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-xz committed Jul 5, 2024
1 parent 59def5d commit 15a0ad0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Urls/Analyze.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ private function getStatusAndBody(UrlCheck $url): void
private function getParams(UrlCheck $url): void
{
$document = new Document($url->getHtmlBody());
$h1 = $document->first('h1')?->getNode()->textContent;
$title = $document->first('title')?->getNode()->textContent;
$h1 = $document->first('h1')?->getNode()?->textContent;
$title = $document->first('title')?->getNode()?->textContent;
$description = $document->first('meta[name=description]')?->getAttribute('content');
$url->setH1($h1);
$url->setTitle($title);
Expand Down

0 comments on commit 15a0ad0

Please sign in to comment.