Skip to content

Commit 6b23264

Browse files
committed
Reverted change to function name and added note of why it is different from the class it is actually changing.
1 parent 9803fcc commit 6b23264

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ext/pdo/pdo_stmt.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ ZEND_END_ARG_INFO()
113113
RETURN_FALSE; \
114114
} \
115115

116-
static PHP_FUNCTION(dbrow_constructor) /* {{{ */
116+
//The class is called PDORow in userland, it is called PDOStatement in the manual.
117+
static PHP_FUNCTION(dbstmt_constructor) /* {{{ */
117118
{
118-
// php_error_docref(NULL, E_ERROR, "You should not create a PDOStatement manually");
119119
zend_throw_exception_ex(php_pdo_get_exception(), 0, "You may not create a PDORow manually");
120120
}
121121
/* }}} */
@@ -2641,7 +2641,8 @@ static union _zend_function *row_get_ctor(zend_object *object)
26412641
ctor.type = ZEND_INTERNAL_FUNCTION;
26422642
ctor.function_name = zend_string_init("__construct", sizeof("__construct") - 1, 0);
26432643
ctor.scope = pdo_row_ce;
2644-
ctor.handler = ZEND_FN(dbrow_constructor);
2644+
//The class is called PDORow in userland, it is called PDOStatement in the manual.
2645+
ctor.handler = ZEND_FN(dbstmt_constructor);
26452646
ctor.fn_flags = ZEND_ACC_PUBLIC;
26462647

26472648
return (union _zend_function*)&ctor;

0 commit comments

Comments
 (0)