]> granicus.if.org Git - php/commitdiff
don't blow up under HEAD
authorWez Furlong <wez@php.net>
Sun, 26 Dec 2004 04:50:09 +0000 (04:50 +0000)
committerWez Furlong <wez@php.net>
Sun, 26 Dec 2004 04:50:09 +0000 (04:50 +0000)
ext/pdo/pdo_dbh.c
ext/pdo/php_pdo_int.h

index 2e814ed99cf18c1b8d2b57144ed581b3e1054241..9f2099954c8579c3ae345669fe0712e8c3df6fe5 100755 (executable)
@@ -196,7 +196,7 @@ static PHP_FUNCTION(dbh_constructor)
                }
                colon = strchr(data_source, ':');
                if (!colon) {
-                       zend_throw_exception_ex(php_pdo_get_exception(), PDO_ERR_SYNTAX TSRMLS_CC, "invalid data source name");
+                       zend_throw_exception_ex(php_pdo_get_exception(), PDO_ERR_SYNTAX TSRMLS_CC, "invalid data source name (via uri)");
                        ZVAL_NULL(object);
                        return;
                }
@@ -575,7 +575,7 @@ static PHP_METHOD(PDO, query)
 static PHP_METHOD(PDO, exec) /* FIXME: nuke on release */
 {
        php_error_docref(NULL TSRMLS_CC, E_WARNING, "This is name deprecated, use PDO::query instead");
-       PHP_FN(PDO_exec)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+       PHP_FN(PDO_query)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
 }
 /* }}} */
 
@@ -777,10 +777,19 @@ static HashTable *dbh_get_properties(zval *object TSRMLS_DC)
        return NULL;
 }
 
-static union _zend_function *dbh_method_get(zval *object, char *method_name, int method_len TSRMLS_DC)
+static union _zend_function *dbh_method_get(
+#if PHP_API_VERSION >= 20041225
+       zval **object_pp,
+#else
+       zval *object,
+#endif
+       char *method_name, int method_len TSRMLS_DC)
 {
        zend_function *fbc;
        char *lc_method_name;
+#if PHP_API_VERSION >= 20041225
+       zval *object = *object_pp;
+#endif
        pdo_dbh_t *dbh = zend_object_store_get_object(object TSRMLS_CC);
 
        lc_method_name = emalloc(method_len + 1);
index 8e0098956786cd073346e5a65633a2c35d2974aa..51c0fef392b9a16e3311a0aa4a637a856c9cdfd8 100755 (executable)
@@ -45,6 +45,7 @@ extern zend_class_entry *pdo_row_ce;
 void pdo_row_free_storage(zend_object *object TSRMLS_DC);
 extern zend_object_handlers pdo_row_object_handlers;
 
+zend_object_iterator *php_pdo_dbstmt_iter_get(zend_class_entry *ce, zval *object TSRMLS_DC);
 
 extern pdo_driver_t *pdo_find_driver(const char *name, int namelen);