I'm getting a "Undefined index" notice on PHP 5.3 running a custom command:
WD php: Notice: Undefined index: drush_batch_process_finished in _drush_backend_batch_process() (line 39 of /opt/drush/commands/core/drupal/batch_6.inc).
Here's patch to fix that.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | drush-950378-14-4.5.patch | 654 bytes | maciej lukianski |
| #13 | drush-950378-13.patch | 662 bytes | pcambra |
| #10 | drush-950378.patch | 679 bytes | jonhattan |
| #8 | debug.txt | 24.9 KB | Tor Arne Thune |
| #7 | debug.txt | 24.9 KB | Tor Arne Thune |
Comments
Comment #1
moshe weitzman commentedLooks fine to me. I'll let Greg review and commit.
Comment #2
greg.1.anderson commentedCommitted a slight variant of the proposed patch.
Comment #4
Tor Arne Thune commentedStill getting this in Drush 4.4.
Comment #5
greg.1.anderson commentedThis was only fixed in 5.x-dev. It could be backported, though.
Comment #6
jonhattanIt was fixed only for batch_6.inc... but it seems to me it was not a proper fix.
$data['context']['drush_batch_process_finished']is not declared anywhere but used in that line. It seems a lapsus when coding this because what is done in other part isdrush_set_option('drush_batch_process_finished').Why it didn't produce a failure never? Perhaps checking for !$data is enough.
Comment #7
Tor Arne Thune commentedWhen I apply the patch in #6 to Drush 4.5-rc1, and run
drush upc --no-core -l example1.comit goes into an endless loop. See attachment for debug.Changing this to Major, as it completely leaves me without the drush upc functionality.
Comment #8
Tor Arne Thune commentedComment #9
jonhattanThe lapsus was from me in #6. drush_set_option('drush_batch_process_finished') is set in a backend process and obtained in the main project throught $data['context'].
fixed in master.
Comment #10
jonhattanComment #11
Tor Arne Thune commentedThe patch in #10 works great when applied to Drush 4.5-rc1 :) No longer an issue with this patch.
Comment #12
pcambrasuscribe
Comment #13
pcambraHere's the patch ported to 4.4 (modifying the batch_7.inc file)
Comment #14
maciej lukianski commentedI rerolled it for drush 4.5
Comment #15
moshe weitzman commentedCommitted to 4.x