diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-15 16:55:35 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-15 16:55:35 +0000 |
commit | 84beb25884b2e45d245ba2d8367d6b1306cd27cb (patch) | |
tree | 64f4a61fd92ef923436d7bc67b766e5e2e040fdc /includes/form.inc | |
parent | 2e9bbda79198879adba89eda98e4a4867d9d3cd9 (diff) | |
download | brdo-84beb25884b2e45d245ba2d8367d6b1306cd27cb.tar.gz brdo-84beb25884b2e45d245ba2d8367d6b1306cd27cb.tar.bz2 |
- Patch #44771 by jvandyk: small performance improvement.
Diffstat (limited to 'includes/form.inc')
-rw-r--r-- | includes/form.inc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/includes/form.inc b/includes/form.inc index 174f68432..ea950cbca 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -409,15 +409,14 @@ function _form_sort($a, $b) { function _element_info($type, $refresh = null) { static $cache; - $parents = array(); $basic_defaults = array( '#description' => NULL, '#attributes' => array(), '#required' => FALSE, '#tree' => FALSE, - '#parents' => $parents + '#parents' => array() ); - if ($refresh || !isset($cache)) { + if (!isset($cache) || $refresh) { $cache = array(); foreach (module_implements('elements') as $module) { $elements = module_invoke($module, 'elements'); |