WHMpress / ganon

Automatically exported from code.google.com/p/ganon
0 stars 0 forks source link

Not selecting by class properly #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What will reproduce the problem?

<?php
include 'ganon.php';

$html = '<html><head><body><div class="special-post">This is a special 
post</div></body></html>';
$dom = str_get_dom($html);
$special = $dom('.special');
echo $special[0]->getPlainText();

What is the expected output? What do you see instead?

Exception, $special[0] shouldn't be set because the document doesn't have any 
element with the class "special". I get the string "This is a special post" 
instead.

Which version are you using?
r78

Please provide any additional information below.

I am testing the library and I have found this big bug at the first test. I 
like the idea and the way that ganon works, I hope it will get a fix.

Thanks for your work

Original issue reported on code.google.com by marq...@gmail.com on 29 Oct 2012 at 12:24

GoogleCodeExporter commented 8 years ago
Thanks for reporting! Should be fixed in rev. #79.

Original comment by niels....@gmail.com on 11 Nov 2012 at 6:28