Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: PHP Notice Errors: msg#00024

cms.phpslash.devel

Subject: Re: PHP Notice Errors

On Sat, 2003-10-18 at 16:14, 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).
>
> > > 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?
>
> Rather than just squish them?

An idea which I think has been tossed around but rejected is to wrap
$_PSL lookups is a pslConfig() function. pslConfig("resources.$urn") or
whatever could parse the string, check for existence of the keys and
levels of the multi-dimensional array, and return FALSE if it there's no
value without a warning (or maybe just a PSL-level warning that would go
away with $_PSL['debug'] off).

Pros:

1. No more global'ing $_PSL
2. Can munge keys to map one level of $_PSL to another virtually
3. More control of errors/warnings (as above)

Cons:

1. Adds spatial complexity
2. Probably adds time, too. Joe says, "Remember: PHP is a scripted
interpreted language." :-P

--Matt
--
Matthew Leingang
Harvard University Department of Mathematics
leingang-c2Vpf+SSmYbWs/AcZQh2Cw@xxxxxxxxxxxxxxxx



-------------------------------------------------------
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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation