• I’ve installed a WP 2.5.1 and everything works. Great, except when I go to use the Add Media button to upload a PDF file I get an error:

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/accuhipuk/public_html/cms/wp-includes/post.php on line 2456

    Warning: asort() expects parameter 1 to be array, null given in /home/accuhipuk/public_html/cms/wp-includes/post.php on line 913

    Warning: Invalid argument supplied for foreach() in /home/accuhipuk/public_html/cms/wp-includes/post.php on line 914

    I have no problem uploading image files like JPGs, but the problem is with PDFs. I’ve checked in my Uploads folder on the server and the files are actually there, but they don’t display in the Media Viewer (I just see the error message above), so I can’t add them to my posts.
    I can ftp the PDF files separately and link to the URL ok, but I’d like my client to be able to do all this from within the dashboard, if possible.
    Any one got any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Lots of people are having problems with the new uploader.

    This sticky post pertains more to images, but it is still a good place to start.

    Thread Starter nlamb75

    (@nlamb75)

    Thanks for that, jleuze.

    I read that post yesterday and followed all the instructions: reinstalled, upgraded flash player, changed .htaccess etc, all to no avail. I get exactly the same error.

    I checked on one of my older WP installations (a different website, but using the same server) and PDFs upload fine. Maybe I’ll just have to go back to version 2.1 (assuming I can still download it…)

    Found this plugin: https://www.ilfilosofo.com/blog/old-style-upload/
    which supposedly reverts to the old wordpress file uploading feature, but I was unable to get it to work; maybe it will work for you..

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can’t upload PDF files’ is closed to new replies.