Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions lib/request/sfWebRequest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,11 @@ static public function convertFileInformation(array $taintedFiles)
*/
static protected function fixPhpFilesArray(array $data)
{
$fileKeys = array('error', 'name', 'size', 'tmp_name', 'type');
if (version_compare(PHP_VERSION, '8.1.0-dev', '<')) {
$fileKeys = array('error', 'name', 'size', 'tmp_name', 'type');
} else {
$fileKeys = array('error', 'full_path', 'name', 'size', 'tmp_name', 'type');
}
$keys = array_keys($data);
sort($keys);

Expand All @@ -889,11 +893,12 @@ static protected function fixPhpFilesArray(array $data)
foreach (array_keys($data['name']) as $key)
{
$files[$key] = self::fixPhpFilesArray(array(
'error' => $data['error'][$key],
'name' => $data['name'][$key],
'type' => $data['type'][$key],
'tmp_name' => $data['tmp_name'][$key],
'size' => $data['size'][$key],
'error' => $data['error'][$key],
'full_path' => $data['full_path'][$key],
'name' => $data['name'][$key],
'type' => $data['type'][$key],
'tmp_name' => $data['tmp_name'][$key],
'size' => $data['size'][$key],
));
}

Expand Down