Title: Error When Uploading PDF
Last modified: August 21, 2016

---

# Error When Uploading PDF

 *  Resolved [TKPM](https://wordpress.org/support/users/tkpm/)
 * (@tkpm)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/)
 * Hi, I’m receiving the following error code when trying to upload pdf files:
 * Warning: in_array() expects parameter 2 to be array, null given in /home/content/
   24/10812624/html/wp-content/plugins/frontend-uploader/frontend-uploader.php on
   line 198
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/content/24/10812624/html/wp-content/plugins/frontend-uploader/frontend-
   uploader.php:198) in /home/content/24/10812624/html/wp-includes/pluggable.php
   on line 876
 * [http://wordpress.org/extend/plugins/frontend-uploader/](http://wordpress.org/extend/plugins/frontend-uploader/)

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/error-when-uploading-pdf/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/error-when-uploading-pdf/page/2/?output_format=md)

 *  Thread Starter [TKPM](https://wordpress.org/support/users/tkpm/)
 * (@tkpm)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3645951)
 * Sorry, forgot to mention I’m using Firefox 19.0.2
 *  Plugin Author [Rinat](https://wordpress.org/support/users/rinatkhaziev/)
 * (@rinatkhaziev)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3646051)
 * What version of Frontend Uploader do you use?
 *  Thread Starter [TKPM](https://wordpress.org/support/users/tkpm/)
 * (@tkpm)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3646053)
 * I’m on Version 0.5.
 *  Plugin Author [Rinat](https://wordpress.org/support/users/rinatkhaziev/)
 * (@rinatkhaziev)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3646080)
 * Hey I found the cause of this, Please download v0.5.1 that should take care of
   it:
    [http://wordpress.org/extend/plugins/frontend-uploader/](http://wordpress.org/extend/plugins/frontend-uploader/)
 *  Thread Starter [TKPM](https://wordpress.org/support/users/tkpm/)
 * (@tkpm)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3646088)
 * Great, thanks for the quick update!
 * The only other error is now when I try to upload the pdf, it says it’s not an
   allowed file type, even though I have .pdf checked under the Settings. Do also
   need to notate it under allowed categories?
 *  Plugin Author [Rinat](https://wordpress.org/support/users/rinatkhaziev/)
 * (@rinatkhaziev)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3646091)
 * No it should work as is,
 * However, with mime-types it sometimes can be difficult. Can you try to upload
   and doc or docx files and see if they go through?
 *  Plugin Author [Rinat](https://wordpress.org/support/users/rinatkhaziev/)
 * (@rinatkhaziev)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3646093)
 * Also, check the faq section, there’s some explanation why this might happen
 *  Thread Starter [TKPM](https://wordpress.org/support/users/tkpm/)
 * (@tkpm)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3646094)
 * I received the same error for the doc file. I’ll also check the faq section in
   the meantime.
 *  Thread Starter [TKPM](https://wordpress.org/support/users/tkpm/)
 * (@tkpm)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3646125)
 * As a test, I also tried a psd file and received the same error. Also, when I 
   tried updating the functions.php (using the Twenty Twelve theme) with the code
   from the faq, I received the following error:
 * Parse error: syntax error, unexpected T_STRING in /home/content/24/10812624/html/
   wp-content/themes/twentytwelve/functions.php on line 455
 *  Plugin Author [Rinat](https://wordpress.org/support/users/rinatkhaziev/)
 * (@rinatkhaziev)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3646127)
 * Oh example is missing trailing semicolon
 * `add_filter( 'fu_is_debug', '__return_true' );`
 * Try this and see what mime-type is causing troubles. Are you trying it locally
   or on the server?
 *  Thread Starter [TKPM](https://wordpress.org/support/users/tkpm/)
 * (@tkpm)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3646130)
 * Ok, I entered that from the Network Admin Dashboard. Odd thing is, whether or
   not I add a semicolon at the end, I still receive the syntax error. My apologies
   in advance, I’m not too familiar with php!
 *  Plugin Author [Rinat](https://wordpress.org/support/users/rinatkhaziev/)
 * (@rinatkhaziev)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3646133)
 * No worries!
 * Hmm, the corrected version is perfectly valid and should not produce parse errors.
   Can you post the surrounding lines of where you pasted it?
 *  Thread Starter [TKPM](https://wordpress.org/support/users/tkpm/)
 * (@tkpm)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3646138)
 * I pasted it at the very end of functions.php, right after
 * add_action( ‘customize_preview_init’, ‘twentytwelve_customize_preview_js’ );
 * Just tested another pdf and no dice.
 * Now here’s the crazy thing- whenever I try going into the site dashboard, even
   after I removed and reinstalled the Twenty Twelve theme, I keep getting that 
   Parse error.
 *  Plugin Author [Rinat](https://wordpress.org/support/users/rinatkhaziev/)
 * (@rinatkhaziev)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3646147)
 * That’s weird. It should either break everywhere (like it happened to you when
   you first trying pasting that line) or work everywhere. Try to delete the folder
   with twentytwelve and re-upload again.
 *  Thread Starter [TKPM](https://wordpress.org/support/users/tkpm/)
 * (@tkpm)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/#post-3646148)
 * Ok, I deleted the folder, re-uploaded, cleared cache on browser, logged out and
   logged back in, still getting error when trying to open site dashboard (I’m on
   a WPMU setup by the way). However, if I visit the site and click on Edit, I can
   still get into the dashboard from there, just not from the “Dashboard” link itself.
 * In regards to receiving errors when trying to upload the pdf and psd files, is
   there any other code (or a better place in functions.php) I should enter aside
   from
 * add_filter( ‘fu_allowed_mime_types’, ‘my_fu_allowed_mime_types’ );
 * ?

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/error-when-uploading-pdf/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/error-when-uploading-pdf/page/2/?output_format=md)

The topic ‘Error When Uploading PDF’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/frontend-uploader_81a69d.svg)
 * [Frontend Uploader](https://wordpress.org/plugins/frontend-uploader/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/frontend-uploader/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/frontend-uploader/)
 * [Active Topics](https://wordpress.org/support/plugin/frontend-uploader/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/frontend-uploader/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/frontend-uploader/reviews/)

## Tags

 * [pdf](https://wordpress.org/support/topic-tag/pdf/)
 * [upload](https://wordpress.org/support/topic-tag/upload/)

 * 21 replies
 * 2 participants
 * Last reply from: [Rinat](https://wordpress.org/support/users/rinatkhaziev/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/error-when-uploading-pdf/page/2/#post-3646238)
 * Status: resolved