Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Peccatte <hugues.peccatte@gmail.com>2014-06-19 23:42:59 +0400
committerHugues Peccatte <hugues.peccatte@gmail.com>2014-06-19 23:42:59 +0400
commit40def1a7a2057450fbfda42eaab4b72296845765 (patch)
tree0f89ae584886a8219d22355e6932d871d211601d /js/config.js
parentee412e6cdb2579f42381324e14aa8a294ce170d1 (diff)
Fix 'function declaration in loop' scrutinizer errors.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
Diffstat (limited to 'js/config.js')
-rw-r--r--js/config.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/config.js b/js/config.js
index 6c7e7bb5e1..d6afdf1ab0 100644
--- a/js/config.js
+++ b/js/config.js
@@ -331,6 +331,10 @@ function getFieldValidators(field_id, onKeyUpOnly)
*/
function displayErrors(error_list)
{
+ var tempIsEmpty = function (item) {
+ return item !== '';
+ };
+
for (var field_id in error_list) {
var errors = error_list[field_id];
var field = $('#' + field_id);
@@ -343,9 +347,7 @@ function displayErrors(error_list)
}
// remove empty errors (used to clear error list)
- errors = $.grep(errors, function (item) {
- return item !== '';
- });
+ errors = $.grep(errors, tempIsEmpty);
// CSS error class
if (!isFieldset) {