Skip to content

Commit

Permalink
fix: strip_tags(): Passing null to parameter duzun#1 () of type strin…
Browse files Browse the repository at this point in the history
…g is deprecated
  • Loading branch information
elythi0n committed Jul 11, 2023
1 parent 32ba211 commit 7763a1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hQuery/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ public function outerHtml($id = null)
*/
public function text($id = null)
{
return html_entity_decode(strip_tags($this->html($id)), ENT_QUOTES); /* ??? */
$html = $this->html($id);
return !is_null($html) ? html_entity_decode(strip_tags($html), ENT_QUOTES) : ''; /* ??? */
}

/**
Expand Down

0 comments on commit 7763a1e

Please sign in to comment.