Show
Ignore:
Timestamp:
02/24/2008 09:34:30 AM (11 months ago)
Author:
Geert
Message:
  • Modified Kohana::debug() to also show the variable type because print_r() alone will for example output "1" in case of a boolean or completely nothing in case of a NULL value.
  • Other small cleanups
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Validation.php

    r2143 r2159  
    135135                        throw new Kohana_Exception('validation.filter_not_callable'); 
    136136 
    137                 $filter = (is_string($filter) AND strpos($filter, '::') !== FALSE) ? explode('::', $filter) : $filter;                   
     137                $filter = (is_string($filter) AND strpos($filter, '::') !== FALSE) ? explode('::', $filter) : $filter; 
    138138 
    139139                if ($field === TRUE) 
     
    279279                                throw new Kohana_Exception('validation.callback_not_callable'); 
    280280 
    281                         $callback = (is_string($callback) AND strpos($callback, '::') !== FALSE) ? explode('::', $callback) : $callback;                                                         
    282  
    283                         // Add the filter to specified field 
     281                        $callback = (is_string($callback) AND strpos($callback, '::') !== FALSE) ? explode('::', $callback) : $callback; 
     282 
     283                        // Add the callback to specified field 
    284284                        $this->callbacks[$field][] = $callback; 
    285285                }