Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
core Upload class - bug correction
  • Hi everyone,
    today i ran into a really weird trouble uploading a file, the core upload class bugged on line 377, as it couldn't retreive the second part of the mimetype (probably coming from the file i was uploading, but still could be annoying) so i made a quick fix for it and i thought i could share it :).

    https://gist.github.com/DimitriGilbert/5114297

  • HarroHarro
    Accepted Answer
    Can you exactly say what the problem was? 1.6 will use the new upload library written for 2.0, I want to make sure it doesn't have the same issue.
  • The exact error was this one :

    ErrorException [ Notice ]: Undefined offset: 1

    COREPATH/classes/upload.php @ line 377

    As i said previously, i think the file i tried to upload was somehow corrupted and that the mimetype wasn't complete. Though it's working perfectly in word (it's a .doc file).

    hope it helped


  • Could you tell me what the detected mimetype was? And on which server platform you've encountered it (OS and webserver)?

    The new 2.0 package (which will be used in 1.6+) will check if the mimetype has the correct format, and if not will default to "application/octet-stream".

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion