On Thu, Jan 17, 2002 at 02:31:03AM +0800, Sergei Dolmatov wrote:
> On Wed, Jan 16, 2002 at 06:09:12PM +0100, Markus Geiger wrote:
> > Hi!
> > 
> > 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()? :)
> 

Another possible problem - $article->author, $article->creator are strings.
In this case mgd_get_person($article->author) tries get person by
name, in result it gets "Object does not exists". It's really so - I
don't have person with username = "0" or "1" and so on... :)
Possible solution - mgd_get_person(intval($article->author)).

--
Regards,
Sergei Dolmatov.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to