Re: Bug #16528 Updated: Incompatible behaviour of arrays (and maybe other vars)
| From: | Derick Rethans | Date: | Wed, 10 Apr 2002 11:20:14 +0000 |
| Subject: | Re: Bug #16528 Updated: Incompatible behaviour of arrays (and maybe other vars) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-82465@lists.php.net to get a copy of this message | ||
On Wed, 10 Apr 2002, Alex Aulbach wrote:
> Is it fixed in 4.2?
No, as it is correct bahavior, it's just different than 4.0.x which had
this bug.
Derick
>
> PHP Bug Database schrieb:
> >
> > ATTENTION! Do NOT reply to this email!
> > To reply, use the web interface found at
> > http://bugs.php.net/?id=16528&edit=2
> >
> > ID: 16528
> > Updated by: derick@php.net
> > Reported By: ssilk@fidion.de
> > -Status: Feedback
> > +Status: Bogus
> > Bug Type: Variables related
> > Operating System: linux
> > PHP Version: 4.1.2
> > New Comment:
> >
> > This is not a bug. Please double-check the documentation available
> > at http://www.php.net/manual/ and the instructions on how
> > to report
> > a bug at http://bugs.php.net/how-to-report.php
> >
> > Previous Comments:
> > ------------------------------------------------------------------------
> >
> > [2002-04-10 06:21:40] sander@php.net
> >
> > Can you try 4.2.0RC2 or 3 from www.php.net/~derick?
> >
> > ------------------------------------------------------------------------
> >
> > [2002-04-10 06:05:18] ssilk@fidion.de
> >
> > In PHP 4.0 you can write the following:
> >
> > ...
> > $a='';
> > if ( empty($a['bla']) )
> > ...
> >
> > There are no errors or warnings, even if all warnings has been put on
> > (as we do).
> >
> > in PHP 4.1 this code complains the missing index 'bla':
> > Warning: Uninitialized string offset: 0 in ....
> >
> > Workarround:
> >
> > if ( empty($a) and empty($a['bla']) ) ....
> >
> > which seems not to be very logical. $a['bla'] must be empty, if $a is
> > empty...
> >
> > ------------------------------------------------------------------------
>
>
> --
>
> Alexander Aulbach, Dipl. Inf. (FH) aulbach@fidion.de
> fidion GmbH - Die Softwareschmiede (0931) 6001-733
>