Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the constructor for webfm_build_dir_list, an if-condition references an undefined variable, $webfm_root_path
:
if (webfm_check_path($path, $webfm_root_path)) {
$perm_flag = TRUE;
}
The resulting PHP warning is
Notice: Undefined variable: webfm_root_path in webfm_build_dir_list->webfm_build_dir_list() (line 2078 of sites/all/modules/webfm/webfm.module).
Comment | File | Size | Author |
---|---|---|---|
#1 | webfm.1038462.patch | 411 bytes | pillarsdotnet |
Comments
Comment #1
pillarsdotnet CreditAttribution: pillarsdotnet commentedPatch.
It should say
$root
instead of$webfm_root_path
.Comment #2
mshmsh5000 CreditAttribution: mshmsh5000 commentedSuper -- Looks great. Thank you.
Comment #3
mshmsh5000 CreditAttribution: mshmsh5000 commentedActually, this seems to cause all webfm_check_path() calls to return a blank string. Every AJAX directory listing call results in "invalid dir" now.
In any case, I don't see this change in 6.x-2.15. To get rid of the warning in the OP without breaking webfm_check_path(), I've added this in webfm_build_dir_list():
This check was always trivially succeeding; at least now it gets passed declared values.
Comment #4
nhck CreditAttribution: nhck commentedmshmsh5000, thank you for reporting this and helping to make webfm better. A fix has been commited to the dev version.
Comment #5
stephenplatz CreditAttribution: stephenplatz commentedThis may be a related issue, I'm not able to set role root directories. The directories are created, but each time the form is submitted with the appropriate values, it returns that Role root directory is not set.