Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Fixed bug #42452 (PDO classes do not expose Reflection API informat…

…ion)

- Fixed tests
  • Loading branch information...
commit 2fc92c9172b407658850296db220deef6387e674 1 parent d0d1e42
Hannes Magnusson bjori authored
3  NEWS
View
@@ -3,6 +3,9 @@ PHP NEWS
?? ??? 20??, PHP 5.2.5
- Added optional parameter $provide_object to debug_backtrace(). (Sebastian)
+- Fixed bug #42452 (PDO classes do not expose Reflection API information).
+ (Hannes)
+
30 Aug 2007, PHP 5.2.4
- Removed --enable-versioning configure option. (Jani)
44 ext/pdo/pdo_dbh.c
View
@@ -1130,20 +1130,50 @@ static PHP_METHOD(PDO, getAvailableDrivers)
}
/* }}} */
+/* {{{ arginfo */
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pdo___construct, 0, 0, 3)
+ ZEND_ARG_INFO(0, dsn)
+ ZEND_ARG_INFO(0, username)
+ ZEND_ARG_INFO(0, passwd)
+ ZEND_ARG_INFO(0, options) /* array */
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pdo_prepare, 0, 0, 1)
+ ZEND_ARG_INFO(0, statment)
+ ZEND_ARG_INFO(0, options) /* array */
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO(arginfo_pdo_setattribute, 0)
+ ZEND_ARG_INFO(0, attribute)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO(arginfo_pdo_getattribute, 0)
+ ZEND_ARG_INFO(0, attribute)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO(arginfo_pdo_exec, 0)
+ ZEND_ARG_INFO(0, query)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pdo_lastinsertid, 0, 0, 0)
+ ZEND_ARG_INFO(0, seqname)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pdo_quote, 0, 0, 1)
+ ZEND_ARG_INFO(0, string)
+ ZEND_ARG_INFO(0, paramtype)
+ZEND_END_ARG_INFO()
+/* }}} */
+
zend_function_entry pdo_dbh_functions[] = {
- ZEND_MALIAS(PDO, __construct, dbh_constructor, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDO, prepare, NULL, ZEND_ACC_PUBLIC)
+ ZEND_MALIAS(PDO, __construct, dbh_constructor, arginfo_pdo___construct, ZEND_ACC_PUBLIC)
+ PHP_ME(PDO, prepare, arginfo_pdo_prepare, ZEND_ACC_PUBLIC)
PHP_ME(PDO, beginTransaction, NULL, ZEND_ACC_PUBLIC)
PHP_ME(PDO, commit, NULL, ZEND_ACC_PUBLIC)
PHP_ME(PDO, rollBack, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDO, setAttribute, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDO, exec, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(PDO, setAttribute, arginfo_pdo_setattribute, ZEND_ACC_PUBLIC)
+ PHP_ME(PDO, exec, arginfo_pdo_exec, ZEND_ACC_PUBLIC)
PHP_ME(PDO, query, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDO, lastInsertId, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(PDO, lastInsertId, arginfo_pdo_lastinsertid, ZEND_ACC_PUBLIC)
PHP_ME(PDO, errorCode, NULL, ZEND_ACC_PUBLIC)
PHP_ME(PDO, errorInfo, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDO, getAttribute, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDO, quote, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(PDO, getAttribute, arginfo_pdo_getattribute, ZEND_ACC_PUBLIC)
+ PHP_ME(PDO, quote, arginfo_pdo_quote, ZEND_ACC_PUBLIC)
PHP_ME(PDO, __wakeup, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
PHP_ME(PDO, __sleep, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
PHP_ME(PDO, getAvailableDrivers, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
98 ext/pdo/pdo_stmt.c
View
@@ -37,37 +37,61 @@
#include "zend_interfaces.h"
#include "php_memory_streams.h"
-#if COMPILE_DL_PDO
-/* {{{ content from zend_arg_defs.c:
- * since it is a .c file, it won't be installed for use by PECL extensions, so we include it here. */
-ZEND_BEGIN_ARG_INFO(first_arg_force_ref, 0)
- ZEND_ARG_PASS_INFO(1)
+/* {{{ arginfo */
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pdostatement_execute, 0, 0, 0)
+ ZEND_ARG_INFO(0, bound_input_params) /* array */
ZEND_END_ARG_INFO()
-
-
-ZEND_BEGIN_ARG_INFO(second_arg_force_ref, 0)
- ZEND_ARG_PASS_INFO(0)
- ZEND_ARG_PASS_INFO(1)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pdostatement_fetch, 0, 0, 0)
+ ZEND_ARG_INFO(0, how)
+ ZEND_ARG_INFO(0, orientation)
+ ZEND_ARG_INFO(0, offset)
ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(third_arg_force_ref, 0)
- ZEND_ARG_PASS_INFO(0)
- ZEND_ARG_PASS_INFO(0)
- ZEND_ARG_PASS_INFO(1)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pdostatement_fetchobject, 0, 0, 1)
+ ZEND_ARG_INFO(0, class_name)
+ ZEND_ARG_INFO(0, ctor_args) /* array */
ZEND_END_ARG_INFO()
-
-
-ZEND_BEGIN_ARG_INFO(fourth_arg_force_ref, 0)
- ZEND_ARG_PASS_INFO(0)
- ZEND_ARG_PASS_INFO(0)
- ZEND_ARG_PASS_INFO(0)
- ZEND_ARG_PASS_INFO(1)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pdostatement_fetchcolumn, 0, 0, 0)
+ ZEND_ARG_INFO(0, column_number)
ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(all_args_by_ref, 1)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pdostatement_fetchall, 0, 0, 0)
+ ZEND_ARG_INFO(0, how)
+ ZEND_ARG_INFO(0, class_name)
+ ZEND_ARG_INFO(0, ctor_args) /* array */
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pdostatement_bindvalue, 0, 0, 2)
+ ZEND_ARG_INFO(0, paramno)
+ ZEND_ARG_INFO(0, param)
+ ZEND_ARG_INFO(0, type)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pdostatement_bindparam, 0, 0, 2)
+ ZEND_ARG_INFO(0, paramno)
+ ZEND_ARG_INFO(1, param)
+ ZEND_ARG_INFO(0, type)
+ ZEND_ARG_INFO(0, maxlen)
+ ZEND_ARG_INFO(0, driverdata)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pdostatement_bindcolumn, 0, 0, 2)
+ ZEND_ARG_INFO(0, column)
+ ZEND_ARG_INFO(1, param)
+ ZEND_ARG_INFO(0, type)
+ ZEND_ARG_INFO(0, maxlen)
+ ZEND_ARG_INFO(0, driverdata)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO(arginfo_pdostatement_setattribute, 0)
+ ZEND_ARG_INFO(0, attribute)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO(arginfo_pdostatement_getattribute, 0)
+ ZEND_ARG_INFO(0, attribute)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO(arginfo_pdostatement_getcolumnmeta, 0)
+ ZEND_ARG_INFO(0, column)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pdostatement_setfetchmode, 0, 0, 1)
+ ZEND_ARG_INFO(0, mode)
+ ZEND_ARG_INFO(0, params)
ZEND_END_ARG_INFO()
/* }}} */
-#endif
#define PHP_STMT_GET_OBJ \
pdo_stmt_t *stmt = (pdo_stmt_t*)zend_object_store_get_object(getThis() TSRMLS_CC); \
@@ -2120,22 +2144,22 @@ static PHP_METHOD(PDOStatement, __sleep)
/* }}} */
zend_function_entry pdo_dbstmt_functions[] = {
- PHP_ME(PDOStatement, execute, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDOStatement, fetch, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDOStatement, bindParam, second_arg_force_ref, ZEND_ACC_PUBLIC)
- PHP_ME(PDOStatement, bindColumn, second_arg_force_ref, ZEND_ACC_PUBLIC)
- PHP_ME(PDOStatement, bindValue, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(PDOStatement, execute, arginfo_pdostatement_execute, ZEND_ACC_PUBLIC)
+ PHP_ME(PDOStatement, fetch, arginfo_pdostatement_fetch, ZEND_ACC_PUBLIC)
+ PHP_ME(PDOStatement, bindParam, arginfo_pdostatement_bindparam, ZEND_ACC_PUBLIC)
+ PHP_ME(PDOStatement, bindColumn, arginfo_pdostatement_bindcolumn, ZEND_ACC_PUBLIC)
+ PHP_ME(PDOStatement, bindValue, arginfo_pdostatement_bindvalue, ZEND_ACC_PUBLIC)
PHP_ME(PDOStatement, rowCount, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDOStatement, fetchColumn, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDOStatement, fetchAll, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDOStatement, fetchObject, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(PDOStatement, fetchColumn, arginfo_pdostatement_fetchcolumn, ZEND_ACC_PUBLIC)
+ PHP_ME(PDOStatement, fetchAll, arginfo_pdostatement_fetchall, ZEND_ACC_PUBLIC)
+ PHP_ME(PDOStatement, fetchObject, arginfo_pdostatement_fetchobject, ZEND_ACC_PUBLIC)
PHP_ME(PDOStatement, errorCode, NULL, ZEND_ACC_PUBLIC)
PHP_ME(PDOStatement, errorInfo, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDOStatement, setAttribute, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDOStatement, getAttribute, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(PDOStatement, setAttribute, arginfo_pdostatement_setattribute, ZEND_ACC_PUBLIC)
+ PHP_ME(PDOStatement, getAttribute, arginfo_pdostatement_getattribute, ZEND_ACC_PUBLIC)
PHP_ME(PDOStatement, columnCount, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDOStatement, getColumnMeta, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(PDOStatement, setFetchMode, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(PDOStatement, getColumnMeta, arginfo_pdostatement_getcolumnmeta, ZEND_ACC_PUBLIC)
+ PHP_ME(PDOStatement, setFetchMode, arginfo_pdostatement_setfetchmode, ZEND_ACC_PUBLIC)
PHP_ME(PDOStatement, nextRowset, NULL, ZEND_ACC_PUBLIC)
PHP_ME(PDOStatement, closeCursor, NULL, ZEND_ACC_PUBLIC)
PHP_ME(PDOStatement, debugDumpParams, NULL, ZEND_ACC_PUBLIC)
2  ext/pdo/tests/pdo_029.phpt
View
@@ -34,7 +34,7 @@ class PDOStatementX extends PDOStatement
echo __METHOD__ . "()\n";
}
- function execute()
+ function execute($params = array())
{
echo __METHOD__ . "()\n";
parent::execute();
2  ext/pdo/tests/pdo_030.phpt
View
@@ -35,7 +35,7 @@ class PDOStatementX extends PDOStatement
echo __METHOD__ . "()\n";
}
- function execute()
+ function execute($params = array())
{
echo __METHOD__ . "()\n";
parent::execute();
Please sign in to comment.
Something went wrong with that request. Please try again.