mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
- fix #55226, WS
This commit is contained in:
parent
3115e6497a
commit
0e0d79218f
@ -670,14 +670,14 @@ static PHP_METHOD(SQLite, sqliteCreateCollation)
|
||||
struct pdo_sqlite_collation *collation;
|
||||
zval *callback;
|
||||
char *collation_name;
|
||||
int collation_name_len;
|
||||
char *cbname = NULL;
|
||||
int collation_name_len;
|
||||
char *cbname = NULL;
|
||||
pdo_dbh_t *dbh;
|
||||
pdo_sqlite_db_handle *H;
|
||||
int ret;
|
||||
|
||||
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz",
|
||||
&collation_name, &collation_name_len, &callback)) {
|
||||
&collation_name, &collation_name_len, &callback)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@ -693,10 +693,10 @@ static PHP_METHOD(SQLite, sqliteCreateCollation)
|
||||
|
||||
H = (pdo_sqlite_db_handle *)dbh->driver_data;
|
||||
|
||||
collation = (struct pdo_sqlite_collation*)ecalloc(1, sizeof(*collation));
|
||||
collation = (struct pdo_sqlite_collation*)ecalloc(1, sizeof(*collation));
|
||||
|
||||
ret = sqlite3_create_collation(H->db, collation_name, SQLITE_UTF8, collation, php_sqlite3_collation_callback);
|
||||
if (ret == SQLITE_OK) {
|
||||
ret = sqlite3_create_collation(H->db, collation_name, SQLITE_UTF8, collation, php_sqlite3_collation_callback);
|
||||
if (ret == SQLITE_OK) {
|
||||
collation->name = estrdup(collation_name);
|
||||
|
||||
MAKE_STD_ZVAL(collation->callback);
|
||||
|
Loading…
Reference in New Issue
Block a user