there is empty variable $conflict->{$field} when you use more then one resource conflict contents, or maybe it depends on my module configuration

patch:

        foreach($fields as $field) {
          foreach($node->{$field} as $instance) {
            foreach ($overlap_nodes as $conflict) {
			  
			  // my code :) don't ask me why ;))
			  if (empty($conflict->{$field})) { continue; }
			  
              foreach($conflict->{$field} as $conflict_instance) {
                if ($instance['nid'] == $conflict_instance['nid']) {
                  $booked_resource = node_load($instance['nid']);
                  form_set_error('Resource Conflict', 
                    t('There is a resource conflict. "%resource" is currently booked. Please choose a different time or a different resource.',
                      array('%resource' => $booked_resource->title)));
                }
              }
            }
          }
        }

Comments

deviantintegral’s picture

Status: Active » Postponed (maintainer needs more info)

Did you have this problem on your testing site as well? Anyone else having this issue?

Thanks,
--Andrew

gnucifer’s picture

I have this problem aswell, as you say the problem should arise when other event-enabled contenttypes are missing the same node reference field as in the current node. Thanks for the patch by the way!

deviantintegral’s picture

Status: Postponed (maintainer needs more info) » Fixed

I've committed this in CVS 124098 to the -dev version. In the future, be sure to follow the patching guidelines for drupal.

Thanks!
--Andrew

Anonymous’s picture

Status: Fixed » Closed (fixed)

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