civicrm/civicrm-core — pull request #753 by pratik-joshi (2013-05-15 09:17:15+00:00)
Title: CRM-12570 fix

The issue was the 'for .. in' loop was wrongly executing variables (defined in mootools-core.js which was loaded by joomla CMS) although 'CRM.validate.functions' array (being looped) didn't had assignments of these variables, thus a TypeError of this is not a function was thrown.

Followed the suggestions given by coleman on CRM-12570 comments, and used JQuery's .each method, this rightly only takes up values defined in array thats being looped. Also there is no need to use an additional condition inside the '.each' method looping.