Closed (fixed)
Project:
Secure Code Review
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
2 Sep 2011 at 20:16 UTC
Updated:
22 Apr 2016 at 13:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
solotandem commentedThis error occurs if enabling this module at same time as coder_upgrade. If the latter is previously enabled, then it does not occur. With this commit, enabling from drush and the modules page succeeds without errors.
Thanks for finding the bug.
Comment #2
gregglesAh, great. It seemed quite weird since I knew the same code had been working previously. Thanks, Jim.
Comment #4
netw3rker commentedI'm not sure that fixes the problem. it still makes the call to 'secure_code_review_directory_path()' and that still assumes no stream format ($stream_format=false) and that then attempts to call a function that doesn't exist in any modules or drupal api called "file_directory_path()".
the underlying problem that "file_directory_path()" doesn't exist needs to be remedied. it appears that in other modules that use this function, They all do an if(function_exists('file_directory_path')) first. this implies that that function is available from a contrib module somewhere. @solotandem, can you check your code base to see where that function is?
Thanks!
-Chris
Comment #5
solotandem commentedThe function file_directory_path() was defined in coder_upgrade, but has been renamed in the latest release to file_stream_path(). I have not updated this project to reflect that change, and in the short term, you could change the call in this project to use the new name.
Comment #6
markpavlitski commentedThis patch changes the name to file_stream_path() as per the coder_upgrade module and specifies a minimum dependency of coder_upgrade 7.x-1.1, which is the version that introduced the change.
Comment #7
matt v. commentedI was getting the same "…Call to undefined function file_directory_path() in secure_code_review/includes/utility.inc on line 24" error when trying to enable the module today. Applying the patch from comment #6 allowed me to proceed. Thanks markpavlitski!
Comment #8
dan_lennox commentedPatch in #6 resolved this issue for me also.
Comment #9
heathdutton commentedPatch in #6 works for us... It's been 2 years, can we get that comitted?
Comment #10
kenorb commented+1
Comment #12
solotandem commentedSee patch in #11.