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.
if (...)
is invalid in
/**
* Adjust the location that a project should be downloaded to.
*/
function hook_drush_pm_adjust_download_destination(&$project, $release) {
if (...) {
$project['project_install_location'] = '/path/to/install/to/' . basename($project['full_project_path']);
}
}
I know that this code is never executed, but an IDE like eclipse will still scan all the files that it recognizes as PHP files, and it reports all syntax errors that it finds.
This is an on-going irritation. Something like if ($some_condition)
would work fine.
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedcommitted your suggestion.
Comment #2
salvisThanks!