File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -120,8 +120,14 @@ public function registerTypeArray(array $types): void {
120120 $ this ->mimetypes = array_merge ($ this ->mimetypes , $ types );
121121
122122 // Update the alternative mimetypes to avoid having to look them up each time.
123- foreach ($ this ->mimetypes as $ mimeType ) {
123+ foreach ($ this ->mimetypes as $ extension => $ mimeType ) {
124+ if (strpos ($ extension , '_comment ' ) === 0 ) {
125+ continue ;
126+ }
124127 $ this ->secureMimeTypes [$ mimeType [0 ]] = $ mimeType [1 ] ?? $ mimeType [0 ];
128+ if (isset ($ mimeType [1 ])) {
129+ $ this ->secureMimeTypes [$ mimeType [1 ]] = $ mimeType [1 ];
130+ }
125131 }
126132 }
127133
Original file line number Diff line number Diff line change 132132 "pdf" : [" application/pdf" ],
133133 "pfb" : [" application/x-font" ],
134134 "pef" : [" image/x-dcraw" ],
135- "php" : [" application/x-php" ],
135+ "php" : [" application/x-php" , " text/x-php " ],
136136 "pl" : [" application/x-perl" ],
137137 "pls" : [" audio/x-scpls" ],
138138 "png" : [" image/png" ],
You can’t perform that action at this time.
0 commit comments