[phpa] Accelerator uncovered SquirrelMail error

  • From: "PHP Accelerator" <php_accelerator@xxxxxxxxxxx>
  • To: phpa@xxxxxxxxxxxxx
  • Date: Fri, 14 Sep 2001 00:13:08 +0100

This latest issue with the Accelerator actually shows up a mistake in the
SquirrelMail program or the libraries that it uses.

The include guard at the start a file such as i18n.php looks like:

if (defined ('i18n_php')) {
      return;
} else {
     define ('i18n_php', true);
}

and this in itself will be fine to prevent the rest of the file from
executing and having any subsequent functions defined - unless you use
PHPA
just now that is :-)

But in mime.php there is the following code:

if (!isset($i18n_php))
      include "../functions/i18n.php";

and this doesn't do what was intended because i18n_php is *not* a
variable
but a constant, and therefore not set by the define. So i18n.php is
always
included here, even if it's been included before. It is the include guard
at
the top of i18n.php that prevents this from failing. Instead the include
line in mime.php should read

if (!defined(i18n_php))
   include '../functions/i18n.php';

Fixing this slip and the other isset tests after it should let
SquirrelMail
go further when using the accelerator.

Nick

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

------------------------------------------------------------------------
  www.php-accelerator.co.uk           Home of the free PHP Accelerator

To post, send email to phpa@xxxxxxxxxxxxx
To unsubscribe, email phpa-request@xxxxxxxxxxxxx with subject unsubscribe


Other related posts:

  • » [phpa] Accelerator uncovered SquirrelMail error