[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/date/php_date.c branches/PHP_5_3/ext/date/tests/bug54340.phpt trunk/ext/date/php_date.c trunk/ext/date/tests/bug54340.phpt
aharvey Tue, 22 Mar 2011 08:33:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309535 Log: Fix bug #54340 (DateTime::add() method bug). Bug: http://bugs.php.net/54340 (Assigned) DateTime::add() method bug Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/date/php_date.c A php/php-src/branches/PHP_5_3/ext/date/tests/bug54340.phpt U php/php-src/trunk/ext/date/php_date.c A php/php-src/trunk/ext/date/tests/bug54340.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-03-22 08:27:33 UTC (rev 309534) +++ php/php-src/branches/PHP_5_3/NEWS 2011-03-22 08:33:22 UTC (rev 309535) @@ -10,6 +10,7 @@ (tomas dot brastavicius at quantum dot lt, Pierrick) - DateTime extension: + . Fixed bug #54340 (DateTime::add() method bug). (Adam) . Fixed bug #54316 (DateTime::createFromFormat does not handle trailing '|' correctly). (Adam) Modified: php/php-src/branches/PHP_5_3/ext/date/php_date.c === --- php/php-src/branches/PHP_5_3/ext/date/php_date.c2011-03-22 08:27:33 UTC (rev 309534) +++ php/php-src/branches/PHP_5_3/ext/date/php_date.c2011-03-22 08:33:22 UTC (rev 309535) @@ -2860,14 +2860,13 @@ if (intobj-diff-invert) { bias = -1; } + memset(dateobj-time-relative, 0, sizeof(struct timelib_rel_time)); dateobj-time-relative.y = intobj-diff-y * bias; dateobj-time-relative.m = intobj-diff-m * bias; dateobj-time-relative.d = intobj-diff-d * bias; dateobj-time-relative.h = intobj-diff-h * bias; dateobj-time-relative.i = intobj-diff-i * bias; dateobj-time-relative.s = intobj-diff-s * bias; - dateobj-time-relative.weekday = 0; - dateobj-time-relative.have_weekday_relative = 0; } dateobj-time-have_relative = 1; dateobj-time-sse_uptodate = 0; @@ -2907,6 +2906,7 @@ bias = -1; } + memset(dateobj-time-relative, 0, sizeof(struct timelib_rel_time)); dateobj-time-relative.y = 0 - (intobj-diff-y * bias); dateobj-time-relative.m = 0 - (intobj-diff-m * bias); dateobj-time-relative.d = 0 - (intobj-diff-d * bias); @@ -2914,8 +2914,6 @@ dateobj-time-relative.i = 0 - (intobj-diff-i * bias); dateobj-time-relative.s = 0 - (intobj-diff-s * bias); dateobj-time-have_relative = 1; - dateobj-time-relative.weekday = 0; - dateobj-time-relative.have_weekday_relative = 0; dateobj-time-sse_uptodate = 0; timelib_update_ts(dateobj-time, NULL); Added: php/php-src/branches/PHP_5_3/ext/date/tests/bug54340.phpt === --- php/php-src/branches/PHP_5_3/ext/date/tests/bug54340.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/date/tests/bug54340.phpt 2011-03-22 08:33:22 UTC (rev 309535) @@ -0,0 +1,43 @@ +--TEST-- +Bug #54340 (DateTime::add() method bug) +--INI-- +date.timezone=UTC +--FILE-- +?php +$interval = new DateInterval('P1D'); + +$dt = new DateTime('first day of January 2011'); +var_dump($dt); + +$dt-add($interval); +var_dump($dt); + +$dt = new DateTime('first day of January 2011'); + +$dt-sub($interval); +var_dump($dt); +--EXPECT-- +object(DateTime)#2 (3) { + [date]= + string(19) 2011-01-01 00:00:00 + [timezone_type]= + int(3) + [timezone]= + string(3) UTC +} +object(DateTime)#2 (3) { + [date]= + string(19) 2011-01-02 00:00:00 + [timezone_type]= + int(3) + [timezone]= + string(3) UTC +} +object(DateTime)#3 (3) { + [date]= + string(19) 2010-12-31 00:00:00 + [timezone_type]= + int(3) + [timezone]= + string(3) UTC +} Modified: php/php-src/trunk/ext/date/php_date.c === --- php/php-src/trunk/ext/date/php_date.c 2011-03-22 08:27:33 UTC (rev 309534) +++ php/php-src/trunk/ext/date/php_date.c 2011-03-22 08:33:22 UTC (rev 309535) @@ -2855,14 +2855,13 @@ if (intobj-diff-invert) { bias = -1; } + memset(dateobj-time-relative, 0, sizeof(struct timelib_rel_time)); dateobj-time-relative.y = intobj-diff-y * bias; dateobj-time-relative.m = intobj-diff-m * bias; dateobj-time-relative.d = intobj-diff-d * bias; dateobj-time-relative.h = intobj-diff-h * bias; dateobj-time-relative.i = intobj-diff-i * bias; dateobj-time-relative.s = intobj-diff-s * bias; - dateobj-time-relative.weekday = 0; - dateobj-time-relative.have_weekday_relative = 0; }
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pdo_pgsql/config.m4 trunk/ext/pdo_pgsql/config.m4
aharvey Tue, 22 Mar 2011 09:12:01 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309545 Log: Fix bug #54318 (Non-portable grep option used in PDO pgsql configuration). Patch by Ben Walton bwalton at artsci dot utoronto dot ca. Bug: http://bugs.php.net/54318 (Assigned) Non-portable grep option used in PDO pgsql configuration Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/pdo_pgsql/config.m4 U php/php-src/trunk/ext/pdo_pgsql/config.m4 Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-03-22 09:08:00 UTC (rev 309544) +++ php/php-src/branches/PHP_5_3/NEWS 2011-03-22 09:12:01 UTC (rev 309545) @@ -29,6 +29,10 @@ . Fixed bug #54167 (PDO_DBLIB returns null on SQLUNIQUE field). (mjh at hodginsmedia dot com, Felipe) +- PDO PostgreSQL driver: + . Fixed bug #54318 (Non-portable grep option used in PDO pgsql +configuration). (bwalton at artsci dot utoronto dot ca) + - SOAP extension: . Fixed bug #54312 (soap_version logic bug). (tom at samplonius dot org) Modified: php/php-src/branches/PHP_5_3/ext/pdo_pgsql/config.m4 === --- php/php-src/branches/PHP_5_3/ext/pdo_pgsql/config.m42011-03-22 09:08:00 UTC (rev 309544) +++ php/php-src/branches/PHP_5_3/ext/pdo_pgsql/config.m42011-03-22 09:12:01 UTC (rev 309545) @@ -69,7 +69,8 @@ AC_DEFINE(HAVE_PDO_PGSQL,1,[Whether to build PostgreSQL for PDO support or not]) AC_MSG_CHECKING([for openssl dependencies]) - if grep -q openssl $PGSQL_INCLUDE/libpq-fe.h ; then + grep openssl $PGSQL_INCLUDE/libpq-fe.h /dev/null 21 + if test $? -eq 0 ; then AC_MSG_RESULT([yes]) dnl First try to find pkg-config AC_PATH_PROG(PKG_CONFIG, pkg-config, no) Modified: php/php-src/trunk/ext/pdo_pgsql/config.m4 === --- php/php-src/trunk/ext/pdo_pgsql/config.m4 2011-03-22 09:08:00 UTC (rev 309544) +++ php/php-src/trunk/ext/pdo_pgsql/config.m4 2011-03-22 09:12:01 UTC (rev 309545) @@ -69,7 +69,8 @@ AC_DEFINE(HAVE_PDO_PGSQL,1,[Whether to build PostgreSQL for PDO support or not]) AC_MSG_CHECKING([for openssl dependencies]) - if grep -q openssl $PGSQL_INCLUDE/libpq-fe.h ; then + grep openssl $PGSQL_INCLUDE/libpq-fe.h /dev/null 21 + if test $? -eq 0 ; then AC_MSG_RESULT([yes]) dnl First try to find pkg-config AC_PATH_PROG(PKG_CONFIG, pkg-config, no) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_net.c branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c trunk/ext/mysqlnd/mysqlnd_net.c trunk/ext/mysqlnd/mysqlnd_wireprotocol.c
andrey Tue, 22 Mar 2011 12:22:16 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309553 Log: remove unneeded includes Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_net.c U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c U php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c U php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_net.c === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_net.c 2011-03-22 11:51:01 UTC (rev 309552) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_net.c 2011-03-22 12:22:16 UTC (rev 309553) @@ -24,7 +24,6 @@ #include mysqlnd_wireprotocol.h #include mysqlnd_statistics.h #include mysqlnd_debug.h -#include mysqlnd_block_alloc.h #include ext/standard/sha1.h #include php_network.h #include zend_ini.h Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c 2011-03-22 11:51:01 UTC (rev 309552) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c 2011-03-22 12:22:16 UTC (rev 309553) @@ -24,7 +24,6 @@ #include mysqlnd_wireprotocol.h #include mysqlnd_statistics.h #include mysqlnd_debug.h -#include mysqlnd_block_alloc.h #include ext/standard/sha1.h #include zend_ini.h Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c 2011-03-22 11:51:01 UTC (rev 309552) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c 2011-03-22 12:22:16 UTC (rev 309553) @@ -24,7 +24,6 @@ #include mysqlnd_wireprotocol.h #include mysqlnd_statistics.h #include mysqlnd_debug.h -#include mysqlnd_block_alloc.h #include ext/standard/sha1.h #include php_network.h #include zend_ini.h Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c2011-03-22 11:51:01 UTC (rev 309552) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c2011-03-22 12:22:16 UTC (rev 309553) @@ -24,7 +24,6 @@ #include mysqlnd_wireprotocol.h #include mysqlnd_statistics.h #include mysqlnd_debug.h -#include mysqlnd_block_alloc.h #include zend_ini.h #define MYSQLND_SILENT 1 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c trunk/ext/mysqlnd/mysqlnd_result.c
andrey Tue, 22 Mar 2011 12:54:02 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309557 Log: remove more unneeded includes Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c U php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c 2011-03-22 12:53:59 UTC (rev 309556) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c 2011-03-22 12:54:02 UTC (rev 309557) @@ -27,9 +27,7 @@ #include mysqlnd_result.h #include mysqlnd_result_meta.h #include mysqlnd_statistics.h -#include mysqlnd_charset.h #include mysqlnd_debug.h -#include ext/standard/basic_functions.h #define MYSQLND_SILENT Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c 2011-03-22 12:53:59 UTC (rev 309556) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c 2011-03-22 12:54:02 UTC (rev 309557) @@ -27,9 +27,7 @@ #include mysqlnd_result.h #include mysqlnd_result_meta.h #include mysqlnd_statistics.h -#include mysqlnd_charset.h #include mysqlnd_debug.h -#include ext/standard/basic_functions.h #define MYSQLND_SILENT -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/config9.m4 trunk/ext/mysqlnd/config9.m4
andrey Tue, 22 Mar 2011 14:39:36 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309561 Log: Fix message Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4 U php/php-src/trunk/ext/mysqlnd/config9.m4 Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4 === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4 2011-03-22 14:10:35 UTC (rev 309560) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/config9.m4 2011-03-22 14:39:36 UTC (rev 309561) @@ -5,7 +5,7 @@ PHP_ARG_ENABLE(disable_mysqlnd_compression_support, whether to disable compressed protocol support in mysqlnd, [ --disable-mysqlnd-compression-support -Enable support for the MySQL compressed protocol in mysqlnd], yes) +Disable support for the MySQL compressed protocol in mysqlnd], yes) if test -z $PHP_ZLIB_DIR; then PHP_ARG_WITH(zlib-dir, for the location of libz, Modified: php/php-src/trunk/ext/mysqlnd/config9.m4 === --- php/php-src/trunk/ext/mysqlnd/config9.m42011-03-22 14:10:35 UTC (rev 309560) +++ php/php-src/trunk/ext/mysqlnd/config9.m42011-03-22 14:39:36 UTC (rev 309561) @@ -5,7 +5,7 @@ PHP_ARG_ENABLE(disable_mysqlnd_compression_support, whether to disable compressed protocol support in mysqlnd, [ --disable-mysqlnd-compression-support -Enable support for the MySQL compressed protocol in mysqlnd], yes) +Disable support for the MySQL compressed protocol in mysqlnd], yes) if test -z $PHP_ZLIB_DIR; then PHP_ARG_WITH(zlib-dir, for the location of libz, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c trunk/ext/mysqlnd/mysqlnd_result.c
andrey Tue, 22 Mar 2011 14:39:58 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309562 Log: palloc is long dead, use more appropriate name Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c U php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c 2011-03-22 14:39:36 UTC (rev 309561) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c 2011-03-22 14:39:58 UTC (rev 309562) @@ -84,11 +84,11 @@ /* }}} */ -/* {{{ mysqlnd_palloc_zval_ptr_dtor */ -static -void mysqlnd_palloc_zval_ptr_dtor(zval **zv, enum_mysqlnd_res_type type, zend_bool * copy_ctor_called TSRMLS_DC) +/* {{{ mysqlnd_rset_zval_ptr_dtor */ +static void +mysqlnd_rset_zval_ptr_dtor(zval **zv, enum_mysqlnd_res_type type, zend_bool * copy_ctor_called TSRMLS_DC) { - DBG_ENTER(mysqlnd_palloc_zval_ptr_dtor); + DBG_ENTER(mysqlnd_rset_zval_ptr_dtor); if (!zv || !*zv) { *copy_ctor_called = FALSE; DBG_ERR_FMT(zv was NULL); @@ -158,7 +158,7 @@ DBG_INF_FMT(%u columns to free, result-field_count); for (i = 0; i result-field_count; i++) { - mysqlnd_palloc_zval_ptr_dtor((unbuf-last_row_data[i]), result-type, copy_ctor_called TSRMLS_CC); + mysqlnd_rset_zval_ptr_dtor((unbuf-last_row_data[i]), result-type, copy_ctor_called TSRMLS_CC); if (copy_ctor_called) { ++ctor_called_count; } @@ -212,7 +212,7 @@ for (col = field_count - 1; col = 0; --col) { if (current_row[col]) { zend_bool copy_ctor_called; - mysqlnd_palloc_zval_ptr_dtor((current_row[col]), result-type, copy_ctor_called TSRMLS_CC); + mysqlnd_rset_zval_ptr_dtor((current_row[col]), result-type, copy_ctor_called TSRMLS_CC); #if MYSQLND_DEBUG_MEMORY DBG_INF_FMT(Copy_ctor_called=%u, copy_ctor_called); #endif Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c 2011-03-22 14:39:36 UTC (rev 309561) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c 2011-03-22 14:39:58 UTC (rev 309562) @@ -83,11 +83,11 @@ /* }}} */ -/* {{{ mysqlnd_palloc_zval_ptr_dtor */ -static -void mysqlnd_palloc_zval_ptr_dtor(zval **zv, enum_mysqlnd_res_type type, zend_bool * copy_ctor_called TSRMLS_DC) +/* {{{ mysqlnd_rset_zval_ptr_dtor */ +static void +mysqlnd_rset_zval_ptr_dtor(zval **zv, enum_mysqlnd_res_type type, zend_bool * copy_ctor_called TSRMLS_DC) { - DBG_ENTER(mysqlnd_palloc_zval_ptr_dtor); + DBG_ENTER(mysqlnd_rset_zval_ptr_dtor); if (!zv || !*zv) { *copy_ctor_called = FALSE; DBG_ERR_FMT(zv was NULL); @@ -155,7 +155,7 @@ MYSQLND_STATS *global_stats = result-conn? result-conn-stats:NULL; for (i = 0; i result-field_count; i++) { - mysqlnd_palloc_zval_ptr_dtor((unbuf-last_row_data[i]), result-type, copy_ctor_called TSRMLS_CC); + mysqlnd_rset_zval_ptr_dtor((unbuf-last_row_data[i]), result-type, copy_ctor_called TSRMLS_CC); if (copy_ctor_called) { ++ctor_called_count; } @@ -207,7 +207,7 @@ for (col = field_count - 1; col = 0; --col) { if (current_row[col]) { zend_bool copy_ctor_called; - mysqlnd_palloc_zval_ptr_dtor((current_row[col]), result-type, copy_ctor_called TSRMLS_CC); + mysqlnd_rset_zval_ptr_dtor((current_row[col]), result-type, copy_ctor_called TSRMLS_CC); if (copy_ctor_called) { ++copy_on_write_performed; } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /SVNROOT/ global_avail
rasmus Tue, 22 Mar 2011 17:26:02 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309568 Log: systems karma for Daniel Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail2011-03-22 16:59:30 UTC (rev 309567) +++ SVNROOT/global_avail2011-03-22 17:26:02 UTC (rev 309568) @@ -128,7 +128,7 @@ avail|changelog|php/php-src,gtk/php-gtk # Some people have access to change the day-to-day code on the various php.net machines -avail|imajes,edink,derick,sfox,wez,goba,mj,pajoye,bjori,philip|systems +avail|imajes,edink,derick,sfox,wez,goba,mj,pajoye,bjori,philip,danbrown|systems # Finally, there are various people with access to various bits and # pieces of other SVN modules. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/spl/spl_iterators.c branches/PHP_5_3/ext/spl/tests/bug54281.phpt trunk/ext/spl/spl_iterators.c trunk/ext/spl/tests/bug54281.phpt
felipe Tue, 22 Mar 2011 22:41:16 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309577 Log: - Fixed bug #54281 (Crash in non-initialized RecursiveIteratorIterator) Bug: http://bugs.php.net/54281 (error getting bug information) Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/spl/spl_iterators.c A php/php-src/branches/PHP_5_3/ext/spl/tests/bug54281.phpt U php/php-src/trunk/ext/spl/spl_iterators.c A php/php-src/trunk/ext/spl/tests/bug54281.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-03-22 22:21:51 UTC (rev 309576) +++ php/php-src/branches/PHP_5_3/NEWS 2011-03-22 22:41:16 UTC (rev 309577) @@ -42,6 +42,8 @@ - SPL extension: . Fixed bug #54291 (Crash iterating DirectoryIterator for dir name starting with \0). (Gustavo) + . Fixed bug #54281 (Crash in non-initialized RecursiveIteratorIterator). +(Felipe) 17 Mar 2011, PHP 5.3.6 - Upgraded bundled Sqlite3 to version 3.7.4. (Ilia) Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_iterators.c === --- php/php-src/branches/PHP_5_3/ext/spl/spl_iterators.c2011-03-22 22:21:51 UTC (rev 309576) +++ php/php-src/branches/PHP_5_3/ext/spl/spl_iterators.c2011-03-22 22:41:16 UTC (rev 309577) @@ -360,6 +360,10 @@ static void spl_recursive_it_rewind_ex(spl_recursive_it_object *object, zval *zthis TSRMLS_DC) { zend_object_iterator *sub_iter; + + if (!object-iterators) { + php_error_docref(NULL TSRMLS_CC, E_ERROR, The %s instance wasn't initialized properly, Z_OBJCE_P(zthis)-name); + } while (object-level) { sub_iter = object-iterators[object-level].iterator; Added: php/php-src/branches/PHP_5_3/ext/spl/tests/bug54281.phpt === --- php/php-src/branches/PHP_5_3/ext/spl/tests/bug54281.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/spl/tests/bug54281.phpt2011-03-22 22:41:16 UTC (rev 309577) @@ -0,0 +1,15 @@ +--TEST-- +Bug #54281 (Crash in spl_recursive_it_rewind_ex) +--FILE-- +?php + +class RecursiveArrayIteratorIterator extends RecursiveIteratorIterator { + function __construct($it, $max_depth) { } +} +$it = new RecursiveArrayIteratorIterator(new RecursiveArrayIterator(array()), 2); + +foreach($it as $k=$v) { } + +? +--EXPECTF-- +Fatal error: RecursiveIteratorIterator::rewind(): The RecursiveArrayIteratorIterator instance wasn't initialized properly in %s on line %d Modified: php/php-src/trunk/ext/spl/spl_iterators.c === --- php/php-src/trunk/ext/spl/spl_iterators.c 2011-03-22 22:21:51 UTC (rev 309576) +++ php/php-src/trunk/ext/spl/spl_iterators.c 2011-03-22 22:41:16 UTC (rev 309577) @@ -360,6 +360,10 @@ static void spl_recursive_it_rewind_ex(spl_recursive_it_object *object, zval *zthis TSRMLS_DC) { zend_object_iterator *sub_iter; + + if (!object-iterators) { + php_error_docref(NULL TSRMLS_CC, E_ERROR, The %s instance wasn't initialized properly, Z_OBJCE_P(zthis)-name); + } while (object-level) { sub_iter = object-iterators[object-level].iterator; Added: php/php-src/trunk/ext/spl/tests/bug54281.phpt === --- php/php-src/trunk/ext/spl/tests/bug54281.phpt (rev 0) +++ php/php-src/trunk/ext/spl/tests/bug54281.phpt 2011-03-22 22:41:16 UTC (rev 309577) @@ -0,0 +1,15 @@ +--TEST-- +Bug #54281 (Crash in spl_recursive_it_rewind_ex) +--FILE-- +?php + +class RecursiveArrayIteratorIterator extends RecursiveIteratorIterator { + function __construct($it, $max_depth) { } +} +$it = new RecursiveArrayIteratorIterator(new RecursiveArrayIterator(array()), 2); + +foreach($it as $k=$v) { } + +? +--EXPECTF-- +Fatal error: RecursiveIteratorIterator::rewind(): The RecursiveArrayIteratorIterator instance wasn't initialized properly in %s on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/sockets/sockets.c branches/PHP_5_3/ext/sockets/tests/socket_strerror.phpt branches/PHP_5_3/main/network.c trunk/UPGRADING
cataphract Wed, 23 Mar 2011 00:51:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309579 Log: - Updating UPGRADING for r309516 and modest merge to 5.3. Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/sockets/sockets.c U php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_strerror.phpt U php/php-src/branches/PHP_5_3/main/network.c U php/php-src/trunk/UPGRADING Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-03-23 00:01:17 UTC (rev 309578) +++ php/php-src/branches/PHP_5_3/NEWS 2011-03-23 00:51:22 UTC (rev 309579) @@ -37,6 +37,8 @@ . Fixed bug #54312 (soap_version logic bug). (tom at samplonius dot org) - Sockets extension: + . Changed socket_set_block() and socket_set_nonblock() so they emit warnings +on error. (Gustavo) . Fixed bug #51958 (socket_accept() fails on IPv6 server sockets). (Gustavo) - SPL extension: Modified: php/php-src/branches/PHP_5_3/ext/sockets/sockets.c === --- php/php-src/branches/PHP_5_3/ext/sockets/sockets.c 2011-03-23 00:01:17 UTC (rev 309578) +++ php/php-src/branches/PHP_5_3/ext/sockets/sockets.c 2011-03-23 00:51:22 UTC (rev 309579) @@ -916,8 +916,10 @@ if (php_set_sock_blocking(php_sock-bsd_socket, 0 TSRMLS_CC) == SUCCESS) { php_sock-blocking = 0; RETURN_TRUE; + } else { + PHP_SOCKET_ERROR(php_sock, unable to set nonblocking mode, errno); + RETURN_FALSE; } - RETURN_FALSE; } /* }}} */ @@ -937,8 +939,10 @@ if (php_set_sock_blocking(php_sock-bsd_socket, 1 TSRMLS_CC) == SUCCESS) { php_sock-blocking = 1; RETURN_TRUE; + } else { + PHP_SOCKET_ERROR(php_sock, unable to set blocking mode, errno); + RETURN_FALSE; } - RETURN_FALSE; } /* }}} */ Modified: php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_strerror.phpt === --- php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_strerror.phpt 2011-03-23 00:01:17 UTC (rev 309578) +++ php/php-src/branches/PHP_5_3/ext/sockets/tests/socket_strerror.phpt 2011-03-23 00:51:22 UTC (rev 309579) @@ -154,4 +154,4 @@ string(27) Key was rejected by service string(10) Owner died string(21) State not recoverable -string(17) Unknown error 132 +string(37) Operation not possible due to RF-kill Modified: php/php-src/branches/PHP_5_3/main/network.c === --- php/php-src/branches/PHP_5_3/main/network.c 2011-03-23 00:01:17 UTC (rev 309578) +++ php/php-src/branches/PHP_5_3/main/network.c 2011-03-23 00:51:22 UTC (rev 309579) @@ -1095,7 +1095,9 @@ } else { flags = ~myflag; } - fcntl(socketd, F_SETFL, flags); + if (fcntl(socketd, F_SETFL, flags) == -1) { + ret = FAILURE; + } #endif return ret; } Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2011-03-23 00:01:17 UTC (rev 309578) +++ php/php-src/trunk/UPGRADING 2011-03-23 00:51:22 UTC (rev 309579) @@ -330,6 +330,7 @@ - http_response_code() - trait_exists() - stream_set_chunk_size() + - socket_import_stream() f. New global constants -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/date/php_date.c branches/PHP_5_3/ext/date/tests/bug54283.phpt trunk/ext/date/php_date.c trunk/ext/date/tests/bug54283.phpt
felipe Wed, 23 Mar 2011 01:22:18 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309580 Log: - Fixed bug #54283 (new DatePeriod(NULL) causes crash) Bug: http://bugs.php.net/54283 (error getting bug information) Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/date/php_date.c A php/php-src/branches/PHP_5_3/ext/date/tests/bug54283.phpt U php/php-src/trunk/ext/date/php_date.c A php/php-src/trunk/ext/date/tests/bug54283.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-03-23 00:51:22 UTC (rev 309579) +++ php/php-src/branches/PHP_5_3/NEWS 2011-03-23 01:22:18 UTC (rev 309580) @@ -13,6 +13,7 @@ . Fixed bug #54340 (DateTime::add() method bug). (Adam) . Fixed bug #54316 (DateTime::createFromFormat does not handle trailing '|' correctly). (Adam) + . Fixed bug #54283 (new DatePeriod(NULL) causes crash). (Felipe) - DBA extension: . Fixed bug #54242 (dba_insert returns true if key already exists). (Felipe) Modified: php/php-src/branches/PHP_5_3/ext/date/php_date.c === --- php/php-src/branches/PHP_5_3/ext/date/php_date.c2011-03-23 00:51:22 UTC (rev 309579) +++ php/php-src/branches/PHP_5_3/ext/date/php_date.c2011-03-23 01:22:18 UTC (rev 309580) @@ -3767,7 +3767,7 @@ dpobj = zend_object_store_get_object(getThis() TSRMLS_CC); dpobj-current = NULL; - if (isostr_len) { + if (isostr) { date_period_initialize((dpobj-start), (dpobj-end), (dpobj-interval), recurrences, isostr, isostr_len TSRMLS_CC); if (dpobj-start == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, The ISO interval '%s' did not contain a start date., isostr); Added: php/php-src/branches/PHP_5_3/ext/date/tests/bug54283.phpt === --- php/php-src/branches/PHP_5_3/ext/date/tests/bug54283.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/date/tests/bug54283.phpt 2011-03-23 01:22:18 UTC (rev 309580) @@ -0,0 +1,14 @@ +--TEST-- +Bug #54283 (new DatePeriod(NULL) causes crash) +--FILE-- +?php + +try { + var_dump(new DatePeriod(NULL)); +} catch (Exception $e) { + var_dump($e-getMessage()); +} + +? +--EXPECTF-- +string(51) DatePeriod::__construct(): Unknown or bad format () Modified: php/php-src/trunk/ext/date/php_date.c === --- php/php-src/trunk/ext/date/php_date.c 2011-03-23 00:51:22 UTC (rev 309579) +++ php/php-src/trunk/ext/date/php_date.c 2011-03-23 01:22:18 UTC (rev 309580) @@ -3762,7 +3762,7 @@ dpobj = zend_object_store_get_object(getThis() TSRMLS_CC); dpobj-current = NULL; - if (isostr_len) { + if (isostr) { date_period_initialize((dpobj-start), (dpobj-end), (dpobj-interval), recurrences, isostr, isostr_len TSRMLS_CC); if (dpobj-start == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, The ISO interval '%s' did not contain a start date., isostr); Added: php/php-src/trunk/ext/date/tests/bug54283.phpt === --- php/php-src/trunk/ext/date/tests/bug54283.phpt (rev 0) +++ php/php-src/trunk/ext/date/tests/bug54283.phpt 2011-03-23 01:22:18 UTC (rev 309580) @@ -0,0 +1,14 @@ +--TEST-- +Bug #54283 (new DatePeriod(NULL) causes crash) +--FILE-- +?php + +try { + var_dump(new DatePeriod(NULL)); +} catch (Exception $e) { + var_dump($e-getMessage()); +} + +? +--EXPECTF-- +string(51) DatePeriod::__construct(): Unknown or bad format () -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php