Re: Pear Notice in index.php error
| From: | Justin Patrin | Date: | Tue, 25 Jan 2005 01:03:18 +0000 |
| Subject: | Re: Pear Notice in index.php error | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-17138@lists.php.net to get a copy of this message | ||
On Mon, 24 Jan 2005 22:48:37 -0200, Jacques <iacques@yahoo.com.br> wrote:
> Dear friends, in url:
>
> http://localhost/pear/index.php?command=list-all&mode=installed&enableJS=1gAP�£ê|ð!2Kà
> ÜN
> I get a php notice:
> Notice: Undefined index: summary in
> c:\desenvolvimento\localhost\pear\PEAR\PEAR\Command\Remote.php on line 195
> But, the ret of the code is running ok...
>
This is a noitce. It's telling you that you're trying to access an
undefined index in an array,
$arr = array();
echo $arr['summary'];
will produce that notice. A better way to do it is:
$arr = array();
if (isset($arr['summary'])) {
echo $arr['summary'];
}
or you can turn off notices by setting error_reporting to E_ALL &
~E_NOTICE in your php.ini.
--
Justin Patrin