mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Improved parameter parsing
This commit is contained in:
parent
caf9054e3d
commit
03a27e3373
1 changed files with 3 additions and 3 deletions
|
@ -2357,7 +2357,7 @@ PHP_FUNCTION(sqlite_fetch_object)
|
|||
zend_bool decode_binary = 1;
|
||||
struct php_sqlite_result *res;
|
||||
zval *object = getThis();
|
||||
char *class_name;
|
||||
char *class_name = NULL;
|
||||
int class_name_len;
|
||||
zend_class_entry *ce;
|
||||
zval dataset;
|
||||
|
@ -2374,7 +2374,7 @@ PHP_FUNCTION(sqlite_fetch_object)
|
|||
return;
|
||||
}
|
||||
RES_FROM_OBJECT_RESTORE_ERH(res, object, &error_handling);
|
||||
if (!ZEND_NUM_ARGS()) {
|
||||
if (!class_name) {
|
||||
ce = zend_standard_class_def;
|
||||
} else {
|
||||
ce = zend_fetch_class(class_name, class_name_len, ZEND_FETCH_CLASS_AUTO TSRMLS_CC);
|
||||
|
@ -2385,7 +2385,7 @@ PHP_FUNCTION(sqlite_fetch_object)
|
|||
return;
|
||||
}
|
||||
ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result);
|
||||
if (ZEND_NUM_ARGS() < 2) {
|
||||
if (!class_name) {
|
||||
ce = zend_standard_class_def;
|
||||
} else {
|
||||
ce = zend_fetch_class(class_name, class_name_len, ZEND_FETCH_CLASS_AUTO TSRMLS_CC);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue