|
Posted by Mister Jack on 03/19/05 21:29
The initialisation seems to be ok, since :
Function return_freedb_search($array)
{
global $freedb;
$freedb =& new freedbaxs();
[snip]
$freedb->freedb_search($txt); //line 16...
}
works
and also
$freedb =& new freedbaxs();
$freedb->freedb_search("ploplop");
Function return_freedb_search($array)
{
global $freedb;
[snip]
//$freedb->freedb_search($txt); //line 16...
}
those line are all in a PHP file which is include if needed, by
parsing the template file.
So the file is include (then
$freedb =& new freedbaxs();
should be executed)
and return_freedb_search is call a bit later. Everythin has always
worked fine, but this is the first time I tried with an object, and
all i got is this error. that's really strange, and I really don't
have a clue about what is going on. (is the object disapearing ? )
On Sat, 19 Mar 2005 19:59:55 +0100, Evert - Rooftop Solutions
<evert@rooftopsolutions.nl> wrote:
> pooly wrote:
>
> > I'm trying to use a global object (declared at a upper level), but all
> > I got is :
> > Call to a member function on a non-object in
> > /home/pooly/public_html/templeet/modules/freedb.php on line 16
> >
> > part of the code is :
> > $freedb =& new freedbaxs();
> > Function return_freedb_search($array)
> > {
> > global $freedb;
> > [snip]
> > $freedb->freedb_search($txt);
> >
> >
> I don't see an error in this code, perhaps you should give us a bit more
> information.
>
> grt,
> Evert
>
> --
> Rooftop Solutions - Web Applications on Demand
> tel. (+31)628962319 fax. (+31)842242474
> evert@rooftopsolutions.nl
> http://www.rooftopsolutions.nl
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Navigation:
[Reply to this message]
|