johannes Sun, 25 Sep 2011 12:39:05 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=317272
Log: - Fix bug #55776 (PDORow to session bug) Bug: https://bugs.php.net/55776 (Open) PDORow to session bug Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c U php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c U php/php-src/trunk/ext/pdo/pdo_stmt.c Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2011-09-25 12:14:09 UTC (rev 317271) +++ php/php-src/branches/PHP_5_3/NEWS 2011-09-25 12:39:05 UTC (rev 317272) @@ -46,6 +46,9 @@ . Fixed bug #55067 (MySQL doesn't support compression - wrong config option). (Andrey) +- PDO + . Fixed bug #55776 (PDORow to session bug). (Johannes) + - PDO MySQL driver: . Fixed bug #54158 (MYSQLND+PDO MySQL requires #define MYSQL_OPT_LOCAL_INFILE) (Andrey) Modified: php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c 2011-09-25 12:14:09 UTC (rev 317271) +++ php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c 2011-09-25 12:39:05 UTC (rev 317272) @@ -2351,6 +2351,7 @@ } zend_object_handlers pdo_dbstmt_object_handlers; +static int pdo_row_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC); void pdo_stmt_init(TSRMLS_D) { @@ -2374,6 +2375,7 @@ pdo_row_ce = zend_register_internal_class(&ce TSRMLS_CC); pdo_row_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; /* when removing this a lot of handlers need to be redone */ pdo_row_ce->create_object = pdo_row_new; + pdo_row_ce->serialize = pdo_row_serialize; } static void free_statement(pdo_stmt_t *stmt TSRMLS_DC) @@ -2797,6 +2799,12 @@ return retval; } + +static int pdo_row_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC) +{ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "PDORow instances may not be serialized"); + return FAILURE; +} /* }}} */ /* Modified: php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c =================================================================== --- php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c 2011-09-25 12:14:09 UTC (rev 317271) +++ php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c 2011-09-25 12:39:05 UTC (rev 317272) @@ -2339,6 +2339,7 @@ } zend_object_handlers pdo_dbstmt_object_handlers; +static int pdo_row_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC); void pdo_stmt_init(TSRMLS_D) { @@ -2362,6 +2363,7 @@ pdo_row_ce = zend_register_internal_class(&ce TSRMLS_CC); pdo_row_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; /* when removing this a lot of handlers need to be redone */ pdo_row_ce->create_object = pdo_row_new; + pdo_row_ce->serialize = pdo_row_serialize; } static void free_statement(pdo_stmt_t *stmt TSRMLS_DC) @@ -2802,6 +2804,12 @@ return retval; } + +static int pdo_row_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC) +{ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "PDORow instances may not be serialized"); + return FAILURE; +} /* }}} */ /* Modified: php/php-src/trunk/ext/pdo/pdo_stmt.c =================================================================== --- php/php-src/trunk/ext/pdo/pdo_stmt.c 2011-09-25 12:14:09 UTC (rev 317271) +++ php/php-src/trunk/ext/pdo/pdo_stmt.c 2011-09-25 12:39:05 UTC (rev 317272) @@ -2339,6 +2339,7 @@ } zend_object_handlers pdo_dbstmt_object_handlers; +static int pdo_row_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC); void pdo_stmt_init(TSRMLS_D) { @@ -2362,6 +2363,7 @@ pdo_row_ce = zend_register_internal_class(&ce TSRMLS_CC); pdo_row_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; /* when removing this a lot of handlers need to be redone */ pdo_row_ce->create_object = pdo_row_new; + pdo_row_ce->serialize = pdo_row_serialize; } static void free_statement(pdo_stmt_t *stmt TSRMLS_DC) @@ -2802,6 +2804,12 @@ return retval; } + +static int pdo_row_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC) +{ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "PDORow instances may not be serialized"); + return FAILURE; +} /* }}} */ /*
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php