[FX.php List] Using FX.php in command-line scripts

Brion Vibber brion at pobox.com
Fri Sep 3 14:30:27 MDT 2004


I noticed that FX triggers an 'undefined index' notice when used from a 
script run on the command-line. This is harmless, but annoying when 
running with error_reporting set to E_ALL.

Quick fix is to change line 987 of FX.php (as of the August 30 release) 
from this:
   if ($HTTP_SERVER_VARS['REQUEST_METHOD'] == 'POST') {

to this:
   if (isset($HTTP_SERVER_VARS['REQUEST_METHOD'])
       && $HTTP_SERVER_VARS['REQUEST_METHOD'] == 'POST') {

-- brion vibber (brion @ pobox.com / vibber @ usc.edu)
www.scec.org -- Southern California Earthquake Center

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20040903/48c6f7d0/signature.bin


More information about the FX.php_List mailing list