Changeset 1537

Show
Ignore:
Timestamp:
03/01/08 23:07:18 (2 months ago)
Author:
Neal
Message:

Fixed an issue where extension authors couldn't add parameters to their URLs which lacked an explicit value (eg: script.php?foo).
Fixed a bug where $_GET and $_REQUEST could improperly return different values after rewriting.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/punbb-1.3-dev/upload/rewrite.php

    r1375 r1537  
    6565                                $param_data = explode('=', $cur_param); 
    6666 
    67                                 if (!isset($_REQUEST[$param_data[0]])) 
     67                                // Sometimes, parameters don't set a value (eg: script.php?foo), so we set them to null 
     68                                $param_data[1] = isset($param_data[1]) ? $param_data[1] : null; 
     69 
     70                                // We don't want to be overwriting values in $_REQUEST that were set in POST or COOKIE 
     71                                if (!isset($_POST[$param_data[0]]) && !isset($_COOKIE[$param_data[0]])) 
    6872                                        $_REQUEST[$param_data[0]] = urldecode($param_data[1]); 
    6973