Make WordPress Core

Opened 19 years ago

Closed 17 years ago

#6699 closed defect (bug) (fixed)

get_temp_dir() should be more flexible

Reported by: RoyalKnight Owned by:
Priority: normal Milestone: 3.0
Component: Administration Version: 2.5
Severity: normal Keywords: has-patch early
Cc: Focuses:

Description

Currently this function returns "/tmp/" even if there's another way to get the correct temp-path. So you should extend this function with "ini_get('upload_tmp_dir')" before you return "/tmp/" as the last way out. Of course it's possible to set "WP_TEMP_DIR" in config-file, but why don't do it the automatic way?

Attachments (1)

6699.diff​ (451 bytes ) - added by Denis-de-Bernardy 17 years ago.

Download all attachments as: .zip

Change History (10)

#1 @DD32
19 years ago

  • Keywords needs-patch added
  • Milestone → 2.6

Setting to 2.6 as its a change which is needed, and while it does not yet have a patch, one will be along soon enough.

#2 @Denis-de-Bernardy
17 years ago

I'm pretty certain there's a dup of this one somewhere.

#4 @Denis-de-Bernardy
17 years ago

  • Keywords has-patch 2nd-opinion added; needs-patch removed

#5 @sirzooro
17 years ago

On Windows usually there is no /tmp/ dir. You should check TEMP and TMP environment variables - if they exists, use them instead of returning /tmp.

#6 @Denis-de-Bernardy
17 years ago

true, but even now that part of the function never gets used, as far as I can tell.

#7 @ryan
17 years ago

  • Milestone 2.9 → 3.0

Punting from 2.9 but marking for early 3.0 so we don't overlook this one again. Seems like a good fix.

#8 @dd32
17 years ago

  • Keywords early added; 2nd-opinion removed

#9 @automattor
17 years ago

  • Resolution → fixed
  • Status new → closed

(In [12519]) Check upload_tmp_dir ini settings for a usable temporary path. Props Denis-de-Bernardy. fixes #6699

Note: See TracTickets for help on using tickets.