Bug #11924 Updated: problem with ibase_execute called through call_user_func_array()

From: Date: Fri, 28 Jun 2002 10:30:44 +0000
Subject: Bug #11924 Updated: problem with ibase_execute called through call_user_func_array()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12397@lists.php.net to get a copy of this message
ID: 11924 Updated by: sniper@php.net Reported By: flying@dom.natm.ru Status: Open Bug Type: InterBase related Operating System: Windows 2000 -PHP Version: 4.0.6 +PHP Version: 4.3.0-dev New Comment: version update Previous Comments: ------------------------------------------------------------------------ [2002-06-28 06:28:36] flying@dom.natm.ru No, it isn't fixed in latest snapshot build. Testcase give me same results as before. ------------------------------------------------------------------------ [2002-06-27 21:06:35] sniper@php.net Please try this snapshot: http://snaps.php.net/win32/php4-win32-latest.zip There have been some fixes lately, maybe this was fixed too? (I don't have interbase installed, can't test it.) ------------------------------------------------------------------------ [2002-06-27 03:40:45] flying@dom.natm.ru I looks like i forget to set 'Open' status for this bug month ago... :) ------------------------------------------------------------------------ [2002-06-27 01:00:07] php-bugs@lists.php.net No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2002-05-26 04:51:34] flying@dom.natm.ru Here is full information, test database creation script included: test.sql ======== SET SQL DIALECT 3; SET NAMES NONE; CREATE DATABASE 'C:\TEST.GDB' USER 'SYSDBA' PASSWORD 'masterkey' PAGE_SIZE 4096 DEFAULT CHARACTER SET NONE; CREATE GENERATOR GEN_MY_TABLE_ID; CREATE TABLE MY_TABLE ( ID INTEGER NOT NULL, STR_FIELD VARCHAR(50), INT_FIELD INTEGER); ALTER TABLE MY_TABLE ADD CONSTRAINT PK__MY_TABLE PRIMARY KEY (ID); SET TERM ^ ; CREATE TRIGGER MY_TABLE_BI FOR MY_TABLE ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF (NEW.ID IS NULL) THEN NEW.ID = GEN_ID(GEN_MY_TABLE_ID,1); END ^ SET TERM ; ^ test.php ======== <?php ibase_connect('localhost:c:\test.gdb','SYSDBA','masterkey'); $args = array('some text','another text'); $query = ibase_prepare('insert into MY_TABLE (INT_FIELD, STR_FIELD) values (?,?)'); array_unshift($args,$query); print_r($args); $rs = call_user_func_array('ibase_execute',$args); print_r($args); ibase_free_query($query); ibase_close(); ?> Expected results: ================= Array ( [0] => Resource id #2 [1] => some text [2] => another text ) Array ( [0] => Resource id #2 [1] => some text [2] => another text ) Actual results: =============== Array ( [0] => Resource id #2 [1] => some text [2] => another text ) Array ( [0] => Resource id #2 [1] => 0 [2] => another text ) --------------------------------------- As you can see - after calling call_user_func_array() data into $args[1] has been changed, while it should stay the same. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/11924 -- Edit this bug report at http://bugs.php.net/?id=11924&edit=1

« previous php.bugs (#12397) next »