Changed all true/false to TRUE/FALSE respectively as PHP constants are better than...
[core.git] / inc / classes / main / filter / checkboxes / class_RulesAcceptedFilter.php
index 37b27c41815a5331f0054c71684aaf008fb5698b..b14cf530554605744b3d073ac5a0f4976c2d86cb 100644 (file)
@@ -53,6 +53,7 @@ class RulesAcceptedFilter extends BaseFilter implements Filterable {
         * @param       $requestInstance        An instance of a class with an Requestable interface
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
+        * @throws      FilterChainException    If this filter fails to operate
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Get the "rules" value from request
@@ -61,14 +62,14 @@ class RulesAcceptedFilter extends BaseFilter implements Filterable {
                // Was the "rules" value found in form? And is it set?
                if (is_null($rules)) {
                        // Not found in form so stop processing here
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('rules_unchecked');
 
                        // Skip further processing
-                       return false;
-               }
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
+               } // END - if
        }
 }