It may rarely happen that no filters are registered. It is strange but it may
[core.git] / inc / classes / main / filter / class_FilterChain.php
index b061f3c5c0755cce112f7855ec02a04195f7c526..1c2433313f1b99547cef8c701c1d9d92d79e4c6e 100644 (file)
@@ -56,12 +56,22 @@ class FilterChain extends BaseFrameworkSystem implements Registerable {
        }
 
        /**
-        * Getter for filters array
+        * "Getter" for filters array
         *
         * @return      $filters        The filters array holding all filter instances
         */
        protected function getFilters () {
-               return $this->getGenericArrayKey('filters', 'generic', 'dummy');
+               // Default is nothing found
+               $filters = array();
+
+               // Are some filters set?
+               if ($this->isValidGenericArrayKey('filters', 'generic', 'dummy')) {
+                       // Then get them
+                       $filters = $this->getGenericArrayKey('filters', 'generic', 'dummy');
+               } // END - if
+
+               // Return it
+               return $filters;
        }
 
        /**