summaryrefslogtreecommitdiff
path: root/includes/form.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-11-17 04:10:52 +0000
committerDries Buytaert <dries@buytaert.net>2010-11-17 04:10:52 +0000
commit3e1b4793a205f5ee44ab03395a9379ad22a80cb5 (patch)
treefe9b2adbf78efef2c4ff2c54db3e4a67560f822c /includes/form.inc
parentead244e09ff7751a03e8cefbab3e77e69b7117c0 (diff)
downloadbrdo-3e1b4793a205f5ee44ab03395a9379ad22a80cb5.tar.gz
brdo-3e1b4793a205f5ee44ab03395a9379ad22a80cb5.tar.bz2
- Patch #953914 by chx, yched, pifantastic: #limit_validation_errors() fails is parents array contains numeric indexes.
Diffstat (limited to 'includes/form.inc')
-rw-r--r--includes/form.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/form.inc b/includes/form.inc
index 02f82725e..fe98eaee1 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -1449,7 +1449,7 @@ function form_set_error($name = NULL, $message = '', $limit_validation_errors =
// so errors for this element must be recorded. As the exploded array
// will all be strings, we need to cast every value of the section
// array to string.
- if (explode('][', $name, count($section)) === array_map('strval', $section)) {
+ if (array_slice(explode('][', $name), 0, count($section)) === array_map('strval', $section)) {
$record = TRUE;
break;
}