@@ -2145,22 +2145,6 @@ static PHP_METHOD(PDOStatement, debugDumpParams)
2145
2145
}
2146
2146
/* }}} */
2147
2147
2148
- /* {{{ proto PDOStatement::__wakeup()
2149
- Prevents use of a PDOStatement instance that has been unserialized */
2150
- static PHP_METHOD (PDOStatement , __wakeup )
2151
- {
2152
- zend_throw_exception_ex (php_pdo_get_exception (), 0 , "You cannot serialize or unserialize PDOStatement instances" );
2153
- }
2154
- /* }}} */
2155
-
2156
- /* {{{ proto int PDOStatement::__sleep()
2157
- Prevents serialization of a PDOStatement instance */
2158
- static PHP_METHOD (PDOStatement , __sleep )
2159
- {
2160
- zend_throw_exception_ex (php_pdo_get_exception (), 0 , "You cannot serialize or unserialize PDOStatement instances" );
2161
- }
2162
- /* }}} */
2163
-
2164
2148
const zend_function_entry pdo_dbstmt_functions [] = {
2165
2149
PHP_ME (PDOStatement , execute , arginfo_pdostatement_execute , ZEND_ACC_PUBLIC )
2166
2150
PHP_ME (PDOStatement , fetch , arginfo_pdostatement_fetch , ZEND_ACC_PUBLIC )
@@ -2181,8 +2165,6 @@ const zend_function_entry pdo_dbstmt_functions[] = {
2181
2165
PHP_ME (PDOStatement , nextRowset , arginfo_pdostatement__void , ZEND_ACC_PUBLIC )
2182
2166
PHP_ME (PDOStatement , closeCursor , arginfo_pdostatement__void , ZEND_ACC_PUBLIC )
2183
2167
PHP_ME (PDOStatement , debugDumpParams , arginfo_pdostatement__void , ZEND_ACC_PUBLIC )
2184
- PHP_ME (PDOStatement , __wakeup , arginfo_pdostatement__void , ZEND_ACC_PUBLIC |ZEND_ACC_FINAL )
2185
- PHP_ME (PDOStatement , __sleep , arginfo_pdostatement__void , ZEND_ACC_PUBLIC |ZEND_ACC_FINAL )
2186
2168
PHP_FE_END
2187
2169
};
2188
2170
@@ -2283,6 +2265,8 @@ void pdo_stmt_init(void)
2283
2265
pdo_dbstmt_ce = zend_register_internal_class (& ce );
2284
2266
pdo_dbstmt_ce -> get_iterator = pdo_stmt_iter_get ;
2285
2267
pdo_dbstmt_ce -> create_object = pdo_dbstmt_new ;
2268
+ pdo_dbstmt_ce -> serialize = zend_class_serialize_deny ;
2269
+ pdo_dbstmt_ce -> unserialize = zend_class_unserialize_deny ;
2286
2270
zend_class_implements (pdo_dbstmt_ce , 1 , zend_ce_traversable );
2287
2271
zend_declare_property_null (pdo_dbstmt_ce , "queryString" , sizeof ("queryString" )- 1 , ZEND_ACC_PUBLIC );
2288
2272
0 commit comments