scotteh/php-dom-wrapper

parent() returns symfony class and not dom-wrapper class

Closed this issue · 1 comments

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

Sorry. Cannot reproduce it again. Must have made an coding error. :-)