How one can deal with warnings in Drupal? If the code is getting executed smoothly, then what's the purpose of these warnings? Is there any way to deal with drupal "warnings", "notices".
one example here is: I have written hook_uninstall
function hook_uninstall(){
if (field_info_field('hide_field')) {
field_cache_clear();
field_delete_instance('hide_field');
field_delete_field('hide_field');
}
}
and this code is throwing warning:
Warning: Illegal string offset 'field_name' in field_delete_instance() (line 772 of modules/field/field.crud.inc).
Warning: Illegal string offset 'entity_type' in field_delete_instance() (line 773 of modules/field/field.crud.inc).
Warning: Illegal string offset 'bundle' in field_delete_instance() (line 774 of /modules/field/field.crud.inc).
Warning: Illegal string offset 'field_name' in field_delete_instance() (line 781 of modules/field/field.crud.inc).
Warning: Illegal string offset 'field_name' in image_field_delete_instance() (line 480 of /modules/image/image.module).
and there is no halt in the execution of the code. I'm very much curious about how drupal deals with exceptions, warnings, notices.
What does these warnings mean?
And can we contribute our module to drupal community if warnings or notices exits in module?
Can anyone share their piece of knowledge here?