Issue #2195439 by chertzog & ergonlogic: Fix D7 undefined indexes, etc.
Issue #2195439 by chertzog & ergonlogic: Fix D7 functions.