[dev] Re: [cvs] commit: horde/lib Form.php

Marko Djukic marko at oblo.com
Thu Mar 27 18:45:33 PST 2003


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Quoting Marko Djukic <tech at oblo.com>:
> 
> >   Log:
> >   temporary fix, something is so not right here
> 
> Please elaborate. I tested this pretty thoroughly and spent a freaking long
> time getting it all right. I'd like at least a *hint* of what might be
> wrong and where to reproduce it. And you've just broken the rows renderer

> pretty much completely.

This was the original code:
    function getInfo(&$vars, &$var, &$info)
    {
        $value = $var->getValue($vars);
        if (is_array($value)) {
            $info = array();
            foreach ($value as $key => $val) {
                $info[$key] = $this->_validateAndFormat($val);
            }
        } else {
            $info = $this->_validateAndFormat($val);
        }
    }

to me it seems that the script is:
- calling _validateAndFormat() with only one paramater when two are expected
- passing a non existant $val in the second call
- $value is always an array because the date is composed of $value['day'],
$value['month'] and $value['year']

i'm not sure how you are using this code that it was working for you because the
Renderer.php was not updated with the startYear -> _startYear, endYear ->
_endYear etc changes, so midas, scry, turba etc were pretty broken, in addition
to the getInfo breaking it.

m.


More information about the dev mailing list