Was creating a multistage batch job, and trying to work out why it wouldn't report that one of the earlier stages had failed.
In the includes/batch.inc file, line 206 is as follows
while (empty($current_set['operations']) && ($current_set['success'] = TRUE) && _batch_next_set()) {
should it be
while (empty($current_set['operations']) && ($current_set['success'] == TRUE) && _batch_next_set()) {
ie current set success is compared to TRUE rather than being assigned TRUE as a value?
(apologies if this is a duplicate, couldn't find it in the existing bug search)