File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,11 @@ public function guessExtension(): ?string
134134 */
135135 public function getMimeType (): string
136136 {
137+ if (! function_exists ('finfo_open ' ))
138+ {
139+ return $ this ->originalMimeType ?? 'application/octet-stream ' ;
140+ }
141+
137142 $ finfo = finfo_open (FILEINFO_MIME_TYPE );
138143 $ mimeType = finfo_file ($ finfo , $ this ->getRealPath ());
139144 finfo_close ($ finfo );
Original file line number Diff line number Diff line change 11<?php
2-
3-
42/**
53 * CodeIgniter
64 *
@@ -107,7 +105,7 @@ public function attachHoneypot(ResponseInterface $response)
107105 $ prep_field = $ this ->prepareTemplate ($ this ->config ->template );
108106
109107 $ body = $ response ->getBody ();
110- $ body = str_ireplace ('</form> ' , $ prep_field , $ body );
108+ $ body = str_ireplace ('</form> ' , $ prep_field . ' </form> ' , $ body );
111109 $ response ->setBody ($ body );
112110 }
113111
You can’t perform that action at this time.
0 commit comments