A worker erroneously Checked in a number of overdue items. The system doesn't allow to change status to checked out if the date is older that today and when I tried to revert in back to a previous revision it through this error:
warning: Invalid argument supplied for foreach() in /var/www/mc/sites/all/modules/merci/merci.module on line 2209.

It also broke the connection to the items that had been checked out. Can still view which items are connected to it by viewing the the last revision prior to trying to revert the reservation.

Comments

iPeat’s picture

Line 2209 looks like it is the for each for connected items, So this is breaking because it can't see the linked items. Which means the real error probably occurs earlier on whenever the connection to the items are lost.

darrick’s picture

I'm able to repeat this. So, I'll fix it soon when I get a chance. We're close to rolling a new release so the fix will be a part of that. I doubt reverting revisions was ever fully tested.

As for changing status to checked out for reservations which have past. This is by design. My co-workers have had the same issue. For overdue reservations I tell them either get the stuff back ASAP or else change the due back date to when you know you'll get it back.

darrick’s picture

Status: Active » Needs review

I commited a fix for this issue:

http://drupal.org/cvs?commit=488892

darrick’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.