Hi Marc
On Wed, 04 Jan 2006 13:33:40 -0500 Marc Delisle Marc.Delisle@cegepsherbrooke.qc.ca wrote:
here is what I did in tbl_change.php:
/**
- Sets global variables.
- Here it's better to use a if, instead of the '?' operator
- to avoid setting a variable to '' when it's not present in $_REQUEST
*/ if (isset($_REQUEST['pos'])) { $pos = $_REQUEST['pos']; } if (isset($_REQUEST['session_max_rows'])) { $session_max_rows = $_REQUEST['session_max_rows']; } if (isset($_REQUEST['disp_direction'])) { $disp_direction = $_REQUEST['disp_direction']; } if (isset($_REQUEST['repeat_cells'])) { $repeat_cells = $_REQUEST['repeat_cells']; } if (isset($_REQUEST['dontlimitchars'])) { $dontlimitchars = $_REQUEST['dontlimitchars']; } if (isset($_REQUEST['primary_key'])) { $primary_key = $_REQUEST['primary_key']; } if (isset($_REQUEST['sql_query'])) { $sql_query = $_REQUEST['sql_query']; }
I had to get variables from $_REQUEST to fix bug #1381856.
I think we'll have to do this everywhere, to avoid getting "undefined variable" errors when fetching something that might not be present in $_REQUEST.
Comments?
Looks okay to me.