Bug #65542 [Fbk->Opn]: zend_parse_parameters return string length == 0
| From: | Azq2 at ya dot ru | Date: | Sat, 24 Aug 2013 21:05:09 +0000 |
| Subject: | Bug #65542 [Fbk->Opn]: zend_parse_parameters return string length == 0 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-181162@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65542&edit=1
ID: 65542
User updated by: Azq2 at ya dot ru
Reported by: Azq2 at ya dot ru
Summary: zend_parse_parameters return string length == 0
-Status: Feedback
+Status: Open
Type: Bug
Package: Unknown/Other Function
PHP Version: 5.5.3
Block user comment: N
Private report: N
New Comment:
char *addr, *user, *password, *db, *connect_id = NULL, *socket = NULL, *host =
NULL;
uint addr_length, user_length, password_length, db_length, connect_id_length = 0;
Previous Comments:
------------------------------------------------------------------------
[2013-08-24 21:04:09] felipe@php.net
I mean what data type have you used for addr_length and user_length in your C code.
------------------------------------------------------------------------
[2013-08-24 21:02:17] azq2 at ya dot ru
String.
$db -> connect("127.0.0.2", "root", "qwerty", "test", 1);
------------------------------------------------------------------------
[2013-08-24 20:59:51] felipe@php.net
What data type have you used for store the string length?
------------------------------------------------------------------------
[2013-08-24 20:56:55] Azq2 at ya dot ru
Description:
------------
I have this code in my extension:
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssssl|bl", &addr,
&addr_length, &user, &user_length, &password, &password_length, &db,
&db_length,
&port, &persistent, &flags) != SUCCESS)
WRONG_PARAM_COUNT;
and i call from php:
$db -> connect("127.0.0.2", "root", "qwerty", "test", 1);
But... addr_length and user_length equals as zero O_O But addr and user not empty
and contains my values... o_O
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65542&edit=1