I'm working with a guestbook-with-photos script (lazarusgb) and I don't know how to make it require an attachment. I believe this is the relevant code:

Code:
if (!empty($this->user_img))
  {
      $this->image_file = trim($this->user_img);
   }
All the other dialogue-box-error-popups are called by code like this:
Code:
    return $this->db->gb_error($this->db->LANG['ErrorPost7']);
so I tried
Code:
if (!empty($this->user_img))
  {
      return $this->db->gb_error($this->db->LANG['ErrorPost7']);
   }

but it had no effect.

How can I cause an error message when there is no attachment?

Thanks.
Eric