Menu

#35 mail_fwd trashes $save_local_enabled (fix included)

open
nobody
None
5
2007-05-20
2007-05-20
No

I was getting the symptom of $save_local_enabled disappearing in mail_fwd 1.4.0. PHP's register_globals was On (yes I know this is a Bad Thing, but it was set and I haven't researched if any other scripts would be affected).

I tracked the problem to the file

plugins/mail_fwd/mail_fwd_opt.php

The fix was to change the following (line 19):

include_once(SM_PATH . plugins/mail_fwd/functions.php');
if (file_exists(SM_PATH . 'include/validate.php'))
include_once(SM_PATH . 'include/validate.php');
else if (file_exists(SM_PATH . 'src/validate.php'))
include_once(SM_PATH . 'src/validate.php');

to

if (file_exists(SM_PATH . 'include/validate.php'))
include_once(SM_PATH . 'include/validate.php');
else if (file_exists(SM_PATH . 'src/validate.php'))
include_once(SM_PATH . 'src/validate.php');
include_once(SM_PATH . plugins/mail_fwd/functions.php');

that is. move functions to *after* the load of validate.

Validate itself does say that it should be loaded before anything else.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB