diff --git a/phpQuery/phpQuery/phpQueryObject.php b/phpQuery/phpQuery/phpQueryObject.php index c421cdf..202f088 100644 --- a/phpQuery/phpQuery/phpQueryObject.php +++ b/phpQuery/phpQuery/phpQueryObject.php @@ -919,7 +919,7 @@ protected function pseudoClasses($class) { $text = trim($args, "\"'"); $stack = array(); foreach($this->elements as $node) { - if (mb_stripos($node->textContent, $text) === false) + if (($text) && (mb_stripos($node->textContent, $text) === false)) continue; $stack[] = $node; }