Skip to content

Commit

Permalink
Code Review: Remove unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
theodesp committed Jan 2, 2024
1 parent 182d336 commit 97e627a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions includes/Utilities/DomHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,10 @@ public static function parseText( $html, $selector ) {
* @return \DOMElement[]|\DOMElement
*/
public static function findNodes( $html, $selector = null ) {
$value = null;
// Bail early if there's no html to parse.
if ( empty( trim( $html ) ) ) {
return $value;
return null;
}

$doc = new Document( $html );
// <html><body>$html</body></html>
$elem = $doc->find( '*' )[2];
Expand Down

0 comments on commit 97e627a

Please sign in to comment.