public function add($data)
    {
        $ea = (array) $data;
        foreach ($ea as $key => $value) {
            if (is_array($value)) {
                foreach ($value as $k => $v) {
                    if (is_null($v)) {
                        unset($value[$k]);
                    }
                }
                $value = array_values($value);
                $ea[$key] = $value;
            }
        }

        $this->_errors = $ea;
    }
public function add($data)
    {
        $ea = (array) $data;
        foreach ($ea as $key => $value) {
            if (is_array($value)) {
                foreach ($value as $k => $v) {
                    if (is_null($v)) {
                        unset($value[$k]);
                    }
                }
                $value = array_values($value);
                $ea[$key] = $value;
            }
        }

        $this->_errors = $ea;
    }
public function add ( $ data ) { $ ea = ( array ) $ data ; foreach ( $ ea as $ key => $ value ) { if ( is_array ( $ value ) ) { foreach ( $ value as $ k => $ v ) { if ( is_null ( $ v ) ) { unset ( $ value [ $ k ] ) ; } } $ value = array_values ( $ value ) ; $ ea [ $ key ] = $ value ; } } $ this -> _errors = $ ea ; }
Adds all error data. Also clears out any null values.

@param array $data - The error data to load into
Adds all error data . Also clears out any null values .