[dev] Re: [cvs] commit: horde/lib/MIME Message.php imp/lib IMP.php Message.php imp compose.php message.php pgp.php view.php

Roman Neuhauser cynic@mail.cz
Sun, 26 May 2002 00:03:55 +0200


> Date: Mon, 20 May 2002 17:50:42 -0400
> From: Chuck Hagenbuch <chuck@horde.org>
> To: dev@lists.horde.org
> Subject: [dev] 
>  Re: [cvs]  commit: horde/lib/MIME Message.php imp/lib IMP.php Message.php
> 	imp         compose.php message.php pgp.php view.php
> 
> Quoting Michael M Slusarz <slusarz@bigworm.colorado.edu>:
> 
> >   Moved some of the MIME Part/Message parsing stuff to the IMP_Message
> > class.
> 
> I'm not caught up enough yet to check this against the current code, but in
> this commit, I noticed at least one of these:
> 
> +            require_once IMP_BASE . '/lib/Message.php';
> 
> >>From CODING_STANDARDS:
> 
> If you are dynamically including a filename, or want the code to only
> be used conditionally (an optional template), use include.
> 
> The above code was inside a conditional or in a function, and so you
> shouldn't use require.

    chuck, I think you missed the change in require/include
    implementation. http://www.php.net/require:

    require() and include() are identical in every way except how they
    handle failure.  include() produces a Warning while require()
    results in a Fatal Error. In other words, don't hesitate to use
    require() if you want a missing file to halt processing of the page.

    or is there something else I'm missing?

-- 
FreeBSD 4.4-STABLE
12:00AM up 9 days, 11:20, 8 users, load averages: 0.12, 0.03, 0.01