Jump to:

23477 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Is there an isObject() test?

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 677 Views
  • micahsheets
    Community Member
    164 Posts

    Is there an isObject() test? Link to this post

    I often get "[Notice] Trying to get property of non-object". I would like to find an easy way to test if my variable is an object or not so I can handle the error myself in a more graceful way. Is there a function to test if something is an object?

  • Willr
    Forum Moderator
    5502 Posts

    Re: Is there an isObject() test? Link to this post


    Although, usually you can just make sure if its set, if its set then usually you can assume its an object if($object).....

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.