Re: No notices for undefined index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Shawn,
Why dont you report a bug? When we know the expected behavior or the
way it SHOULD behave. and its not behaving that way. Its certainly a
bug.. Only then we can know the real reason why the novicas are not
showing up.

On 4/8/10, Shawn McKenzie <nospam@xxxxxxxxxxxxx> wrote:
> So the first two print statements generate NO notices, while the second
> obviously generates:
>
> Notice: Undefined offset:  1 in /home/shawn/www/test.php on line 11
>
> Notice: Undefined index:  test in /home/shawn/www/test.php on line 12
>
> This sucks.  A bug???
>
> error_reporting(E_ALL);
> ini_set('display_errors', '1');
>
>
> $a = 5;
> print $a[1];
> print $a['test'];
>
> $a = array();
> print $a[1];
> print $a['test'];
>
> --
> Thanks!
> -Shawn
> http://www.spidean.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
Sent from my mobile device

Shiplu Mokaddim
My talks, http://talk.cmyweb.net
Follow me, http://twitter.com/shiplu
SUST Programmers, http://groups.google.com/group/p2psust
Innovation distinguishes bet ... ... (ask Steve Jobs the rest)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux