I get this error when trying to enable the latest version of the module.

Comments

solotandem’s picture

Assigned: Unassigned » solotandem
Status: Active » Fixed

This 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.

greggles’s picture

Ah, great. It seemed quite weird since I knew the same code had been working previously. Thanks, Jim.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

netw3rker’s picture

Status: Closed (fixed) » Active

I'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

solotandem’s picture

The 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.

markpavlitski’s picture

Status: Active » Needs review
StatusFileSize
new1010 bytes

This 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.

matt v.’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

I 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!

dan_lennox’s picture

Patch in #6 resolved this issue for me also.

heathdutton’s picture

Patch in #6 works for us... It's been 2 years, can we get that comitted?

kenorb’s picture

+1

  • solotandem committed 8dd851a on 7.x-1.x
    Issue #1268170: Change call from file_directory_path to file_stream_path...
solotandem’s picture

Status: Reviewed & tested by the community » Fixed

See patch in #11.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.