#47050 [Opn->Bgs]: mysqli_poll() modifies improper variables
| From: | felipe@php.net | Date: | Sun, 11 Jan 2009 00:14:41 +0000 |
| Subject: | #47050 [Opn->Bgs]: mysqli_poll() modifies improper variables | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-132734@lists.php.net to get a copy of this message | ||
ID: 47050
Updated by: felipe@php.net
Reported By: vrana@php.net
-Status: Open
+Status: Bogus
Bug Type: MySQLi related
Operating System: Windows
PHP Version: 5.3.0alpha4-dev
New Comment:
It's looks expected, Jakub.
See the prototype:
public int mysqli::poll ( array &$read , array &$error , array &$reject
, int $sec [, int $usec ] )
int mysqli_poll ( array &$read , array &$error , array &$reject , int
$sec [, int $usec ] )
Previous Comments:
------------------------------------------------------------------------
[2009-01-09 13:06:50] vrana@php.net
Description:
------------
mysqli_poll() modifies the variable which was assigned to variables
passed to mysqli_poll().
The reason probably is that mysqli_poll() doesn't copy zvals on write
as it should.
Reproduce code:
---------------
<?php
$link1 = mysqli_connect();
$link1->query("SELECT 'test'", MYSQLI_ASYNC);
$all_links = array($link1);
$links = $errors = $reject = $all_links;
mysqli_poll($links, $errors, $reject, 1);
print_r($all_links);
Expected result:
----------------
Array
(
[0] => mysqli Object
)
Actual result:
--------------
Array
(
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47050&edit=1