#20679 [Opn->Fbk]: exit without dump or output after wrong array use
| From: | derick@php.net | Date: | Wed, 27 Nov 2002 17:58:30 +0000 |
| Subject: | #20679 [Opn->Fbk]: exit without dump or output after wrong array use | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-25982@lists.php.net to get a copy of this message | ||
ID: 20679
Updated by: derick@php.net
Reported By: martin@php.net
-Status: Open
+Status: Feedback
Bug Type: Arrays related
Operating System: several
PHP Version: 4.2.3
New Comment:
It works 'fine' here:
[derick@kossu derick]$ php
<?php
$i = count($this->aliases[]);
Fatal error: Cannot use [] for reading in - on line 2
-(2) : Fatal error - Cannot use [] for reading
Can you provide us a piece of code which we can copy& paste?
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-11-27 11:01:37] martin@php.net
Inadvertently, I used code like this:
$i = count($this->aliases[]);
within a cfunction. Note the incorrect use of extra [] which
should have read count($this->aliases).
The effect is that the php request bails out with a zero
byte response, without producing any error message or dump.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20679&edit=1