]>
Commit | Line | Data |
---|---|---|
dcb8ab6c ER |
1 | diff -up php-5.2.17/ext/pdo/pdo_stmt.c.bug-55776 php-5.2.17/ext/pdo/pdo_stmt.c |
2 | --- php-5.2.17/ext/pdo/pdo_stmt.c.bug-55776 2012-02-16 08:41:58.000000000 +0700 | |
3 | +++ php-5.2.17/ext/pdo/pdo_stmt.c 2012-02-16 08:43:19.000000000 +0700 | |
4 | @@ -2353,6 +2353,7 @@ static zend_object_value dbstmt_clone_ob | |
5 | } | |
6 | ||
7 | zend_object_handlers pdo_dbstmt_object_handlers; | |
8 | +static int pdo_row_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC); | |
9 | ||
10 | void pdo_stmt_init(TSRMLS_D) | |
11 | { | |
12 | @@ -2376,6 +2377,7 @@ void pdo_stmt_init(TSRMLS_D) | |
13 | pdo_row_ce = zend_register_internal_class(&ce TSRMLS_CC); | |
14 | pdo_row_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; /* when removing this a lot of handlers need to be redone */ | |
15 | pdo_row_ce->create_object = pdo_row_new; | |
16 | + pdo_row_ce->serialize = pdo_row_serialize; | |
17 | } | |
18 | ||
19 | static void free_statement(pdo_stmt_t *stmt TSRMLS_DC) | |
20 | @@ -2795,6 +2797,12 @@ zend_object_value pdo_row_new(zend_class | |
21 | ||
22 | return retval; | |
23 | } | |
24 | + | |
25 | +static int pdo_row_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC) | |
26 | +{ | |
27 | + php_error_docref(NULL TSRMLS_CC, E_WARNING, "PDORow instances may not be serialized"); | |
28 | + return FAILURE; | |
29 | +} | |
30 | /* }}} */ | |
31 | ||
32 | /* |