SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2008
    Posts
    455
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Catchable fatal error: Object of class structure could not be converted to string

    Hi,

    I'm getting the following error when I try to print a variable is defined as self::$structure.

    I get the following error:
    Catchable fatal error: Object of class structure could not be converted to string...

    is there a way around it?

    Thanks.

  2. #2
    Web Professional
    Join Date
    Oct 2008
    Location
    London
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Post the code.

  3. #3
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,396
    Mentioned
    147 Post(s)
    Tagged
    4 Thread(s)
    You're trying to print an object? Why?

  4. #4
    SitePoint Evangelist
    Join Date
    Jun 2008
    Posts
    455
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've seen the error of my ways now...

    I have a class called base, and a class called structure which extends base.
    I call structure in the base class and assigned it to self::$structure. I then tried to print it out. I assigned it to self::.... because I thought I might need to pass it to another class which extends base.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •