Re: Undifined Indexes
[email protected] (mikespub) Wed, 06 Jul 2005 18:16:11 GMT
| Newsgroups | gmane.comp.cms.xaraya.knowledge-base |
|---|---|
| Organization | not much |
| Message-ID | <[email protected]> |
In article <[email protected]>, Michael Dunn <[email protected]> wrote: >I'm not sure if this is a Xaraya setting or a php_ini setting and I'm >not seeing anyone else having this issue, but, I've got errors turning >up "Undefined Index" errors. I know PHP can over look these, and I've >tested to make sure that I can have a normal PHP page ignore instances >where the index is undefined, however in my Xaraya site this throws an >error. Is there a setting somewhere that I'm missing where this can be >turned off, or are there dire consequences for doing so? I'd like to >catch these, however I'd rather not have the user bothered with them >when it's really not important to the working of the program. > >Thanks in advance for your help :). > >Mike First you should figure out why you're getting those undefined index errors - perhaps a simple check to see if the values exist would fix those if you expect them to happen anyway : if (isset($mystuff[$idx])) { ... use $mystuff[$idx] ... } Otherwise, you may have a problem elsewhere that means you're not getting the data you were expecting, and you should fix that instead :-) For the rest, try setting the following in var/config.system.php : $systemConfiguration['Exception.EnablePHPErrorHandler'] = false; Mike.