Needs review
Project:
Site Audit
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Mar 2016 at 18:16 UTC
Updated:
5 Jun 2018 at 18:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
greg boggsThe issue is that this:
$drupal_root = drush_get_context('DRUSH_SELECTED_DRUPAL_ROOT');
returns an array.
So, I suspect a likely fix is to downgrade your version of drush until site_audit supports the latest drush.
Comment #3
fluxsauce commentedThanks for the bug report and the context, I'll hold off making changes until Drush 9 is stable.
Comment #4
hussainwebI understand this happened with Drush 9 but we can handle this for lower Drush versions as well. I tested this since Drush 7 and the constant 'DRUSH_DRUPAL_ROOT' returns the same thing. The attached patch changes the constant in all the locations I found this used. I tested this on a site with Drush 9 and Drush 8.1.2 and both generate the same report.
In any case, I think the error should be handled in a better way. If you want to support previous versions of Drush (which may be supported by this patch but I couldn't test), then we can just test for both constants and check if
$handleis valid (we should be doing that anyway). Thoughts please?Comment #5
ccjjmartin commentedI can confirm that this patch applied to the latest D7 branch fixed the error. I also agree that an infinite loop isn't the best way to handle this. It appears that $drupal_root is empty when it fails. We could try adding something like this right after the declaration of $drupal_root. I haven't dug into the site audit code too much so returning the info constant might not be the best way to handle this.
I was using Drupal 7.44, DrupalVM Running 4.2.0-42-generic GNU/Linux, Drush 9.0-dev
Comment #6
jrglasgow commentedNow that Drush 9 is stable what is the status of getting this to work?
Comment #7
greg.1.anderson commentedDrush 9 has a new extension API that is not compatible with the Drush 8 extension API. The extension must be ported to the new API to be used with Drush 9.
Comment #8
greg.1.anderson commentedLooks like this is being discussed in https://www.drupal.org/project/site_audit/issues/2968983.