Sorry typo in the script:
I output the collected contents - which contain the header tag:
echo $image_data;
$edit = true;
ob_start();
// (has headers in this class)
$image->create();
$image_data = ob_get_contents();
ob_end_clean();
if (!$edit){
// Output the image:
echo ($image_data);
}else{
// Do something ;
echo('hi');
}
If I try to output Hi it errors as its processed the headers set by image_create.
Any ideas how to stop them ?