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;
        }
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to