I have the following method where it is suppose to get the first image that is displayed from the content.
public function FirstImage($content)
{
$dom = new DOMDocument();
$dom->loadHTML($content);
Debug::dump($content);
}
The wierd thing is when i do $dom->loadHTML I get the following error Empty string supplied as input, but as soon as I dump it I do get the correct data. How can I fix this problem ?
I also done $this->owner->Content which has the same thing.