]> git.mxchange.org Git - core.git/commitdiff
It may rarely happen that no filters are registered. It is strange but it may
authorRoland Haeder <roland@mxchange.org>
Sun, 22 Mar 2015 20:11:33 +0000 (21:11 +0100)
committerRoland Haeder <roland@mxchange.org>
Sun, 22 Mar 2015 20:11:33 +0000 (21:11 +0100)
happen.

Signed-off-by: Roland Häder <roland@mxchange.org>
.gitignore
inc/classes/main/filter/class_FilterChain.php
inc/classes/main/response/class_BaseResponse.php

index e4688a2d38f938c512ab64904adfe62c6ccabfab..5c62d8f671e628f2c2915c410109c503454d8d08 100644 (file)
@@ -8,3 +8,11 @@ inc/config/config-local.php
 templates/_compiled/*.*
 templates/images/_cache/*.*
 *.*~
+/.cache
+/.project
+/.settings
+application/*/config-local.php
+db/*/*.serialized
+docs/html/*
+docs/latex/*
+docs/warn.log
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;
        }
 
        /**
index 7fdbebb484a2d93f1066a32c0dfc03816625e981..bd7524890de030d6f633c3fd2de06423fd691750 100644 (file)
@@ -181,7 +181,7 @@ class BaseResponse extends BaseFrameworkSystem {
                }
 
                // Are there some error messages?
-               if ($this->countGenericArrayElements('fatal_messages', 'generic', 'message') == 0) {
+               if ((!$this->isValidGenericArrayKey('fatal_messages', 'generic', 'message')) || ($this->countGenericArrayElements('fatal_messages', 'generic', 'message') == 0)) {
                        // Flush the output to the world
                        $this->getWebOutputInstance()->output($this->responseBody);
                } else {