Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
upload.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2008 at 00:32 UTC
Updated:
5 Jul 2011 at 16:02 UTC
PHP Fatal error: Cannot use string offset as an array in .../upload.module on line 615
Adding something into upload_js() such as:
if (!isset($_POST['form_build_id'])) exit;
should do the trick
Comments
Comment #1
mfbI've also been getting the PHP Fatal error: Cannot use string offset as an array in modules/upload/upload.module on line 615 in my logs.
You don't just have to access the callback directly. Another way it happens is if you "Clear cached data" at admin/settings/performance while someone is uploading files. The cache this callback is loading has unexpectedly disappeared and it craps out with the fatal error.
IMO "clearing cached data" should not cause a fatal error or a destructive disruption to users who are in the midst of using a form.
If there's no work-around then there should be some warning for admins about issues their users could have if the button is clicked.
Comment #2
dpearcefl commentedDoes this issue exist in current D6?
Comment #3
mfbAs far as I know, the fatal error was resolved by security fixes in Drupal 6.4: http://drupalcode.org/project/drupal.git/commit/49f719f7c4f7c1b69dc35ff8...