scottmac Mon Jun 8 02:15:54 2009 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/sqlite3 sqlite3.c
/php-src/ext/sqlite3/tests sqlite3_enable_exceptions.phpt
Log:
MFH make SQLite3::enableExceptions() return the previous value.
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/sqlite3.c?r1=1.1.2.38&r2=1.1.2.39&diff_format=u
Index: php-src/ext/sqlite3/sqlite3.c
diff -u php-src/ext/sqlite3/sqlite3.c:1.1.2.38
php-src/ext/sqlite3/sqlite3.c:1.1.2.39
--- php-src/ext/sqlite3/sqlite3.c:1.1.2.38 Fri May 8 07:58:19 2009
+++ php-src/ext/sqlite3/sqlite3.c Mon Jun 8 02:15:54 2009
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sqlite3.c,v 1.1.2.38 2009/05/08 07:58:19 tony2001 Exp $ */
+/* $Id: sqlite3.c,v 1.1.2.39 2009/06/08 02:15:54 scottmac Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1109,8 +1109,8 @@
}
/* }}} */
-/* {{{ proto void SQLite3::enableExceptions([bool enableExceptions = false])
- Open a blob as a stream which we can read / write to. */
+/* {{{ proto bool SQLite3::enableExceptions([bool enableExceptions = false])
+ Enables an exception error mode. */
PHP_METHOD(sqlite3, enableExceptions)
{
php_sqlite3_db_object *db_obj;
@@ -1123,6 +1123,8 @@
return;
}
+ RETVAL_BOOL(db_obj->exception);
+
db_obj->exception = enableExceptions;
}
/* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/tests/sqlite3_enable_exceptions.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/sqlite3/tests/sqlite3_enable_exceptions.phpt
diff -u php-src/ext/sqlite3/tests/sqlite3_enable_exceptions.phpt:1.1.2.2
php-src/ext/sqlite3/tests/sqlite3_enable_exceptions.phpt:1.1.2.3
--- php-src/ext/sqlite3/tests/sqlite3_enable_exceptions.phpt:1.1.2.2 Sun May
17 16:51:59 2009
+++ php-src/ext/sqlite3/tests/sqlite3_enable_exceptions.phpt Mon Jun 8
02:15:54 2009
@@ -23,9 +23,9 @@
echo "Done\n";
?>
--EXPECTF--
-NULL
+bool(false)
no such table: non_existent_table
-NULL
+bool(true)
Warning: SQLite3::query(): no such table: non_existent_table in %s on line %d
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php