[dev] Note: liberal use of @ in front of function calls ...

Chris chris@jeks.net
Sun Nov 24 15:03:35 2002


... just a quick note. There seems to be a fondness of putting '@' in front of
all the IMAP calls. This nobbles certain stuff on my installation.

e.g. in imp/lib/Message.php the code for copying messages:

if (!@imap_mail_copy($imp['stream'], $msgIdxs, $targetMbox, $imap_flags)) {
	$notification->push(sprintf($message, IMP::displayFolder($folder), IMP::displayFolder($targetMbox)) . ': ' . imap_last_error(), 'horde.error');
	$return_value = false;

The @imap_mail_copy suppresses the errors that would have been returned by
imap_last_error. With the @ on imap_mail_copy the function imap_last_error
returns nothing (when there's an error of course).

Was playing with quota reporting when I noticed this ...

If you delete the @ from imap_mail_copy you get the IMAP server message ...

I'm sure there are probably other calls like this hanging around.

 -chris

-- 
~ ~ ~
Chris Hyde

A mathematician is a blind man in a dark room looking for a black cat which
isn't there. (Charles R. Darwin)

~ ~ ~


More information about the dev mailing list