ID: 28612
Updated by: [EMAIL PROTECTED]
Reported By: jsgoupil at lookstrike dot com
Status: Bogus
Bug Type: Arrays related
Operating System: WinXP
PHP Version: 5.0.0RC2
New Comment:
...or mysql_query()/mysqli_query() for that matter.
Previous Comments:
------------------------------------------------------------------------
[2004-06-03 01:00:28] [EMAIL PROTECTED]
Resources cannot be used as array offsets. This is just as true of
mysql_connect() as it is of mysqli_connect().
------------------------------------------------------------------------
[2004-06-02 23:08:09] jsgoupil at lookstrike dot com
Description:
------------
When trying to put a ressource of mySQLi in the index of an array, i
get the following error : Warning: Illegal offset type in ...
I'm running PHP5.0.0RC2 and trying to connect a mySQL4.1 server.
When i try to connect the php_mysql.dll (not advanced) to another
server, i don't get the "illegal offset" with the same code.
(mysql_connect function)
Reproduce code:
---------------
<?php
$link =
mysqli_connect("localhost","lookstrike","*****","lookstrike_local");
$query = mysqli_query($link,"SELECT player_id FROM ls_players");
$something = array();
$something[$query] = "1";
mysqli_close($link);
?>
Expected result:
----------------
It supposed to work like mySQL (not avanced)
Actual result:
--------------
Warning: Illegal offset type in ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28612&edit=1