diff options
author | Marcus Boerger <helly@php.net> | 2003-10-25 23:17:15 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-10-25 23:17:15 +0000 |
commit | 37f6618c64bf83634831f01a0e37e55283cdd103 (patch) | |
tree | e3cc79b91d43af0c7f831eb1bd90ae2f84736561 /ext/sqlite/sqlite.c | |
parent | 07d94c241022ba442e27f43b2cda3b895717632a (diff) | |
download | php-git-37f6618c64bf83634831f01a0e37e55283cdd103.tar.gz |
Allow static methods being called from sqlite sql. Notice by Stphane Mariel
Diffstat (limited to 'ext/sqlite/sqlite.c')
-rw-r--r-- | ext/sqlite/sqlite.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index 0c94267e02..a6bb92c5f8 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -413,13 +413,14 @@ static void php_sqlite_generic_function_callback(sqlite_func *func, int argc, co return; } - ZVAL_STRING(&funcname, (char*)argv[0], 0); + ZVAL_STRING(&funcname, (char*)argv[0], 1); - if (!zend_is_callable(&funcname, 0, &callable)) { - spprintf(&errbuf, 0, "function `%s' is not callable", callable); + if (!zend_make_callable(&funcname, &callable TSRMLS_CC)) { + spprintf(&errbuf, 0, "function `%s' is not funcname", callable); sqlite_set_result_error(func, errbuf, -1); efree(errbuf); efree(callable); + zval_dtor(&funcname); return; } efree(callable); @@ -441,6 +442,7 @@ static void php_sqlite_generic_function_callback(sqlite_func *func, int argc, co argc-1, zargs, 0, NULL TSRMLS_CC); + zval_dtor(&funcname); if (res == SUCCESS) { if (retval == NULL) { |