On Thu, Jan 17, 2002 at 06:36:21AM +0100, Emiliano wrote: > Sergei Dolmatov wrote: > > > > I am experiencing strange problems with the mgd_get_person() > > > function. The function _sometimes_ fails and returns the error > > > "Object does not exist" with no good reason at all: > > > > Check type of variable that you pass in mgd_get_person() function by > > gettype($var). > > It may be "string", even if you see only number in it. In this case > > mgd_get_person() tried to find person record by its name. > > > > Emile, may be more useful would be make usual > > mgd_get_person_by_name()? :) > > Oy, I hadn't though of this. I'll think of a way to fix this, or make > two functions.
Well, I vote for mgd_get_person_by_name(string $username). Current behavior of mgd_get_person isn't very official (I hope :), and mgd_get_person_by_name() would be good and easy-to-understand replacement. Now we have a lot of strings in place of integers - $article->author by example and so on. Rechecking everything where it is important is very hard). I'm not sure that implementing such functionality wouldn't be very difficult. Opinions? -- Regards, Sergei Dolmatov. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
