Index: branches/5.1.x/units/orders/orders_event_handler.php =================================================================== diff -u -N -r13930 -r13933 --- branches/5.1.x/units/orders/orders_event_handler.php (.../orders_event_handler.php) (revision 13930) +++ branches/5.1.x/units/orders/orders_event_handler.php (.../orders_event_handler.php) (revision 13933) @@ -1,6 +1,6 @@ Conn->Query($sql); } + if ( !is_object($event->MasterEvent) ) { + // not called as hook + return ; + } + $pre_expiration = adodb_mktime() + $this->Application->ConfigValue('User_MembershipExpirationReminder') * 3600 * 24; $to_charge = $this->getRecurringOrders($pre_expiration);