Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
file system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Jun 2011 at 02:32 UTC
Updated:
29 Jul 2014 at 19:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pillarsdotnet commentedPatch to remove the untrue statement.
Comment #2
jhodgdonThe problem is bigger than just drupal_realpath(). I think we should fix it in the other file functions at the same time. For instance, file_copy has the same problem, which was reported here:
#1163402: file_copy doc says you can omit destination, but you can't
I'm marking that issue as a duplicate, because this one actually seems to have some action. Basically, we need to check all the functions that call drupal_realpath() and fix their doc too.
Comment #3
pillarsdotnet commentedOkay, this is not just a documentation problem, so changing component.
I searched through
includes/file.incfor the phrase "If this value is omitted, ... will be used, usually ...".The docs for the
file_unmanaged_copyfunction include this promise, and the function also contains code to implement the promised functionality. I used this example to modify other functions whose docs include the the promise but whose code lacks the implementation:file_copyfile_movedrupal_realpathSimilarly copied implementation code and documentation from
file_unmanaged_save_data()tofile_save_data(), correcting a slight grammar mistake along the way.It seems to me that these changes merely implement what was originally intended, so adding the "needs tests" tag and bumping to "major".
Marking CNR for bot; if a senior core developer agrees that this is the right approach, I will also write tests.
Comment #4
pillarsdotnet commentedComment #6
pillarsdotnet commentedAlternative patch only changes docs to match implemented functionality.
If requested, I can break this all up into nine separate issues.EDIT: See #8Comment #7
pillarsdotnet commentedCorrected patch from #3.
Comment #8
pillarsdotnet commentedAs requested by sun in IRC, broke this into nine separate issues, as follows:
file_copy()file_move()drupal_realpath()file_unmanaged_save_data()file_save_data()Comment #9
pillarsdotnet commentedComment #10
valthebaldAll subtasks are closed, marking fixed