#40583 [Opn->Bgs]: No explanation of "Illegal offset type"
| From: | dmytton@php.net | Date: | Thu, 22 Feb 2007 14:21:55 +0000 |
| Subject: | #40583 [Opn->Bgs]: No explanation of "Illegal offset type" | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969375564@lists.php.net to get a copy of this message | ||
ID: 40583
Updated by: dmytton@php.net
Reported By: darrenoh at sidepotsinternational dot com
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: OS X
PHP Version: Irrelevant
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
You cannot use arrays or objects as keys. Doing so will result in a
warning: Illegal offset type. Check your code.
Previous Comments:
------------------------------------------------------------------------
[2007-02-21 19:05:53] darrenoh at sidepotsinternational dot com
Description:
------------
I'm having a problem with unset generating an "Illegal offset
type" error when I unset an array. My complaint is that
there's no way to find out what the error means or why the
unset command would generate it.
Reproduce code:
---------------
foreach ($form['taxonomy'] as $vid) {
if (substr($vid, 0, 1) != '#') {
unset($form['taxonomy'][$vid]);
}
}
Expected result:
----------------
I expected to be given an error message that I could find an
explanation for somewhere.
Actual result:
--------------
I found no explanation anywhere.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40583&edit=1