Fixed more generic array handling #2
authorRoland Häder <roland@mxchange.org>
Fri, 28 Jun 2013 22:07:44 +0000 (22:07 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 28 Jun 2013 22:07:44 +0000 (22:07 +0000)
inc/classes/main/criteria/class_BaseCriteria.php

index 7ba2ea57aafe807744615af8b016f8774a5bfa06..78a4e828a110545be024e77829791ead0633dfbc 100644 (file)
@@ -293,7 +293,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                        $key = $this->convertDashesToUnderscores($key);
 
                        // Then walk through all search criteria
                        $key = $this->convertDashesToUnderscores($key);
 
                        // Then walk through all search criteria
-                       foreach ($this->getGenericSubArray('criteria', $criteriaType) as $criteriaKey => $criteriaValue) {
+                       foreach ($this->getGenericArrayKey('criteria', $criteriaType, 'entries') as $criteriaKey => $criteriaValue) {
                                // Make sure no 'my-' or 'my_' passes this point
                                assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE) && (!is_bool($criteriaValue)));
 
                                // Make sure no 'my-' or 'my_' passes this point
                                assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE) && (!is_bool($criteriaValue)));
 
@@ -355,9 +355,10 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria {
                $cacheKey = '';
 
                // Now walk through all criterias
                $cacheKey = '';
 
                // Now walk through all criterias
-               foreach ($this->getGenericSubArray('criteria', $criteriaType) as $criteriaKey => $criteriaValue) {
+               foreach ($this->getGenericArrayKey('criteria', $criteriaType, 'entries') as $criteriaKey => $criteriaValue) {
                        // Make sure no 'my-' or 'my_' passes this point
                        assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE) && (!is_bool($criteriaValue)));
                        // Make sure no 'my-' or 'my_' passes this point
                        assert((strpos($criteriaKey, 'my-') === FALSE) && (strpos($criteriaKey, 'my_') === FALSE) && (!is_bool($criteriaValue)));
+                       assert(!is_array($criteriaValue));
 
                        // Convert dashes to underscore
                        $criteriaKey = $this->convertDashesToUnderscores($criteriaKey);
 
                        // Convert dashes to underscore
                        $criteriaKey = $this->convertDashesToUnderscores($criteriaKey);