Re: PHP Notice Errors
Evan Hughes <[email protected]> Sun, 19 Oct 2003 00:52:21 -0400
| Newsgroups | gmane.comp.cms.phpslash.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Oct 18, 2003 at 04:19:32PM -0400, Mike Gifford wrote:
> Howdy Joe,
>
> On Fri, 2003-10-17 at 10:10, Joe Stewart wrote:
> > On Thu, Oct 16, 2003 at 12:34:42PM -0400, Mike Gifford wrote:
> > > Index: functions.inc
> > > ===================================================================
> > > RCS file: /cvsroot/back-end/back-end0.5.x/class/functions.inc,v
> > > retrieving revision 1.53
> > > diff -r1.53 functions.inc
> > > 617c617
> > > < $templ->set_var('XSITEOBJECT', $metaobject['object']);
> > > ---
> > > > $templ->set_var('XSITEOBJECT', @$metaobject['object']);
> > > 811c811,812
> >
> > I thought this one was fixed by testing if metaobject is an array.
>
> Evan noticed it, so I'm assuming that it poped up somewhere as a warning
> or notice. I've cc'd him.. Perhaps the object isn't defined on one of
> our pages (in which case it's our problem & not yours).
I was getting a warning that 'object' wasn't a member of the array
(IIRC). This nixes that.
>
> > > Index: lib.resources.php
> > > ===================================================================
> > > RCS file: /cvsroot/back-end/back-end0.5.x/class/lib.resources.php,v
> > > retrieving revision 1.4
> > > diff -r1.4 lib.resources.php
> > > 444c444
> > > < $ans = $GLOBALS['_PSL']['resources'][$urn] ? true : false;
> > > ---
> > > > $ans = @$GLOBALS['_PSL']['resources'][$urn] ? true : false;
> >
> > This is one of those screwy php things. Anybody got a better way to get
> > rid of the warning?
An isset (or a friend thereof) would probably work.
e
-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise
Linux in the Boardroom; in the Front Office; & in the Server Room
http://www.enterpriselinuxforum.com