Skip to content

Commit ef3f44d

Browse files
committed
Handle PHP 8.1 new $_FILES[full_path] array member
1 parent 10b64cc commit ef3f44d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/request/sfWebRequest.class.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,11 @@ static public function convertFileInformation(array $taintedFiles)
872872
*/
873873
static protected function fixPhpFilesArray(array $data)
874874
{
875-
$fileKeys = array('error', 'name', 'size', 'tmp_name', 'type');
875+
if (version_compare(PHP_VERSION, '8.1.0-dev', '<')) {
876+
$fileKeys = array('error', 'name', 'size', 'tmp_name', 'type');
877+
} else {
878+
$fileKeys = array('error', 'full_path', 'name', 'size', 'tmp_name', 'type');
879+
}
876880
$keys = array_keys($data);
877881
sort($keys);
878882

0 commit comments

Comments
 (0)