Fix cron and fix PHP warning - refs BT#8566