cvs: php-src /ext/pdo_sqlite sqlite_driver.c

From: Date: Sun, 10 Dec 2006 02:32:18 +0000
Subject: cvs: php-src /ext/pdo_sqlite sqlite_driver.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-42035@lists.php.net to get a copy of this message
pajoye Sun Dec 10 02:32:18 2006 UTC Modified files: /php-src/ext/pdo_sqlite sqlite_driver.c Log: - fix build on HEAD (not sure if it should compile on 6 and 5 or if it is required only for pdo, other drivers require this fix) http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_driver.c?r1=1.30&r2=1.31&diff_format=u Index: php-src/ext/pdo_sqlite/sqlite_driver.c diff -u php-src/ext/pdo_sqlite/sqlite_driver.c:1.30 php-src/ext/pdo_sqlite/sqlite_driver.c:1.31 --- php-src/ext/pdo_sqlite/sqlite_driver.c:1.30 Sat Sep 16 18:31:06 2006 +++ php-src/ext/pdo_sqlite/sqlite_driver.c Sun Dec 10 02:32:17 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sqlite_driver.c,v 1.30 2006/09/16 18:31:06 iliaa Exp $ */ +/* $Id: sqlite_driver.c,v 1.31 2006/12/10 02:32:17 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -78,8 +78,13 @@ } if (!dbh->methods) { +#if PHP_VERSION_ID > 50200 + zend_throw_exception_ex(php_pdo_get_exception(), 0 TSRMLS_CC, "SQLSTATE[%s] [%d] %s", + *pdo_err, einfo->errcode, einfo->errmsg); +#else zend_throw_exception_ex(php_pdo_get_exception(TSRMLS_C), 0 TSRMLS_CC, "SQLSTATE[%s] [%d] %s", *pdo_err, einfo->errcode, einfo->errmsg); +#endif } return einfo->errcode; @@ -737,9 +742,13 @@ filename = make_filename_safe(dbh->data_source TSRMLS_CC); if (!filename) { +#if PHP_VERSION_ID > 50200 + zend_throw_exception_ex(php_pdo_get_exception(), 0 TSRMLS_CC, + "open_basedir prohibits opening %s", dbh->data_source); +#else zend_throw_exception_ex(php_pdo_get_exception(TSRMLS_C), 0 TSRMLS_CC, - "open_basedir prohibits opening %s", - dbh->data_source); + "open_basedir prohibits opening %s", dbh->data_source); +#endif goto cleanup; }

« previous php.cvs (#42035) next »