Bug #11924: problem with ibase_execute called through call_user_func_array()
| From: | flying at dom dot natm dot ru | Date: | Fri, 06 Jul 2001 10:03:08 +0000 |
| Subject: | Bug #11924: problem with ibase_execute called through call_user_func_array() | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-59067@lists.php.net to get a copy of this message | ||
From: flying@dom.natm.ru
Operating system: Windows 2000
PHP version: 4.0.6
PHP Bug Type: InterBase related
Bug description: problem with ibase_execute called through call_user_func_array()
It seems to be a problem when ibase_execute called indirectly, through call_user_func_array().
Look at the following piece of code:
$args = array('some text','amother text');
$query = ibase_prepare($conn,"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);
MY_TABLE table contains two columns:
INT_FIELD INTEGER,
STR_FIELD VARCHAR(50)
Imagine, that we're make an error, and pass string values for both fields.
No error will be given, but at second print_r() first item inro $args array
will be equal to 0 instead of 'some text'.
As I can understand, all query parameters are replaced by values, actually
stored into database (like they are passed by reference,
but allow_call_time_pass_reference options is turned off).
If it is not a bug, but a "feature", it must be documented, to avoid future
misunderstandings.
--
Edit Bug report at: http://bugs.php.net/?id=11924&edit=1