[dev] Re: [cvs] commit: imp mailbox.php imp/lib
Mailbox.php Message.php
Jon Parise
jon at horde.org
Tue Jun 17 13:56:54 PDT 2003
On Tue, Jun 17, 2003 at 12:58:32PM -0600, Michael M Slusarz wrote:
> Counterpoint: if there is a typo, you will immediately see that what you are
> trying to accomplish is not being done, and one of the first checks in
> debugging (at least, what I would check first) is that the requested
> actionID is even being reached. So the extra step in debugging doesn't
> seem to me to be a strong enough reason to not using the string IDs.
Right. Use a 'default' case to catch mispellings:
switch (strtolower($action)) {
case 'delete':
...
break;
case 'reply':
...
break;
default:
error('Unknown action!');
break;
}
--
Jon Parise (jon at horde.org) :: The Horde Project (http://horde.org/)
More information about the dev
mailing list