File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,8 +122,14 @@ public function registerTypeArray(array $types): void {
122122 $ this ->mimetypes = array_merge ($ this ->mimetypes , $ types );
123123
124124 // Update the alternative mimetypes to avoid having to look them up each time.
125- foreach ($ this ->mimetypes as $ mimeType ) {
125+ foreach ($ this ->mimetypes as $ extension => $ mimeType ) {
126+ if (strpos ($ extension , '_comment ' ) === 0 ) {
127+ continue ;
128+ }
126129 $ this ->secureMimeTypes [$ mimeType [0 ]] = $ mimeType [1 ] ?? $ mimeType [0 ];
130+ if (isset ($ mimeType [1 ])) {
131+ $ this ->secureMimeTypes [$ mimeType [1 ]] = $ mimeType [1 ];
132+ }
127133 }
128134 }
129135
Original file line number Diff line number Diff line change 134134 "pdf" : [" application/pdf" ],
135135 "pfb" : [" application/x-font" ],
136136 "pef" : [" image/x-dcraw" ],
137- "php" : [" application/x-php" ],
137+ "php" : [" application/x-php" , " text/x-php " ],
138138 "pl" : [" application/x-perl" ],
139139 "pls" : [" audio/x-scpls" ],
140140 "png" : [" image/png" ],
You can’t perform that action at this time.
0 commit comments