drush error - how to apply patch? When I try to update modules or clear cache with drush on my local dev machine (Mac OSX) I get the following four times at the beginning of the command result, and it fails.


  Invalid argument supplied for foreach() pm.drush.inc:584


My sites are D7, and the drush version is 6.0-beta1.  I can't find what the latest version is anywhere.  Is this it?

I looked on drupal.org and found a patch here: https://drupal.org/node/2041875

But I don't know how to apply a patch to drush. Can anyone point me to that information or tell me how to do it?
Drupal has a wealth of community documentation related to this:


Patch guide
Applying patches
Applying patches manually


However, for your first problem. Drush is pretty much version independant. If you have the latest version of drush it will work with drupal 7, 8 and most likely 6.

Finally, the issue you linked also mention that it's been fixed in the latest version of drush as well.