Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-12085

request_var and $request->variable always return empty array

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Major Major
    • 3.1.0-a3
    • 3.1.0-a2
    • Extensions
    • None

      Given the post array:

      $_POST['varname']['1'] = 'val1';
      $_POST['varname']['2'] = 'val2';
      $_POST['varname']['3'] = 'val3';

      When trying to get the values out of the array $_POST['varname'] you can use either request_var('temp_ary', array()) (deprecated) or create an instance of the new $request class and use the $request->variable('varname', array());

      In both cases an empty array is always returned.

      If i use $request->variable('varname', array('1'=>'') the posted array is correctly returned.

            nickvergessen Joas Schilling
            ..::Frans::.. ..::Frans::.. [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: