cvs: php-src /ext/sqlite sqlite.c

From: Date: Fri, 29 Aug 2003 21:32:25 +0000
Subject: cvs: php-src /ext/sqlite sqlite.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-23504@lists.php.net to get a copy of this message
helly Fri Aug 29 17:32:25 2003 EDT Modified files: /php-src/ext/sqlite sqlite.c Log: Throw exception if user wants to pass arguments to an non existing constructor Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.87 php-src/ext/sqlite/sqlite.c:1.88 --- php-src/ext/sqlite/sqlite.c:1.87 Fri Aug 29 17:13:50 2003 +++ php-src/ext/sqlite/sqlite.c Fri Aug 29 17:32:25 2003 @@ -17,7 +17,7 @@ | Marcus Boerger <helly@php.net> | +----------------------------------------------------------------------+ - $Id: sqlite.c,v 1.87 2003/08/29 21:13:50 helly Exp $ + $Id: sqlite.c,v 1.88 2003/08/29 21:32:25 helly Exp $ */ #ifdef HAVE_CONFIG_H @@ -941,7 +941,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "SQLite support", "enabled"); - php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.87 2003/08/29 21:13:50 helly Exp $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.88 2003/08/29 21:32:25 helly Exp $"); php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); php_info_print_table_end(); @@ -1663,7 +1663,7 @@ } /* }}} */ -/* {{{ proto object sqlite_fetch_object(resource result [, string class_name [, array ctor_params [, bool decode_binary]]]) +/* {{{ proto object sqlite_fetch_object(resource result [, string class_name [, NULL|array ctor_params [, bool decode_binary]]]) Fetches the next row from a result set as an object. */ /* note that you can do array(&$val) for param ctor_params */ PHP_FUNCTION(sqlite_fetch_object) @@ -1768,6 +1768,8 @@ if (fci.params) { efree(fci.params); } + } else if (ctor_params && Z_TYPE_P(ctor_params) != IS_NULL) { + zend_throw_exception_ex(sqlite_ce_exception, 0 TSRMLS_CC, "Class %s does not have a constructor use NULL for parameter ctor_params", class_name); } } /* }}} */

« previous php.cvs (#23504) next »