I get this error when deleting non-bee content

Notice: Trying to access array offset on value of type null in bee_node_delete() (line 455 of modules/contrib/bee/bee.module).
bee_node_delete(Object)
call_user_func_array('bee_node_delete', Array) (Line: 403)

I fixed it by adding is_array($bee_settings) in the if statement in line 455

Unfortunately I do not have time to create a patch right now sorry

CommentFileSizeAuthor
#2 3194023-2.patch746 bytesnixou

Comments

styrbaek created an issue. See original summary.

nixou’s picture

StatusFileSize
new746 bytes
nixou’s picture

Status: Active » Needs review
afagioli’s picture

Status: Needs review » Needs work
afagioli’s picture

Status: Needs work » Needs review

Fixed with

if (!empty($bee_settings['bookable_type']) && $node->hasField('field_availability_' . $bee_settings['bookable_type'])) {
    if ($bat_unit = $node->get('field_availability_' . $bee_settings['bookable_type'])->entity) {
      bat_unit_delete($bat_unit);
    }
   ...
  }

Thanks for contributing

afagioli’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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