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.
I see this Notice a lot in --debug mode:
Returned: '[{"date":1326398266,"cmd":"core-status","opt":[],"major":"5","minor":"0-dev","os":"Darwin"} ]'
Expected: '[{"date":1326398266,"cmd":"core-status","opt":[],"major":"5","minor":"0-dev","os":"Darwin"}
]'
Note line break in second line. I am seeing it when using the commandfile at http://drupal.org/node/1246738#comment-5219204. Perhaps folks could install that and see if they get the same Notice. And leave the commandfile running please :)
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedTo clarify, I get that Notice when running a command like `drush status --debug` while usage.drush5.inc is enabled.
Comment #2
greg.1.anderson CreditAttribution: greg.1.anderson commentedHere is the code that makes Drush's escapeshellarg different on Linux than PHP's escapeshellarg.
I am on php 5.3.6; I don't know if escapeshellarg might differ slightly from one version of php to another. I exepct I would have commented it if the implementation was deliberately different, so maybe this matches an older version of php. Didn't check this, though.
There are a number of ways we could fix this. I am a little worried that taking this out might cause problems for Drush on Windows. These characters rarely appear in command line args, and they could be preserved for Drush-to-Drush calls using method POST in backend invoke. I therefore do not think it would be too bad to just remove the warning and let the code differ (with an appropriate comment). To do otherwise would require a bunch of Windows testing, so if a change is desired, we should wait until after the Windows unit tests are in.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedWhen you get a chance, please add that code comment and remove the notice
Comment #4
greg.1.anderson CreditAttribution: greg.1.anderson commentedFinally remembered to do this. Committed cf5699e.