parent() returns symfony class and not dom-wrapper class
Closed this issue · 1 comments
Pilsgaard commented
Hi, thanks for some great code!.
I found an error. The parent() function does not return the correct class.
First example makes an error
foreach($doc->find('img') as $img){
$img->parent()->children();
}
Second one works
foreach($doc->find('img') as $img){
$img->parents()->first()->children();
}
Regards,
Casper
Pilsgaard commented
Sorry. Cannot reproduce it again. Must have made an coding error. :-)