By newbstah on
Hi There,
Have a giant switch statement that I won't bore you with here. One of the cases I'd like to not return anything. I'm wondering if Drupal has a preferred method for doing this.
Right now I have something like:
<?php
if (blah blah) {
return ''; // <-- that's two single quotes with nothing inside
}
?>
Are there other options available that are Drupal specific or better? Are there different situations where you'd want to do one and not the other?
Thanks!
Comments
Well technically you are
Well technically you are returning an empty string. If you really want to return nothing simple use
return;. If you want to return null usereturn NULL;Thanks! I appreciate this.
Thanks! I appreciate this. It seemed like a silly question but it had me going for a while.