HOT CLIENT NEEDS Sr. Network Administrator IN Washington, DC NEED ASAP
New submission from Thomas Pelle Jakobsen [EMAIL PROTECTED]: Currently, the BuildBot is only set up with linux slaves. It would be nice to have an extensive test environment, e.g. including build slaves running on WinXP, Vista, Mac, Linux with various versions of Python, Twisted, etc. It has been suggested to use the three laptops from the Danisco auction as test servers. These could each be set up to run multiple VMWare images each. -- importance: 25.0 messages: 188 nosy: mas, mk, pagter priority: wish status: unread title: Extensive test environment VIFF Issue Tracker [EMAIL PROTECTED] http://tracker.viff.dk/issue64 ___ viff-devel mailing list (http://viff.dk/) viff-devel@viff.dk http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk
[PHP-CVS] cvs: php-src /ext/standard/tests/array array_intersect_key_error.phpt array_intersect_key_variation1.phpt array_intersect_key_variation2.phpt array_intersect_key_variation3.phpt array_inters
smantoorThu Sep 11 10:41:01 2008 UTC Added files: /php-src/ext/standard/tests/array array_intersect_key_variation2.phpt array_intersect_key_variation3.phpt array_intersect_key_error.phpt array_intersect_key_variation4.phpt array_intersect_key_variation5.phpt array_intersect_key_variation6.phpt array_intersect_key_variation7.phpt array_intersect_key_variation8.phpt array_intersect_key_variation1.phpt Log: New testcases for array_intersect_key() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_intersect_key_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_intersect_key_variation2.phpt +++ php-src/ext/standard/tests/array/array_intersect_key_variation2.phpt --TEST-- Test array_intersect_key() function : usage variation - Passing unexpected values to second argument --FILE-- ?php /* Prototype : array array_intersect_key(array arr1, array arr2 [, array ...]) * Description: Returns the entries of arr1 that have keys which are present in all the other arguments. * Source code: ext/standard/array.c */ echo *** Testing array_intersect_key() : usage variation ***\n; // Initialise function arguments not being substituted (if any) $array1 = array('blue' = 1, 'red' = 2, 'green' = 3, 'purple' = 4); $array3 = array('green' = 5, 'blue' = 6, 'yellow' = 7, 'cyan' = 8); //get an unset variable $unset_var = 10; unset ($unset_var); //resource variable $fp = fopen(__FILE__, r); // define some classes class classWithToString { public function __toString() { return Class A object; } } class classWithoutToString { } // heredoc string $heredoc = EOT hello world EOT; // add arrays $index_array = array (1, 2, 3); $assoc_array = array ('one' = 1, 'two' = 2); //array of values to iterate over $inputs = array( // int data 'int 0' = 0, 'int 1' = 1, 'int 12345' = 12345, 'int -12345' = -12345, // float data 'float 10.5' = 10.5, 'float -10.5' = -10.5, 'float 12.3456789000e10' = 12.3456789000e10, 'float -12.3456789000e10' = -12.3456789000e10, 'float .5' = .5, // null data 'uppercase NULL' = NULL, 'lowercase null' = null, // boolean data 'lowercase true' = true, 'lowercase false' =false, 'uppercase TRUE' =TRUE, 'uppercase FALSE' =FALSE, // empty data 'empty string DQ' = , 'empty string SQ' = '', // string data 'string DQ' = string, 'string SQ' = 'string', 'mixed case string' = sTrInG, 'heredoc' = $heredoc, // object data 'instance of classWithToString' = new classWithToString(), 'instance of classWithoutToString' = new classWithoutToString(), // undefined data 'undefined var' = @$undefined_var, // unset data 'unset var' = @$unset_var, // resource data 'resource var' = $fp, ); // loop through each element of the array for arr2 foreach($inputs as $key =$value) { echo \n--$key--\n; var_dump( array_intersect_key($array1, $value) ); var_dump( array_intersect_key($array1, $value, $array3) ); } fclose($fp); ? ===DONE=== --EXPECTF-- *** Testing array_intersect_key() : usage variation *** --int 0-- Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d NULL Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d NULL --int 1-- Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d NULL Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d NULL --int 12345-- Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d NULL Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d NULL --int -12345-- Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d NULL Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d NULL --float 10.5-- Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d NULL Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d NULL --float -10.5-- Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d NULL Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d NULL --float 12.3456789000e10-- Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d NULL Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d NULL --float -12.3456789000e10-- Warning:
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_intersect_key_error.phpt array_intersect_key_variation1.phpt array_intersect_key_variation2.phpt array_intersect_key_variation3.phpt arr
smantoorThu Sep 11 10:48:12 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array array_intersect_key_variation8.phpt array_intersect_key_error.phpt array_intersect_key_variation1.phpt array_intersect_key_variation2.phpt array_intersect_key_variation3.phpt array_intersect_key_variation4.phpt array_intersect_key_variation5.phpt array_intersect_key_variation6.phpt array_intersect_key_variation7.phpt Log: New testcases for array_intersect_key() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_intersect_key_variation8.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_intersect_key_variation8.phpt +++ php-src/ext/standard/tests/array/array_intersect_key_variation8.phpt --TEST-- Test array_intersect_key() function : usage variation - Passing Multi dimensional array --FILE-- ?php /* Prototype : array array_intersect_key(array arr1, array arr2 [, array ...]) * Description: Returns the entries of arr1 that have keys which are present in all the other arguments. * Source code: ext/standard/array.c */ echo *** Testing array_intersect_key() : usage variation ***\n; /// Initialise function arguments not being substituted (if any) $array1 = array( 'first' = array('blue' = 1, 'red' = 2), 'second' = array('yellow' = 7), 'third' = array(0 ='zero'), ); $array2 = array ( 'first' = array('blue' = 1, 'red' = 2,), 'second' = array('cyan' = 8), 'fourth' = array(2 = 'two'), ); var_dump( array_intersect_key($array1, $array2) ); var_dump( array_intersect_key($array2,$array1 ) ); ? ===DONE=== --EXPECTF-- *** Testing array_intersect_key() : usage variation *** array(2) { [ufirst]= array(2) { [ublue]= int(1) [ured]= int(2) } [usecond]= array(1) { [uyellow]= int(7) } } array(2) { [ufirst]= array(2) { [ublue]= int(1) [ured]= int(2) } [usecond]= array(1) { [ucyan]= int(8) } } ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_intersect_key_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_intersect_key_error.phpt +++ php-src/ext/standard/tests/array/array_intersect_key_error.phpt --TEST-- Test array_intersect_key() function : error conditions --FILE-- ?php /* Prototype : array array_intersect_key(array arr1, array arr2 [, array ...]) * Description: Returns the entries of arr1 that have keys which are present in all the other arguments. * Source code: ext/standard/array.c */ echo *** Testing array_intersect_key() : error conditions ***\n; //Initialise function arguments $array1 = array('blue' = 1, 'red' = 2, 'green' = 3, 'purple' = 4); // Testing array_intersect_key with one less than the expected number of arguments echo \n-- Testing array_intersect_key() function with less than expected no. of arguments --\n; var_dump( array_intersect_key($array1) ); // Testing array_intersect_key with one less than the expected number of arguments echo \n-- Testing array_intersect_key() function with no arguments --\n; var_dump( array_intersect_key() ); ? ===DONE=== --EXPECTF-- *** Testing array_intersect_key() : error conditions *** -- Testing array_intersect_key() function with less than expected no. of arguments -- Warning: array_intersect_key(): at least 2 parameters are required, 1 given in %s on line %d NULL -- Testing array_intersect_key() function with no arguments -- Warning: array_intersect_key(): at least 2 parameters are required, 0 given in %s on line %d NULL ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_intersect_key_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_intersect_key_variation1.phpt +++ php-src/ext/standard/tests/array/array_intersect_key_variation1.phpt --TEST-- Test array_intersect_key() function : usage variation - Passing unexpected values to first argument --FILE-- ?php /* Prototype : array array_intersect_key(array arr1, array arr2 [, array ...]) * Description: Returns the entries of arr1 that have keys which are present in all the other arguments. * Source code: ext/standard/array.c */ echo *** Testing array_intersect_key() : usage variation ***\n; // Initialise function arguments not being substituted (if any) $array2 = array('blue' = 1, 'red' = 2, 'green' = 3, 'purple' = 4); $array3 = array('green' = 5, 'blue' = 6, 'yellow' = 7, 'cyan' = 8); //get an unset variable $unset_var = 10; unset
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_intersect_key_error.phpt
smantoorThu Sep 11 11:21:53 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array array_intersect_key_error.phpt Log: Fixed expected output http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_intersect_key_error.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/array/array_intersect_key_error.phpt diff -u php-src/ext/standard/tests/array/array_intersect_key_error.phpt:1.1.2.2 php-src/ext/standard/tests/array/array_intersect_key_error.phpt:1.1.2.3 --- php-src/ext/standard/tests/array/array_intersect_key_error.phpt:1.1.2.2 Thu Sep 11 10:48:12 2008 +++ php-src/ext/standard/tests/array/array_intersect_key_error.phpt Thu Sep 11 11:21:53 2008 @@ -26,11 +26,11 @@ -- Testing array_intersect_key() function with less than expected no. of arguments -- -Warning: Wrong parameter count for array_intersect_key() in %s on line %d +Warning: array_intersect_key(): at least 2 parameters are required, 1 given in %s on line %d NULL -- Testing array_intersect_key() function with no arguments -- -Warning: Wrong parameter count for array_intersect_key() in %s on line %d +Warning: array_intersect_key(): at least 2 parameters are required, 0 given in %s on line %d NULL ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/session php_session.h session.c
lbarnaudThu Sep 11 11:51:07 2008 UTC Modified files: /php-src/ext/sessionphp_session.h session.c Log: Implemented ability to provide upload progress feedback through session data. http://cvs.php.net/viewvc.cgi/php-src/ext/session/php_session.h?r1=1.116r2=1.117diff_format=u Index: php-src/ext/session/php_session.h diff -u php-src/ext/session/php_session.h:1.116 php-src/ext/session/php_session.h:1.117 --- php-src/ext/session/php_session.h:1.116 Fri Mar 7 23:20:15 2008 +++ php-src/ext/session/php_session.h Thu Sep 11 11:51:07 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_session.h,v 1.116 2008/03/07 23:20:15 gwynne Exp $ */ +/* $Id: php_session.h,v 1.117 2008/09/11 11:51:07 lbarnaud Exp $ */ #ifndef PHP_SESSION_H #define PHP_SESSION_H @@ -95,6 +95,23 @@ php_session_active } php_session_status; +typedef struct _php_session_rfc1867_progress { + zval prefix; + zval name; + zval sname; + zval sid; + zval key; + long update_step; + long next_update; + zval *data; + size_tcontent_length; + zval *post_bytes_processed; + zval *files; + zval *current_file; + zval *current_file_bytes_processed; + zend_bool apply_trans_sid; +} php_session_rfc1867_progress; + typedef struct _php_ps_globals { char *save_path; char *session_name; @@ -143,6 +160,12 @@ int send_cookie; int define_sid; zend_bool invalid_session_id; /* allows the driver to report about an invalid session id and request id regeneration */ + + zend_bool rfc1867_enabled; + zstr rfc1867_prefix; + zstr rfc1867_name; + long rfc1867_freq; + php_session_rfc1867_progress *rfc1867_progress; } php_ps_globals; typedef php_ps_globals zend_ps_globals; http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.492r2=1.493diff_format=u Index: php-src/ext/session/session.c diff -u php-src/ext/session/session.c:1.492 php-src/ext/session/session.c:1.493 --- php-src/ext/session/session.c:1.492 Wed Aug 6 05:34:55 2008 +++ php-src/ext/session/session.c Thu Sep 11 11:51:07 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: session.c,v 1.492 2008/08/06 05:34:55 jani Exp $ */ +/* $Id: session.c,v 1.493 2008/09/11 11:51:07 lbarnaud Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -36,6 +36,8 @@ #include php_ini.h #include SAPI.h +#include rfc1867.h +#include php_variables.h #include php_session.h #include ext/standard/md5.h #include ext/standard/sha1.h @@ -57,6 +59,9 @@ PHPAPI ZEND_DECLARE_MODULE_GLOBALS(ps); +static int (*php_session_rfc1867_orig_callback)(unsigned int event, void *event_data, void **extra TSRMLS_DC); +static int php_session_rfc1867_callback(unsigned int event, void *event_data, void **extra TSRMLS_DC); + /* *** * Helpers * *** */ @@ -630,12 +635,32 @@ return SUCCESS; } } -#endif /* HAVE_HASH_EXT */ +#endif /* HAVE_HASH_EXT }}} */ return FAILURE; } /* }}} */ +static PHP_INI_MH(OnUpdateRfc1867Freq) /* {{{ */ +{ + int tmp; + tmp = zend_atoi(new_value, new_value_length); + if(tmp 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, session.upload_progress.freq must be greater than or equal to zero); + return FAILURE; + } + if(new_value_length 0 new_value[new_value_length-1] == '%') { + if(tmp 100) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, session.upload_progress.freq cannot be over 100%%); + return FAILURE; + } + PS(rfc1867_freq) = -tmp; + } else { + PS(rfc1867_freq) = tmp; + } + return SUCCESS; +} /* }}} */ + /* {{{ PHP_INI */ PHP_INI_BEGIN() @@ -663,6 +688,15 @@ PHP_INI_ENTRY(session.hash_function, 0, PHP_INI_ALL, OnUpdateHashFunc) STD_PHP_INI_ENTRY(session.hash_bits_per_character, 4, PHP_INI_ALL, OnUpdateLong, hash_bits_per_character, php_ps_globals, ps_globals) + /* Upload progress */ + STD_PHP_INI_BOOLEAN(session.upload_progress.enabled, + 1, ZEND_INI_PERDIR, OnUpdateBool,rfc1867_enabled, php_ps_globals, ps_globals) + STD_PHP_INI_ENTRY(session.upload_progress.prefix, +upload_progress_, ZEND_INI_PERDIR, OnUpdateUTF8String, rfc1867_prefix, php_ps_globals, ps_globals) + STD_PHP_INI_ENTRY(session.upload_progress.name, + PHP_SESSION_UPLOAD_PROGRESS, ZEND_INI_PERDIR, OnUpdateUTF8String, rfc1867_name,php_ps_globals, ps_globals) +
[PHP-CVS] cvs: php-src /ext/session/tests rfc1867.phpt rfc1867_disabled.phpt rfc1867_disabled_2.phpt rfc1867_invalid_settings.phpt rfc1867_invalid_settings_2.phpt rfc1867_no_name.phpt rfc1867_sid_cook
lbarnaudThu Sep 11 11:52:02 2008 UTC Added files: /php-src/ext/session/tests rfc1867_disabled_2.phpt rfc1867_disabled.phpt rfc1867_invalid_settings_2.phpt rfc1867_invalid_settings.phpt rfc1867_no_name.phpt rfc1867.phpt rfc1867_sid_cookie.phpt rfc1867_sid_get_2.phpt rfc1867_sid_get.phpt rfc1867_sid_invalid.phpt rfc1867_sid_only_cookie_2.phpt rfc1867_sid_only_cookie.phpt rfc1867_sid_post.phpt Log: Added tests http://cvs.php.net/viewvc.cgi/php-src/ext/session/tests/rfc1867_disabled_2.phpt?view=markuprev=1.1 Index: php-src/ext/session/tests/rfc1867_disabled_2.phpt +++ php-src/ext/session/tests/rfc1867_disabled_2.phpt --TEST-- session rfc1867 disabled 2 --INI-- file_uploads=1 error_reporting=E_ALL~E_NOTICE comment=debug builds show some additional E_NOTICE errors upload_max_filesize=1024 session.save_path= session.name=PHPSESSID session.use_cookies=1 session.use_only_cookies=0 session.upload_progress.enabled=1 session.upload_progress.prefix=upload_progress_ session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS session.upload_progress.freq=1% --SKIPIF-- ?php include('skipif.inc'); ? --COOKIE-- PHPSESSID=rfc1867-tests --GET-- PHPSESSID=rfc1867-tests-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---20896060251896012921717172737 -20896060251896012921717172737 Content-Disposition: form-data; name=PHPSESSID rfc1867-tests-post -20896060251896012921717172737 Content-Disposition: form-data; name=file1; filename=file1.txt 1 -20896060251896012921717172737 Content-Disposition: form-data; name=file2; filename=file2.txt 2 -20896060251896012921717172737-- --FILE-- ?php session_start(); var_dump(session_id()); var_dump($_FILES); var_dump($_SESSION[upload_progress_ . basename(__FILE__)]); session_destroy(); ? --EXPECTF-- string(%d) rfc1867-tests array(2) { [%u|b%file1]= array(5) { [%u|b%name]= %string|unicode%(9) file1.txt [%u|b%type]= %string|unicode%(0) [%u|b%tmp_name]= %string|unicode%(%d) %s [%u|b%error]= int(0) [%u|b%size]= int(1) } [%u|b%file2]= array(5) { [%u|b%name]= %string|unicode%(9) file2.txt [%u|b%type]= %string|unicode%(0) [%u|b%tmp_name]= %string|unicode%(%d) %s [%u|b%error]= int(0) [%u|b%size]= int(1) } } NULL http://cvs.php.net/viewvc.cgi/php-src/ext/session/tests/rfc1867_disabled.phpt?view=markuprev=1.1 Index: php-src/ext/session/tests/rfc1867_disabled.phpt +++ php-src/ext/session/tests/rfc1867_disabled.phpt --TEST-- session rfc1867 disabled --INI-- file_uploads=1 error_reporting=E_ALL~E_NOTICE comment=debug builds show some additional E_NOTICE errors upload_max_filesize=1024 session.save_path= session.name=PHPSESSID session.use_cookies=1 session.use_only_cookies=0 session.upload_progress.enabled=0 session.upload_progress.prefix=upload_progress_ session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS session.upload_progress.freq=1% --SKIPIF-- ?php include('skipif.inc'); ? --COOKIE-- PHPSESSID=rfc1867-tests --GET-- PHPSESSID=rfc1867-tests-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---20896060251896012921717172737 -20896060251896012921717172737 Content-Disposition: form-data; name=PHPSESSID rfc1867-tests-post -20896060251896012921717172737 Content-Disposition: form-data; name=file1; filename=file1.txt 1 -20896060251896012921717172737 Content-Disposition: form-data; name=file2; filename=file2.txt 2 -20896060251896012921717172737-- --FILE-- ?php session_start(); var_dump(session_id()); var_dump($_FILES); var_dump($_SESSION[upload_progress_ . basename(__FILE__)]); session_destroy(); ? --EXPECTF-- string(%d) rfc1867-tests array(2) { [%u|b%file1]= array(5) { [%u|b%name]= %string|unicode%(9) file1.txt [%u|b%type]= %string|unicode%(0) [%u|b%tmp_name]= %string|unicode%(%d) %s [%u|b%error]= int(0) [%u|b%size]= int(1) } [%u|b%file2]= array(5) { [%u|b%name]= %string|unicode%(9) file2.txt [%u|b%type]= %string|unicode%(0) [%u|b%tmp_name]= %string|unicode%(%d) %s [%u|b%error]= int(0) [%u|b%size]= int(1) } } NULL http://cvs.php.net/viewvc.cgi/php-src/ext/session/tests/rfc1867_invalid_settings_2.phpt?view=markuprev=1.1 Index: php-src/ext/session/tests/rfc1867_invalid_settings_2.phpt +++
[PHP-CVS] cvs: php-src /ext/phar/tests bug46032.phpt
tony2001Thu Sep 11 13:38:06 2008 UTC Modified files: /php-src/ext/phar/tests bug46032.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/bug46032.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/phar/tests/bug46032.phpt diff -u php-src/ext/phar/tests/bug46032.phpt:1.2 php-src/ext/phar/tests/bug46032.phpt:1.3 --- php-src/ext/phar/tests/bug46032.phpt:1.2Thu Sep 11 03:29:42 2008 +++ php-src/ext/phar/tests/bug46032.phptThu Sep 11 13:38:06 2008 @@ -29,6 +29,6 @@ Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Cannot create phar '000', file extension (or combination) not recognised' in %sbug46032.php:%d Stack trace: -#0 /home/cellog/workspace/php5/ext/phar/tests/bug46032.php(%d): PharData-__construct('000...') +#0 %s(%d): PharData-__construct('000...') #1 {main} thrown in %sbug46032.php on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar/tests bug46032.phpt
tony2001Thu Sep 11 13:38:15 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar/tests bug46032.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/bug46032.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/phar/tests/bug46032.phpt diff -u php-src/ext/phar/tests/bug46032.phpt:1.1.2.1 php-src/ext/phar/tests/bug46032.phpt:1.1.2.2 --- php-src/ext/phar/tests/bug46032.phpt:1.1.2.1Thu Sep 11 03:29:15 2008 +++ php-src/ext/phar/tests/bug46032.phptThu Sep 11 13:38:15 2008 @@ -29,6 +29,6 @@ Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Cannot create phar '000', file extension (or combination) not recognised' in %sbug46032.php:%d Stack trace: -#0 /home/cellog/workspace/php5/ext/phar/tests/bug46032.php(%d): PharData-__construct('000...') +#0 %s(%d): PharData-__construct('000...') #1 {main} thrown in %sbug46032.php on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/wddx wddx.c /ext/wddx/tests bug45901.phpt
rrichards Thu Sep 11 14:16:37 2008 UTC Added files: /php-src/ext/wddx/tests bug45901.phpt Modified files: /php-src/ext/wddx wddx.c Log: fix bug #45901 (wddx_serialize_value crash with SimpleXMLElement object) add test http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/wddx.c?r1=1.153r2=1.154diff_format=u Index: php-src/ext/wddx/wddx.c diff -u php-src/ext/wddx/wddx.c:1.153 php-src/ext/wddx/wddx.c:1.154 --- php-src/ext/wddx/wddx.c:1.153 Sun Aug 24 04:02:20 2008 +++ php-src/ext/wddx/wddx.c Thu Sep 11 14:16:36 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: wddx.c,v 1.153 2008/08/24 04:02:20 felipe Exp $ */ +/* $Id: wddx.c,v 1.154 2008/09/11 14:16:36 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -466,6 +466,7 @@ char *key; ulong idx; char tmp_buf[WDDX_BUF_LEN]; + HashTable *objhash; TSRMLS_FETCH(); MAKE_STD_ZVAL(fname); @@ -476,7 +477,7 @@ * array of property names to be serialized. */ if (call_user_function_ex(CG(function_table), obj, fname, retval, 0, 0, 1, NULL TSRMLS_CC) == SUCCESS) { - if (retval HASH_OF(retval)) { + if (retval (objhash = HASH_OF(retval))) { PHP_CLASS_ATTRIBUTES; PHP_SET_CLASS_ATTRIBUTES(obj); @@ -491,15 +492,15 @@ PHP_CLEANUP_CLASS_ATTRIBUTES(); - for (zend_hash_internal_pointer_reset(HASH_OF(retval)); -zend_hash_get_current_data(HASH_OF(retval), (void **)varname) == SUCCESS; -zend_hash_move_forward(HASH_OF(retval))) { + for (zend_hash_internal_pointer_reset(objhash); +zend_hash_get_current_data(objhash, (void **)varname) == SUCCESS; +zend_hash_move_forward(objhash)) { if (Z_TYPE_PP(varname) != IS_STRING) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, __sleep should return an array only containing the names of instance-variables to serialize); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, __sleep should return an array only containing the names of instance-variables to serialize.); continue; } - if (zend_hash_find(HASH_OF(obj), Z_STRVAL_PP(varname), Z_STRLEN_PP(varname)+1, (void **)ent) == SUCCESS) { + if (zend_hash_find(objhash, Z_STRVAL_PP(varname), Z_STRLEN_PP(varname)+1, (void **)ent) == SUCCESS) { php_wddx_serialize_var(packet, *ent, Z_STRVAL_PP(varname), Z_STRLEN_PP(varname) TSRMLS_CC); } } @@ -523,14 +524,15 @@ PHP_CLEANUP_CLASS_ATTRIBUTES(); - for (zend_hash_internal_pointer_reset(HASH_OF(obj)); -zend_hash_get_current_data(HASH_OF(obj), (void**)ent) == SUCCESS; -zend_hash_move_forward(HASH_OF(obj))) { + objhash = HASH_OF(obj); + for (zend_hash_internal_pointer_reset(objhash); +zend_hash_get_current_data(objhash, (void**)ent) == SUCCESS; +zend_hash_move_forward(objhash)) { if (*ent == obj) { continue; } - if (zend_hash_get_current_key_ex(HASH_OF(obj), key, key_len, idx, 0, NULL) == HASH_KEY_IS_STRING) { + if (zend_hash_get_current_key_ex(objhash, key, key_len, idx, 0, NULL) == HASH_KEY_IS_STRING) { char *class_name, *prop_name; zend_unmangle_property_name(key, key_len-1, class_name, prop_name); http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/tests/bug45901.phpt?view=markuprev=1.1 Index: php-src/ext/wddx/tests/bug45901.phpt +++ php-src/ext/wddx/tests/bug45901.phpt --TEST-- Bug #45901 (wddx_serialize_value crash with SimpleXMLElement object) --SKIPIF-- ?php if (!extension_loaded(wddx)) print skip; if (!extension_loaded(simplexml)) print skip SimpleXML not present; ? --FILE-- ?php $xml = new SimpleXMLElement('data/data'); $xml-addChild('test'); echo wddx_serialize_value($xml, 'Variables') . \n; echo DONE; ? --EXPECTF-- wddxPacket version='1.0'headercommentVariables/comment/headerdatastructvar name='php_class_name'stringSimpleXMLElement/string/varvar name='test'structvar name='php_class_name'stringSimpleXMLElement/string/var/struct/var/struct/data/wddxPacket DONE -- PHP CVS Mailing
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/wddx wddx.c /ext/wddx/tests bug45901.phpt
rrichards Thu Sep 11 14:17:31 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/wddx/tests bug45901.phpt Modified files: /php-src/ext/wddx wddx.c Log: MFH: fix bug #45901 (wddx_serialize_value crash with SimpleXMLElement object) add test http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/wddx.c?r1=1.119.2.10.2.17.2.10r2=1.119.2.10.2.17.2.11diff_format=u Index: php-src/ext/wddx/wddx.c diff -u php-src/ext/wddx/wddx.c:1.119.2.10.2.17.2.10 php-src/ext/wddx/wddx.c:1.119.2.10.2.17.2.11 --- php-src/ext/wddx/wddx.c:1.119.2.10.2.17.2.10Sun Aug 24 04:02:49 2008 +++ php-src/ext/wddx/wddx.c Thu Sep 11 14:17:31 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: wddx.c,v 1.119.2.10.2.17.2.10 2008/08/24 04:02:49 felipe Exp $ */ +/* $Id: wddx.c,v 1.119.2.10.2.17.2.11 2008/09/11 14:17:31 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -468,6 +468,7 @@ char *key; ulong idx; char tmp_buf[WDDX_BUF_LEN]; + HashTable *objhash; TSRMLS_FETCH(); MAKE_STD_ZVAL(fname); @@ -478,7 +479,7 @@ * array of property names to be serialized. */ if (call_user_function_ex(CG(function_table), obj, fname, retval, 0, 0, 1, NULL TSRMLS_CC) == SUCCESS) { - if (retval HASH_OF(retval)) { + if (retval (objhash = HASH_OF(retval))) { PHP_CLASS_ATTRIBUTES; PHP_SET_CLASS_ATTRIBUTES(obj); @@ -493,15 +494,15 @@ PHP_CLEANUP_CLASS_ATTRIBUTES(); - for (zend_hash_internal_pointer_reset(HASH_OF(retval)); -zend_hash_get_current_data(HASH_OF(retval), (void **)varname) == SUCCESS; -zend_hash_move_forward(HASH_OF(retval))) { + for (zend_hash_internal_pointer_reset(objhash); +zend_hash_get_current_data(objhash, (void **)varname) == SUCCESS; +zend_hash_move_forward(objhash)) { if (Z_TYPE_PP(varname) != IS_STRING) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, __sleep should return an array only containing the names of instance-variables to serialize.); continue; } - if (zend_hash_find(HASH_OF(obj), Z_STRVAL_PP(varname), Z_STRLEN_PP(varname)+1, (void **)ent) == SUCCESS) { + if (zend_hash_find(objhash, Z_STRVAL_PP(varname), Z_STRLEN_PP(varname)+1, (void **)ent) == SUCCESS) { php_wddx_serialize_var(packet, *ent, Z_STRVAL_PP(varname), Z_STRLEN_PP(varname) TSRMLS_CC); } } @@ -525,14 +526,15 @@ PHP_CLEANUP_CLASS_ATTRIBUTES(); - for (zend_hash_internal_pointer_reset(HASH_OF(obj)); -zend_hash_get_current_data(HASH_OF(obj), (void**)ent) == SUCCESS; -zend_hash_move_forward(HASH_OF(obj))) { + objhash = HASH_OF(obj); + for (zend_hash_internal_pointer_reset(objhash); +zend_hash_get_current_data(objhash, (void**)ent) == SUCCESS; +zend_hash_move_forward(objhash)) { if (*ent == obj) { continue; } - if (zend_hash_get_current_key_ex(HASH_OF(obj), key, key_len, idx, 0, NULL) == HASH_KEY_IS_STRING) { + if (zend_hash_get_current_key_ex(objhash, key, key_len, idx, 0, NULL) == HASH_KEY_IS_STRING) { char *class_name, *prop_name; zend_unmangle_property_name(key, key_len-1, class_name, prop_name); http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/tests/bug45901.phpt?view=markuprev=1.1 Index: php-src/ext/wddx/tests/bug45901.phpt +++ php-src/ext/wddx/tests/bug45901.phpt --TEST-- Bug #45901 (wddx_serialize_value crash with SimpleXMLElement object) --SKIPIF-- ?php if (!extension_loaded(wddx)) print skip; if (!extension_loaded(simplexml)) print skip SimpleXML not present; ? --FILE-- ?php $xml = new SimpleXMLElement('data/data'); $xml-addChild('test'); echo wddx_serialize_value($xml, 'Variables') . \n; echo DONE; ? --EXPECTF-- wddxPacket version='1.0'headercommentVariables/comment/headerdatastructvar name='php_class_name'stringSimpleXMLElement/string/varvar name='test'structvar name='php_class_name'stringSimpleXMLElement/string/var/struct/var/struct/data/wddxPacket DONE -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit:
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/wddx wddx.c /ext/wddx/tests bug45901.phpt
rrichards Thu Sep 11 14:18:27 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/wddx/tests bug45901.phpt Modified files: /php-src/ext/wddx wddx.c Log: MFH: fix bug #45901 (wddx_serialize_value crash with SimpleXMLElement object) add test http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/wddx.c?r1=1.119.2.10.2.18r2=1.119.2.10.2.19diff_format=u Index: php-src/ext/wddx/wddx.c diff -u php-src/ext/wddx/wddx.c:1.119.2.10.2.18 php-src/ext/wddx/wddx.c:1.119.2.10.2.19 --- php-src/ext/wddx/wddx.c:1.119.2.10.2.18 Mon Dec 31 07:20:14 2007 +++ php-src/ext/wddx/wddx.c Thu Sep 11 14:18:27 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: wddx.c,v 1.119.2.10.2.18 2007/12/31 07:20:14 sebastian Exp $ */ +/* $Id: wddx.c,v 1.119.2.10.2.19 2008/09/11 14:18:27 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -432,6 +432,7 @@ char *key; ulong idx; char tmp_buf[WDDX_BUF_LEN]; + HashTable *objhash; TSRMLS_FETCH(); MAKE_STD_ZVAL(fname); @@ -442,7 +443,7 @@ * array of property names to be serialized. */ if (call_user_function_ex(CG(function_table), obj, fname, retval, 0, 0, 1, NULL TSRMLS_CC) == SUCCESS) { - if (retval HASH_OF(retval)) { + if (retval (objhash = HASH_OF(retval))) { PHP_CLASS_ATTRIBUTES; PHP_SET_CLASS_ATTRIBUTES(obj); @@ -457,15 +458,15 @@ PHP_CLEANUP_CLASS_ATTRIBUTES(); - for (zend_hash_internal_pointer_reset(HASH_OF(retval)); -zend_hash_get_current_data(HASH_OF(retval), (void **)varname) == SUCCESS; -zend_hash_move_forward(HASH_OF(retval))) { + for (zend_hash_internal_pointer_reset(objhash); +zend_hash_get_current_data(objhash, (void **)varname) == SUCCESS; +zend_hash_move_forward(objhash)) { if (Z_TYPE_PP(varname) != IS_STRING) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, __sleep should return an array only containing the names of instance-variables to serialize.); continue; } - if (zend_hash_find(HASH_OF(obj), Z_STRVAL_PP(varname), Z_STRLEN_PP(varname)+1, (void **)ent) == SUCCESS) { + if (zend_hash_find(objhash, Z_STRVAL_PP(varname), Z_STRLEN_PP(varname)+1, (void **)ent) == SUCCESS) { php_wddx_serialize_var(packet, *ent, Z_STRVAL_PP(varname), Z_STRLEN_PP(varname) TSRMLS_CC); } } @@ -489,13 +490,15 @@ PHP_CLEANUP_CLASS_ATTRIBUTES(); - for (zend_hash_internal_pointer_reset(HASH_OF(obj)); -zend_hash_get_current_data(HASH_OF(obj), (void**)ent) == SUCCESS; -zend_hash_move_forward(HASH_OF(obj))) { - if (*ent == obj) + objhash = HASH_OF(obj); + for (zend_hash_internal_pointer_reset(objhash); +zend_hash_get_current_data(objhash, (void**)ent) == SUCCESS; +zend_hash_move_forward(objhash)) { + if (*ent == obj) { continue; + } - if (zend_hash_get_current_key_ex(HASH_OF(obj), key, key_len, idx, 0, NULL) == HASH_KEY_IS_STRING) { + if (zend_hash_get_current_key_ex(objhash, key, key_len, idx, 0, NULL) == HASH_KEY_IS_STRING) { char *class_name, *prop_name; zend_unmangle_property_name(key, key_len-1, class_name, prop_name); http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/tests/bug45901.phpt?view=markuprev=1.1 Index: php-src/ext/wddx/tests/bug45901.phpt +++ php-src/ext/wddx/tests/bug45901.phpt --TEST-- Bug #45901 (wddx_serialize_value crash with SimpleXMLElement object) --SKIPIF-- ?php if (!extension_loaded(wddx)) print skip; if (!extension_loaded(simplexml)) print skip SimpleXML not present; ? --FILE-- ?php $xml = new SimpleXMLElement('data/data'); $xml-addChild('test'); echo wddx_serialize_value($xml, 'Variables') . \n; echo DONE; ? --EXPECTF-- wddxPacket version='1.0'headercommentVariables/comment/headerdatastructvar name='php_class_name'stringSimpleXMLElement/string/varvar name='test'structvar name='php_class_name'stringSimpleXMLElement/string/var/struct/var/struct/data/wddxPacket DONE -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe,
[PHP-CVS] cvs: php-src /ext/simplexml simplexml.c /ext/simplexml/tests bug46047.phpt
rrichards Thu Sep 11 14:20:30 2008 UTC Added files: /php-src/ext/simplexml/testsbug46047.phpt Modified files: /php-src/ext/simplexml simplexml.c Log: fix bug #46047 (SimpleXML converts empty nodes into object with nested array) add test http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.260r2=1.261diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.260 php-src/ext/simplexml/simplexml.c:1.261 --- php-src/ext/simplexml/simplexml.c:1.260 Wed Sep 10 16:28:20 2008 +++ php-src/ext/simplexml/simplexml.c Thu Sep 11 14:20:30 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.260 2008/09/10 16:28:20 rrichards Exp $ */ +/* $Id: simplexml.c,v 1.261 2008/09/11 14:20:30 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1142,13 +1142,17 @@ SKIP_TEXT(node); } else { if (node-type == XML_TEXT_NODE) { - xmlChar *tmp; - - MAKE_STD_ZVAL(value); - tmp = xmlNodeListGetString(node-doc, node, 1); - ZVAL_XML_STRING(value, (char *)tmp, ZSTR_DUPLICATE); - xmlFree(tmp); - zend_hash_next_index_insert(rv, value, sizeof(zval *), NULL); + const xmlChar *cur = node-content; + + if (*cur != 0) { + xmlChar *tmp; + + MAKE_STD_ZVAL(value); + tmp = xmlNodeListGetString(node-doc, node, 1); + ZVAL_XML_STRING(value, (char *)tmp, ZSTR_DUPLICATE); + xmlFree(tmp); + zend_hash_next_index_insert(rv, value, sizeof(zval *), NULL); + } goto next_iter; } } @@ -2640,7 +2644,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, Simplexml support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.260 $); + php_info_print_table_row(2, Revision, $Revision: 1.261 $); php_info_print_table_row(2, Schema support, #ifdef LIBXML_SCHEMAS_ENABLED enabled); http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/bug46047.phpt?view=markuprev=1.1 Index: php-src/ext/simplexml/tests/bug46047.phpt +++ php-src/ext/simplexml/tests/bug46047.phpt --TEST-- Bug #46047 (SimpleXML converts empty nodes into object with nested array) --FILE-- ?php $xml = new SimpleXMLElement('foobar![CDATA[]]/barbaz//foo', LIBXML_NOCDATA); print_r($xml); $xml = new SimpleXMLElement('foobar/barbaz//foo'); print_r($xml); $xml = new SimpleXMLElement('foobar/baz//foo'); print_r($xml); ? --EXPECTF-- SimpleXMLElement Object ( [bar] = SimpleXMLElement Object ( ) [baz] = SimpleXMLElement Object ( ) ) SimpleXMLElement Object ( [bar] = SimpleXMLElement Object ( ) [baz] = SimpleXMLElement Object ( ) ) SimpleXMLElement Object ( [bar] = SimpleXMLElement Object ( ) [baz] = SimpleXMLElement Object ( ) ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/simplexml simplexml.c /ext/simplexml/tests bug46047.phpt
rrichards Thu Sep 11 14:21:33 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/simplexml/testsbug46047.phpt Modified files: /php-src/ext/simplexml simplexml.c Log: MFH: fix bug #46047 (SimpleXML converts empty nodes into object with nested array) add test http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.35.2.19r2=1.151.2.22.2.35.2.20diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.19 php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.20 --- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.19 Wed Sep 10 16:28:53 2008 +++ php-src/ext/simplexml/simplexml.c Thu Sep 11 14:21:33 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.151.2.22.2.35.2.19 2008/09/10 16:28:53 rrichards Exp $ */ +/* $Id: simplexml.c,v 1.151.2.22.2.35.2.20 2008/09/11 14:21:33 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1129,9 +1129,13 @@ SKIP_TEXT(node); } else { if (node-type == XML_TEXT_NODE) { - MAKE_STD_ZVAL(value); - ZVAL_STRING(value, sxe_xmlNodeListGetString(node-doc, node, 1), 0); - zend_hash_next_index_insert(rv, value, sizeof(zval *), NULL); + const xmlChar *cur = node-content; + + if (*cur != 0) { + MAKE_STD_ZVAL(value); + ZVAL_STRING(value, sxe_xmlNodeListGetString(node-doc, node, 1), 0); + zend_hash_next_index_insert(rv, value, sizeof(zval *), NULL); + } goto next_iter; } } @@ -2558,7 +2562,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, Simplexml support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.35.2.19 $); + php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.35.2.20 $); php_info_print_table_row(2, Schema support, #ifdef LIBXML_SCHEMAS_ENABLED enabled); http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/bug46047.phpt?view=markuprev=1.1 Index: php-src/ext/simplexml/tests/bug46047.phpt +++ php-src/ext/simplexml/tests/bug46047.phpt --TEST-- Bug #46047 (SimpleXML converts empty nodes into object with nested array) --FILE-- ?php $xml = new SimpleXMLElement('foobar![CDATA[]]/barbaz//foo', LIBXML_NOCDATA); print_r($xml); $xml = new SimpleXMLElement('foobar/barbaz//foo'); print_r($xml); $xml = new SimpleXMLElement('foobar/baz//foo'); print_r($xml); ? --EXPECTF-- SimpleXMLElement Object ( [bar] = SimpleXMLElement Object ( ) [baz] = SimpleXMLElement Object ( ) ) SimpleXMLElement Object ( [bar] = SimpleXMLElement Object ( ) [baz] = SimpleXMLElement Object ( ) ) SimpleXMLElement Object ( [bar] = SimpleXMLElement Object ( ) [baz] = SimpleXMLElement Object ( ) ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/simplexml simplexml.c /ext/simplexml/tests bug46047.phpt
rrichards Thu Sep 11 14:23:33 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/simplexml/testsbug46047.phpt Modified files: /php-src/ext/simplexml simplexml.c Log: MFH: fix bug #46047 (SimpleXML converts empty nodes into object with nested array) add test http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.43r2=1.151.2.22.2.44diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.43 php-src/ext/simplexml/simplexml.c:1.151.2.22.2.44 --- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.43 Wed Sep 10 16:29:17 2008 +++ php-src/ext/simplexml/simplexml.c Thu Sep 11 14:23:33 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.151.2.22.2.43 2008/09/10 16:29:17 rrichards Exp $ */ +/* $Id: simplexml.c,v 1.151.2.22.2.44 2008/09/11 14:23:33 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1101,9 +1101,13 @@ SKIP_TEXT(node); } else { if (node-type == XML_TEXT_NODE) { - MAKE_STD_ZVAL(value); - ZVAL_STRING(value, sxe_xmlNodeListGetString(node-doc, node, 1), 0); - zend_hash_next_index_insert(rv, value, sizeof(zval *), NULL); + const xmlChar *cur = node-content; + + if (*cur != 0) { + MAKE_STD_ZVAL(value); + ZVAL_STRING(value, sxe_xmlNodeListGetString(node-doc, node, 1), 0); + zend_hash_next_index_insert(rv, value, sizeof(zval *), NULL); + } goto next_iter; } } @@ -2446,7 +2450,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, Simplexml support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.43 $); + php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.44 $); php_info_print_table_row(2, Schema support, #ifdef LIBXML_SCHEMAS_ENABLED enabled); http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/bug46047.phpt?view=markuprev=1.1 Index: php-src/ext/simplexml/tests/bug46047.phpt +++ php-src/ext/simplexml/tests/bug46047.phpt --TEST-- Bug #46047 (SimpleXML converts empty nodes into object with nested array) --FILE-- ?php $xml = new SimpleXMLElement('foobar![CDATA[]]/barbaz//foo', LIBXML_NOCDATA); print_r($xml); $xml = new SimpleXMLElement('foobar/barbaz//foo'); print_r($xml); $xml = new SimpleXMLElement('foobar/baz//foo'); print_r($xml); ? --EXPECTF-- SimpleXMLElement Object ( [bar] = SimpleXMLElement Object ( ) [baz] = SimpleXMLElement Object ( ) ) SimpleXMLElement Object ( [bar] = SimpleXMLElement Object ( ) [baz] = SimpleXMLElement Object ( ) ) SimpleXMLElement Object ( [bar] = SimpleXMLElement Object ( ) [baz] = SimpleXMLElement Object ( ) ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS
rrichards Thu Sep 11 14:24:29 2008 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: BFN http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1222r2=1.2027.2.547.2.1223diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1222 php-src/NEWS:1.2027.2.547.2.1223 --- php-src/NEWS:1.2027.2.547.2.1222Wed Sep 10 16:29:42 2008 +++ php-src/NEWSThu Sep 11 14:24:28 2008 @@ -18,6 +18,8 @@ (Scott) - Fixed a crash on invalid method in ReflectionParameter constructor. (Christian Seiler) +- Fixed bug #46047 (SimpleXML converts empty nodes into object with nested + array). (Rob) - Fixed bug #46031 (Segfault in AppendIterator::next). (Arnaud) - Fixed bug #46029 (Segfault in DOMText when using with Reflection). (Rob) - Fixed bug #46010 (warnings incorrectly generated for iv in ecb mode). @@ -25,6 +27,8 @@ - Fixed bug #46003 (isset on nonexisting node return unexpected results). (Rob) - Fixed bug #45956 (parse_ini_file() does not return false with syntax errors in parsed file). (Jani) +- Fixed bug #45901 (wddx_serialize_value crash with SimpleXMLElement object). + (Rob) - Fixed bug #45862 (get_class_vars is inconsistent with 'protected' and 'private' variables). (ilewis at uk dot ibm dot com, Felipe) - Fixed bug #45860 (header() function fails to correctly replace all Status -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/spl spl_directory.c /ext/spl/tests bug46051.phpt
lbarnaudThu Sep 11 15:24:13 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/spl/tests bug46051.phpt Modified files: /php-srcNEWS /php-src/ext/splspl_directory.c Log: MFH: Fixed #46051 (SplFileInfo::openFile - memory overlap) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1223r2=1.2027.2.547.2.1224diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1223 php-src/NEWS:1.2027.2.547.2.1224 --- php-src/NEWS:1.2027.2.547.2.1223Thu Sep 11 14:24:28 2008 +++ php-src/NEWSThu Sep 11 15:24:11 2008 @@ -18,6 +18,7 @@ (Scott) - Fixed a crash on invalid method in ReflectionParameter constructor. (Christian Seiler) +- Fixed bug #46051 (SplFileInfo::openFile - memory overlap). (Arnaud) - Fixed bug #46047 (SimpleXML converts empty nodes into object with nested array). (Rob) - Fixed bug #46031 (Segfault in AppendIterator::next). (Arnaud) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.27r2=1.45.2.27.2.28diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.27 php-src/ext/spl/spl_directory.c:1.45.2.27.2.28 --- php-src/ext/spl/spl_directory.c:1.45.2.27.2.27 Sat May 3 16:00:40 2008 +++ php-src/ext/spl/spl_directory.c Thu Sep 11 15:24:12 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_directory.c,v 1.45.2.27.2.27 2008/05/03 16:00:40 colder Exp $ */ +/* $Id: spl_directory.c,v 1.45.2.27.2.28 2008/09/11 15:24:12 lbarnaud Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -426,6 +426,7 @@ use_include_path, intern-u.file.zcontext) == FAILURE) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); intern-u.file.open_mode = NULL; + intern-file_name = NULL; zval_dtor(return_value); Z_TYPE_P(return_value) = IS_NULL; return NULL; http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug46051.phpt?view=markuprev=1.1 Index: php-src/ext/spl/tests/bug46051.phpt +++ php-src/ext/spl/tests/bug46051.phpt --TEST-- Bug #46051 (SplFileInfo::openFile - memory overlap) --FILE-- ?php $x = new splfileinfo(__FILE__); try { $x-openFile(NULL, NULL, NULL); } catch (Exception $e) { } var_dump($x-getPathName()); --EXPECTF-- %unicode|string%(%d) %sbug46051.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl spl_directory.c /ext/spl/tests bug46053.phpt
lbarnaudThu Sep 11 15:31:48 2008 UTC Added files: /php-src/ext/spl/tests bug46053.phpt Modified files: /php-src/ext/splspl_directory.c Log: Fixed #46053 (SplFileObject::seek - Endless loop) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.165r2=1.166diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.165 php-src/ext/spl/spl_directory.c:1.166 --- php-src/ext/spl/spl_directory.c:1.165 Thu Sep 11 15:22:17 2008 +++ php-src/ext/spl/spl_directory.c Thu Sep 11 15:31:48 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_directory.c,v 1.165 2008/09/11 15:22:17 lbarnaud Exp $ */ +/* $Id: spl_directory.c,v 1.166 2008/09/11 15:31:48 lbarnaud Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -2612,7 +2612,9 @@ spl_filesystem_file_rewind(getThis(), intern TSRMLS_CC); while(intern-u.file.current_line_num line_pos) { - spl_filesystem_file_read_line(getThis(), intern, 1 TSRMLS_CC); + if (spl_filesystem_file_read_line(getThis(), intern, 1 TSRMLS_CC) == FAILURE) { + break; + } } } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug46053.phpt?view=markuprev=1.1 Index: php-src/ext/spl/tests/bug46053.phpt +++ php-src/ext/spl/tests/bug46053.phpt --TEST-- Bug #46053 (SplFileObject::seek - Endless loop) --FILE-- ?php $x = new splfileobject(__FILE__); $x-getPathName(); $x-seek(10); $x-seek(0); var_dump(trim($x-fgets())); --EXPECTF-- string(%d) ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/spl spl_directory.c /ext/spl/tests bug46053.phpt
lbarnaudThu Sep 11 15:32:15 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/spl/tests bug46053.phpt Modified files: /php-srcNEWS /php-src/ext/splspl_directory.c Log: MFH: Fixed #46053 (SplFileObject::seek - Endless loop) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1224r2=1.2027.2.547.2.1225diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1224 php-src/NEWS:1.2027.2.547.2.1225 --- php-src/NEWS:1.2027.2.547.2.1224Thu Sep 11 15:24:11 2008 +++ php-src/NEWSThu Sep 11 15:32:15 2008 @@ -18,6 +18,7 @@ (Scott) - Fixed a crash on invalid method in ReflectionParameter constructor. (Christian Seiler) +- Fixed buf #46053 (SplFileObject::seek - Endless loop). (Arnaud) - Fixed bug #46051 (SplFileInfo::openFile - memory overlap). (Arnaud) - Fixed bug #46047 (SimpleXML converts empty nodes into object with nested array). (Rob) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.28r2=1.45.2.27.2.29diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.28 php-src/ext/spl/spl_directory.c:1.45.2.27.2.29 --- php-src/ext/spl/spl_directory.c:1.45.2.27.2.28 Thu Sep 11 15:24:12 2008 +++ php-src/ext/spl/spl_directory.c Thu Sep 11 15:32:15 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_directory.c,v 1.45.2.27.2.28 2008/09/11 15:24:12 lbarnaud Exp $ */ +/* $Id: spl_directory.c,v 1.45.2.27.2.29 2008/09/11 15:32:15 lbarnaud Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -2215,7 +2215,9 @@ spl_filesystem_file_rewind(getThis(), intern TSRMLS_CC); while(intern-u.file.current_line_num line_pos) { - spl_filesystem_file_read_line(getThis(), intern, 1 TSRMLS_CC); + if (spl_filesystem_file_read_line(getThis(), intern, 1 TSRMLS_CC) == FAILURE) { + break; + } } } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug46053.phpt?view=markuprev=1.1 Index: php-src/ext/spl/tests/bug46053.phpt +++ php-src/ext/spl/tests/bug46053.phpt --TEST-- Bug #46053 (SplFileObject::seek - Endless loop) --FILE-- ?php $x = new splfileobject(__FILE__); $x-getPathName(); $x-seek(10); $x-seek(0); var_dump(trim($x-fgets())); --EXPECTF-- string(%d) ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl spl_directory.c
lbarnaudThu Sep 11 15:45:29 2008 UTC Modified files: /php-src/ext/splspl_directory.c Log: Fix invalid free http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.166r2=1.167diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.166 php-src/ext/spl/spl_directory.c:1.167 --- php-src/ext/spl/spl_directory.c:1.166 Thu Sep 11 15:31:48 2008 +++ php-src/ext/spl/spl_directory.c Thu Sep 11 15:45:29 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_directory.c,v 1.166 2008/09/11 15:31:48 lbarnaud Exp $ */ +/* $Id: spl_directory.c,v 1.167 2008/09/11 15:45:29 lbarnaud Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -1163,6 +1163,7 @@ UChar *path; int filename_len, path_len; char *filename, buff[MAXPATHLEN]; + zend_bool free_filename = 0; zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, NULL TSRMLS_CC); @@ -1175,6 +1176,7 @@ } else { if (intern-file_name_type == IS_UNICODE) { php_stream_path_encode(NULL, filename, filename_len, intern-file_name.u, intern-file_name_len, REPORT_ERRORS, FG(default_context)); + free_filename = filename != NULL; } else { filename = intern-file_name.s; } @@ -1199,7 +1201,7 @@ RETVAL_FALSE; } - if (intern-file_name_type == IS_UNICODE filename) { + if (free_filename) { efree(filename); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl/tests recursive_tree_iterator_005.phpt
lbarnaudThu Sep 11 15:47:56 2008 UTC Modified files: /php-src/ext/spl/tests recursive_tree_iterator_005.phpt Log: Fix test http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/recursive_tree_iterator_005.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/spl/tests/recursive_tree_iterator_005.phpt diff -u php-src/ext/spl/tests/recursive_tree_iterator_005.phpt:1.1 php-src/ext/spl/tests/recursive_tree_iterator_005.phpt:1.2 --- php-src/ext/spl/tests/recursive_tree_iterator_005.phpt:1.1 Sat Jul 19 15:43:35 2008 +++ php-src/ext/spl/tests/recursive_tree_iterator_005.phpt Thu Sep 11 15:47:56 2008 @@ -41,17 +41,17 @@ ? ===DONE=== --EXPECT-- -unicode(7) |-Array +string(7) |-Array string(10) | |-binary unicode(8) | |-abc2 unicode(5) | \-1 -unicode(7) \-Array +string(7) \-Array unicode(5) |-2 unicode(5) |-b -unicode(9) |-Array +string(9) |-Array unicode(7) | |-4 unicode(7) | \-c -unicode(9) \-Array +string(9) \-Array unicode(7) |-4 unicode(7) \-c @@ -75,8 +75,8 @@ key, getEntry, current: unicode(3) |-0 -unicode(5) Array -unicode(7) |-Array +string(5) Array +string(7) |-Array unicode(5) | |-0 string(6) binary string(10) | |-binary @@ -87,8 +87,8 @@ unicode(1) 1 unicode(5) | \-1 string(8) \-binary -unicode(5) Array -unicode(7) \-Array +string(5) Array +string(7) \-Array unicode(5) |-0 unicode(1) 2 unicode(5) |-2 @@ -96,8 +96,8 @@ unicode(1) b unicode(5) |-b unicode(5) |-3 -unicode(5) Array -unicode(9) |-Array +string(5) Array +string(9) |-Array unicode(7) | |-0 unicode(1) 4 unicode(7) | |-4 @@ -105,8 +105,8 @@ unicode(1) c unicode(7) | \-c unicode(8) \-4abc -unicode(5) Array -unicode(9) \-Array +string(5) Array +string(9) \-Array unicode(7) |-0 unicode(1) 4 unicode(7) |-4 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/array prev_basic.phpt prev_error1.phpt prev_error2.phpt prev_error3.phpt prev_variation1.phpt prev_variation2.phpt
lstrojnyThu Sep 11 18:21:25 2008 UTC Added files: /php-src/ext/standard/tests/array prev_basic.phpt prev_error1.phpt prev_error2.phpt prev_error3.phpt prev_variation1.phpt prev_variation2.phpt Log: prev()-tests by Iain Lewis [EMAIL PROTECTED] http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/prev_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/prev_basic.phpt +++ php-src/ext/standard/tests/array/prev_basic.phpt --TEST-- Test prev() function : basic functionality --FILE-- ?php /* Prototype : mixed prev(array $array_arg) * Description: Move array argument's internal pointer to the previous element and return it * Source code: ext/standard/array.c */ /* * Test basic functionality of prev() */ echo *** Testing prev() : basic functionality ***\n; $array = array('zero', 'one', 'two'); end($array); echo key($array) . = . current($array) . \n; var_dump(prev($array)); echo key($array) . = . current($array) . \n; var_dump(prev($array)); echo key($array) . = . current($array) . \n; var_dump(prev($array)); echo \n*** Testing an array with differing values/keys ***\n; $array2 = array('one', 2 = help, 3, false, 'stringkey2' = 'val2', 'stringkey1' = 'val1'); end($array2); $length = count($array2); for ($i = $length; $i 0; $i--) { var_dump(prev($array2)); } ? ===DONE=== --EXPECTF-- *** Testing prev() : basic functionality *** 2 = two unicode(3) one 1 = one unicode(4) zero 0 = zero bool(false) *** Testing an array with differing values/keys *** unicode(4) val2 bool(false) int(3) unicode(4) help unicode(3) one bool(false) ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/prev_error1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/prev_error1.phpt +++ php-src/ext/standard/tests/array/prev_error1.phpt --TEST-- Test prev() function : error conditions - Pass incorrect number of arguments --FILE-- ?php /* Prototype : mixed prev(array $array_arg) * Description: Move array argument's internal pointer to the previous element and return it * Source code: ext/standard/array.c */ /* * Pass incorrect number of arguments to prev() to test behaviour */ echo *** Testing prev() : error conditions ***\n; // Zero arguments echo \n-- Testing prev() function with Zero arguments --\n; var_dump( prev() ); //Test prev with one more than the expected number of arguments echo \n-- Testing prev() function with more than expected no. of arguments --\n; $array_arg = array(1, 2); $extra_arg = 10; var_dump( prev($array_arg, $extra_arg) ); ? ===DONE=== --EXPECTF-- *** Testing prev() : error conditions *** -- Testing prev() function with Zero arguments -- Warning: prev() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Testing prev() function with more than expected no. of arguments -- Warning: prev() expects exactly 1 parameter, 2 given in %s on line %d NULL ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/prev_error2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/prev_error2.phpt +++ php-src/ext/standard/tests/array/prev_error2.phpt --TEST-- prev - ensure warning is received when passing an indirect temporary. --FILE-- ?php /* Prototype : mixed prev(array $array_arg) * Description: Move array argument's internal pointer to the previous element and return it * Source code: ext/standard/array.c */ /* * Pass temporary variables to prev() to test behaviour */ function f() { $array = array(1,2); end($array); return $array; } echo \n-- Passing an indirect temporary variable --\n; var_dump(prev(f())); ? --EXPECTF-- -- Passing an indirect temporary variable -- Strict Standards: Only variables should be passed by reference in %s on line %d int(1) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/prev_error3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/prev_error3.phpt +++ php-src/ext/standard/tests/array/prev_error3.phpt --TEST-- prev - ensure we cannot pass a temporary --FILE-- ?php /* Prototype : mixed prev(array $array_arg) * Description: Move array argument's internal pointer to the previous element and return it * Source code: ext/standard/array.c */ /* * Pass temporary variables to prev() to test behaviour */ var_dump(prev(array(1, 2))); ? --EXPECTF-- Fatal error: Only variables can be passed by reference in %s on line %d http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/prev_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/prev_variation1.phpt +++ php-src/ext/standard/tests/array/prev_variation1.phpt --TEST-- Test prev() function : usage variation - Pass different data types as $array_arg --FILE-- ?php /* Prototype : mixed prev(array $array_arg) * Description: Move array argument's
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array prev_basic.phpt prev_error1.phpt prev_error2.phpt prev_error3.phpt prev_variation1.phpt prev_variation2.phpt
lstrojnyThu Sep 11 18:21:37 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array prev_basic.phpt prev_error1.phpt prev_error2.phpt prev_error3.phpt prev_variation1.phpt prev_variation2.phpt Log: MFH: prev()-tests by Iain Lewis [EMAIL PROTECTED] http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/prev_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/prev_basic.phpt +++ php-src/ext/standard/tests/array/prev_basic.phpt --TEST-- Test prev() function : basic functionality --FILE-- ?php /* Prototype : mixed prev(array $array_arg) * Description: Move array argument's internal pointer to the previous element and return it * Source code: ext/standard/array.c */ /* * Test basic functionality of prev() */ echo *** Testing prev() : basic functionality ***\n; $array = array('zero', 'one', 'two'); end($array); echo key($array) . = . current($array) . \n; var_dump(prev($array)); echo key($array) . = . current($array) . \n; var_dump(prev($array)); echo key($array) . = . current($array) . \n; var_dump(prev($array)); echo \n*** Testing an array with differing values/keys ***\n; $array2 = array('one', 2 = help, 3, false, 'stringkey2' = 'val2', 'stringkey1' = 'val1'); end($array2); $length = count($array2); for ($i = $length; $i 0; $i--) { var_dump(prev($array2)); } ? ===DONE=== --EXPECTF-- *** Testing prev() : basic functionality *** 2 = two unicode(3) one 1 = one unicode(4) zero 0 = zero bool(false) *** Testing an array with differing values/keys *** unicode(4) val2 bool(false) int(3) unicode(4) help unicode(3) one bool(false) ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/prev_error1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/prev_error1.phpt +++ php-src/ext/standard/tests/array/prev_error1.phpt --TEST-- Test prev() function : error conditions - Pass incorrect number of arguments --FILE-- ?php /* Prototype : mixed prev(array $array_arg) * Description: Move array argument's internal pointer to the previous element and return it * Source code: ext/standard/array.c */ /* * Pass incorrect number of arguments to prev() to test behaviour */ echo *** Testing prev() : error conditions ***\n; // Zero arguments echo \n-- Testing prev() function with Zero arguments --\n; var_dump( prev() ); //Test prev with one more than the expected number of arguments echo \n-- Testing prev() function with more than expected no. of arguments --\n; $array_arg = array(1, 2); $extra_arg = 10; var_dump( prev($array_arg, $extra_arg) ); ? ===DONE=== --EXPECTF-- *** Testing prev() : error conditions *** -- Testing prev() function with Zero arguments -- Warning: prev() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Testing prev() function with more than expected no. of arguments -- Warning: prev() expects exactly 1 parameter, 2 given in %s on line %d NULL ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/prev_error2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/prev_error2.phpt +++ php-src/ext/standard/tests/array/prev_error2.phpt --TEST-- prev - ensure warning is received when passing an indirect temporary. --FILE-- ?php /* Prototype : mixed prev(array $array_arg) * Description: Move array argument's internal pointer to the previous element and return it * Source code: ext/standard/array.c */ /* * Pass temporary variables to prev() to test behaviour */ function f() { $array = array(1,2); end($array); return $array; } echo \n-- Passing an indirect temporary variable --\n; var_dump(prev(f())); ? --EXPECTF-- -- Passing an indirect temporary variable -- Strict Standards: Only variables should be passed by reference in %s on line %d int(1) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/prev_error3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/prev_error3.phpt +++ php-src/ext/standard/tests/array/prev_error3.phpt --TEST-- prev - ensure we cannot pass a temporary --FILE-- ?php /* Prototype : mixed prev(array $array_arg) * Description: Move array argument's internal pointer to the previous element and return it * Source code: ext/standard/array.c */ /* * Pass temporary variables to prev() to test behaviour */ var_dump(prev(array(1, 2))); ? --EXPECTF-- Fatal error: Only variables can be passed by reference in %s on line %d http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/prev_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/prev_variation1.phpt +++ php-src/ext/standard/tests/array/prev_variation1.phpt --TEST-- Test prev() function : usage variation - Pass different data types as $array_arg --FILE-- ?php /* Prototype : mixed prev(array $array_arg) * Description: Move
[PHP-CVS] cvs: win-installer / PHPInstallerBase52NTS.wxs PHPInstallerBase53NTS.wxs PHPInstallerBase60NTS.wxs PHPInstallerCommonNTS.wxs WebServerConfig52NTS.wxs WebServerConfig53NTS.wxs WebServerConfig
jmertic Thu Sep 11 19:14:57 2008 UTC Modified files: /win-installer PHPInstallerBase52NTS.wxs PHPInstallerBase53NTS.wxs PHPInstallerBase60NTS.wxs PHPInstallerCommonNTS.wxs WebServerConfig52NTS.wxs WebServerConfig53NTS.wxs WebServerConfig60NTS.wxs Log: Added option to install just the CGI binary for the NTS builds ( no auto config ) http://cvs.php.net/viewvc.cgi/win-installer/PHPInstallerBase52NTS.wxs?r1=1.3r2=1.4diff_format=u Index: win-installer/PHPInstallerBase52NTS.wxs diff -u win-installer/PHPInstallerBase52NTS.wxs:1.3 win-installer/PHPInstallerBase52NTS.wxs:1.4 --- win-installer/PHPInstallerBase52NTS.wxs:1.3 Wed Sep 10 20:32:05 2008 +++ win-installer/PHPInstallerBase52NTS.wxs Thu Sep 11 19:14:57 2008 @@ -396,6 +396,14 @@ ComponentRef Id=cgiforceredirect/ ComponentRef Id=iis4FastCGIregistry/ /Feature + Feature AllowAdvertise=no + Id=cgi + Title=$(loc.FeaturecgiTitle) + Description=$(loc.FeaturecgiDescription) + Level=1 + ComponentRef Id=phpcgiEXE/ + ComponentRef Id=cgiregistry/ +/Feature Feature AllowAdvertise=no Id=noconfig Title=$(loc.FeaturecgiTitle) http://cvs.php.net/viewvc.cgi/win-installer/PHPInstallerBase53NTS.wxs?r1=1.2r2=1.3diff_format=u Index: win-installer/PHPInstallerBase53NTS.wxs diff -u win-installer/PHPInstallerBase53NTS.wxs:1.2 win-installer/PHPInstallerBase53NTS.wxs:1.3 --- win-installer/PHPInstallerBase53NTS.wxs:1.2 Wed Sep 10 20:32:05 2008 +++ win-installer/PHPInstallerBase53NTS.wxs Thu Sep 11 19:14:57 2008 @@ -374,6 +374,14 @@ ComponentRef Id=cgiforceredirect/ ComponentRef Id=iis4FastCGIregistry/ /Feature + Feature AllowAdvertise=no + Id=cgi + Title=$(loc.FeaturecgiTitle) + Description=$(loc.FeaturecgiDescription) + Level=1 + ComponentRef Id=phpcgiEXE/ + ComponentRef Id=cgiregistry/ +/Feature Feature AllowAdvertise=no Id=noconfig Title=$(loc.FeaturecgiTitle) @@ -404,14 +412,17 @@ CustomAction Id=iis700FastCGIadd ExeCommand=quot;[WindowsFolder]system32\inetsrv\APPCMD.EXEquot; SET CONFIG /section:system.webServer/fastCGI /+[fullPath='[INSTALLDIR]php-cgi.exe'] Return=ignore + Execute=deferred Directory=INSTALLDIR/ CustomAction Id=iis700FastCGI ExeCommand=quot;[WindowsFolder]system32\inetsrv\APPCMD.EXEquot; SET CONFIG /section:system.webServer/handlers /+[name='PHP-FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='[INSTALLDIR]php-cgi.exe',resourceType='Either'] Return=ignore + Execute=deferred Directory=INSTALLDIR/ CustomAction Id=iis700FastCGIremove ExeCommand=quot;[WindowsFolder]system32\inetsrv\APPCMD.EXEquot; SET CONFIG /section:system.webServer/handlers /-[name='PHP-FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='[INSTALLDIR]php-cgi.exe',resourceType='Either'] Return=ignore + Execute=deferred Directory=INSTALLDIR/ CustomAction Id=fcgiconfigJSFastCGI ExeCommand=cscript quot;[WindowsFolder]system32\inetsrv\fcgiconfig.jsquot; -add -section:quot;PHPquot; -extension:php -path:quot;[INSTALLDIR]php-cgi.exequot; @@ -431,13 +442,13 @@ VBScriptCall=unconfigIIS4 / InstallExecuteSequence - Custom Action=iis700FastCGIadd After=InstallFinalize + Custom Action=iis700FastCGIadd After=InstallInitialize ![CDATA[VersionNT = 600 AND iis4FastCGI = 3]] /Custom - Custom Action=iis700FastCGI After=InstallFinalize + Custom Action=iis700FastCGI After=InstallInitialize ![CDATA[VersionNT = 600 AND iis4FastCGI = 3]] /Custom - Custom Action=iis700FastCGIremove After=InstallFinalize + Custom Action=iis700FastCGIremove After=InstallInitialize ![CDATA[VersionNT = 600 AND iis4FastCGI = 2]] /Custom Custom Action=fcgiconfigJSFastCGI After=InstallFinalize http://cvs.php.net/viewvc.cgi/win-installer/PHPInstallerBase60NTS.wxs?r1=1.3r2=1.4diff_format=u Index: win-installer/PHPInstallerBase60NTS.wxs diff -u win-installer/PHPInstallerBase60NTS.wxs:1.3 win-installer/PHPInstallerBase60NTS.wxs:1.4 --- win-installer/PHPInstallerBase60NTS.wxs:1.3 Wed Sep 10 20:33:14 2008 +++ win-installer/PHPInstallerBase60NTS.wxs Thu Sep 11 19:14:57 2008 @@ -374,6 +374,14 @@ ComponentRef Id=cgiforceredirect/ ComponentRef Id=iis4FastCGIregistry/ /Feature + Feature AllowAdvertise=no + Id=cgi + Title=$(loc.FeaturecgiTitle) + Description=$(loc.FeaturecgiDescription) + Level=1 + ComponentRef Id=phpcgiEXE/ + ComponentRef Id=cgiregistry/ +/Feature
[PHP-CVS] cvs: win-installer / GenPHPInstaller.wxs.php build.bat
jmertic Thu Sep 11 19:16:37 2008 UTC Modified files: /win-installer GenPHPInstaller.wxs.php build.bat Log: Enable installer for VC9 x64 PHP builds. http://cvs.php.net/viewvc.cgi/win-installer/GenPHPInstaller.wxs.php?r1=1.6r2=1.7diff_format=u Index: win-installer/GenPHPInstaller.wxs.php diff -u win-installer/GenPHPInstaller.wxs.php:1.6 win-installer/GenPHPInstaller.wxs.php:1.7 --- win-installer/GenPHPInstaller.wxs.php:1.6 Thu Sep 11 18:54:56 2008 +++ win-installer/GenPHPInstaller.wxs.php Thu Sep 11 19:16:37 2008 @@ -22,7 +22,7 @@ $Merge = $PHPInstallerBaseWXS-createElement('Merge'); $Merge = $TargetDir-appendChild($Merge); $Merge-setAttribute('Id','VCRedist'); - $Merge-setAttribute('SourceFile','Microsoft_VC90_CRT_x86.msm'); + $Merge-setAttribute('SourceFile',Microsoft_VC90_CRT_{$includemsm}.msm); $Merge-setAttribute('DiskId','1'); $Merge-setAttribute('Language','0'); http://cvs.php.net/viewvc.cgi/win-installer/build.bat?r1=1.12r2=1.13diff_format=u Index: win-installer/build.bat diff -u win-installer/build.bat:1.12 win-installer/build.bat:1.13 --- win-installer/build.bat:1.12Thu Sep 11 18:54:56 2008 +++ win-installer/build.bat Thu Sep 11 19:16:37 2008 @@ -17,12 +17,16 @@ if %2==nts set suffix=NTS if %2==vc9 set extrabuildtype=vc9- if %2==vc9 set includevc9msm=x86 +if %2==x64 set extrabuildtype=vc9-x64- +if %2==x64 set includevc9msm=x86_x64 if (%3)==() goto build if %3==nts set extrants=nts- if %3==nts set suffix=NTS if %3==vc9 set extrabuildtype=vc9- if %3==vc9 set includevc9msm=x86 +if %3==x64 set extrabuildtype=vc9-x64- +if %3==x64 set includevc9msm=x86_x64 :build set msiname=php-%1-%extrants%win32-%extrabuildtype%installer.msi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/openssl xp_ssl.c
iliaa Thu Sep 11 23:56:44 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/opensslxp_ssl.c /php-srcNEWS Log: Fixed bug #45382 (timeout bug in stream_socket_enable_crypto). http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/xp_ssl.c?r1=1.22.2.3.2.9.2.6r2=1.22.2.3.2.9.2.7diff_format=u Index: php-src/ext/openssl/xp_ssl.c diff -u php-src/ext/openssl/xp_ssl.c:1.22.2.3.2.9.2.6 php-src/ext/openssl/xp_ssl.c:1.22.2.3.2.9.2.7 --- php-src/ext/openssl/xp_ssl.c:1.22.2.3.2.9.2.6 Fri Jul 11 10:25:15 2008 +++ php-src/ext/openssl/xp_ssl.cThu Sep 11 23:56:43 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: xp_ssl.c,v 1.22.2.3.2.9.2.6 2008/07/11 10:25:15 tony2001 Exp $ */ +/* $Id: xp_ssl.c,v 1.22.2.3.2.9.2.7 2008/09/11 23:56:43 iliaa Exp $ */ #include php.h #include ext/standard/file.h @@ -417,7 +417,7 @@ n = SSL_connect(sslsock-ssl_handle); gettimeofday(tve, tz); - timeout -= (tve.tv_sec + tve.tv_usec / 100) - (tvs.tv_sec + tvs.tv_usec / 100); + timeout -= (tve.tv_sec + (float) tve.tv_usec / 100) - (tvs.tv_sec + (float) tvs.tv_usec / 100); if (timeout 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, SSL: connection timeout); return -1; http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.314r2=1.2027.2.547.2.965.2.315diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.314 php-src/NEWS:1.2027.2.547.2.965.2.315 --- php-src/NEWS:1.2027.2.547.2.965.2.314 Thu Sep 11 03:29:54 2008 +++ php-src/NEWSThu Sep 11 23:56:43 2008 @@ -5,9 +5,13 @@ - Changed error level E_ERROR into E_WARNING in Soap extension methods parameter validation. (Felipe) +- Fixed bug #46042 (memory leaks with reflection of mb_convert_encoding()). + (Ilia) - Fixed bug #45928 (large scripts from stdin are stripped at 16K border). (Christian Schneider, Arnaud) - Fixed bug #45911 (Cannot disable ext/hash). (Arnaud) +- Fixed bug #45382 (timeout bug in stream_socket_enable_crypto). + (vnegrier at optilian dot com, Ilia 02 Sep 2008, PHP 5.3.0 Alpha 2 - Removed special treatment of /tmp in sessions for open_basedir. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/openssl xp_ssl.c
iliaa Thu Sep 11 23:56:58 2008 UTC Modified files: /php-src/ext/opensslxp_ssl.c Log: MFB: Fixed bug #45382 (timeout bug in stream_socket_enable_crypto). http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/xp_ssl.c?r1=1.38r2=1.39diff_format=u Index: php-src/ext/openssl/xp_ssl.c diff -u php-src/ext/openssl/xp_ssl.c:1.38 php-src/ext/openssl/xp_ssl.c:1.39 --- php-src/ext/openssl/xp_ssl.c:1.38 Fri Jul 11 10:24:29 2008 +++ php-src/ext/openssl/xp_ssl.cThu Sep 11 23:56:57 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: xp_ssl.c,v 1.38 2008/07/11 10:24:29 tony2001 Exp $ */ +/* $Id: xp_ssl.c,v 1.39 2008/09/11 23:56:57 iliaa Exp $ */ #include php.h #include ext/standard/file.h @@ -417,7 +417,7 @@ n = SSL_connect(sslsock-ssl_handle); gettimeofday(tve, tz); - timeout -= (tve.tv_sec + tve.tv_usec / 100) - (tvs.tv_sec + tvs.tv_usec / 100); + timeout -= (tve.tv_sec + (float) tve.tv_usec / 100) - (tvs.tv_sec + (float) tvs.tv_usec / 100); if (timeout 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, SSL: connection timeout); return -1; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard file.c /ext/standard/tests/file fputcsv_002.phpt
felipe Fri Sep 12 01:10:57 2008 UTC Added files: /php-src/ext/standard/tests/filefputcsv_002.phpt Modified files: /php-src/ext/standard file.c Log: - Fixed unexpected zval changes http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.526r2=1.527diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.526 php-src/ext/standard/file.c:1.527 --- php-src/ext/standard/file.c:1.526 Mon Sep 8 01:30:55 2008 +++ php-src/ext/standard/file.c Fri Sep 12 01:10:56 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.526 2008/09/08 01:30:55 felipe Exp $ */ +/* $Id: file.c,v 1.527 2008/09/12 01:10:56 felipe Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2000,7 +2000,7 @@ } /* }}} */ -#define FPUTCSV_FLD_CHK(c) memchr(Z_STRVAL_PP(field), c, Z_STRLEN_PP(field)) +#define FPUTCSV_FLD_CHK(c) memchr(Z_STRVAL(field), c, Z_STRLEN(field)) /* {{{ proto int fputcsv(resource fp, array fields [, string delimiter [, string enclosure]]) Format line as CSV and write to file pointer */ @@ -2012,7 +2012,7 @@ const char escape_char = '\\'; php_stream *stream; int ret; - zval *fp = NULL, *fields = NULL, **field = NULL; + zval *fp = NULL, *fields = NULL, **field_tmp = NULL, field; char *delimiter_str = NULL, *enclosure_str = NULL; int delimiter_str_len, enclosure_str_len; HashPosition pos; @@ -2054,10 +2054,13 @@ count = zend_hash_num_elements(Z_ARRVAL_P(fields)); zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(fields), pos); while (zend_hash_get_current_data_ex(Z_ARRVAL_P(fields), (void **) field, pos) == SUCCESS) { - if (Z_TYPE_PP(field) != IS_STRING) { - SEPARATE_ZVAL(field); - convert_to_string(*field); + field = **field_tmp; + + if (Z_TYPE_PP(field_tmp) != IS_STRING) { + zval_copy_ctor(field); + convert_to_string(field); } + /* enclose a field that contains a delimiter, an enclosure character, or a newline */ if (FPUTCSV_FLD_CHK(delimiter) || FPUTCSV_FLD_CHK(enclosure) || @@ -2067,8 +2070,8 @@ FPUTCSV_FLD_CHK('\t') || FPUTCSV_FLD_CHK(' ') ) { - char *ch = Z_STRVAL_PP(field); - char *end = ch + Z_STRLEN_PP(field); + char *ch = Z_STRVAL(field); + char *end = ch + Z_STRLEN(field); int escaped = 0; smart_str_appendc(csvline, enclosure); @@ -2085,13 +2088,17 @@ } smart_str_appendc(csvline, enclosure); } else { - smart_str_appendl(csvline, Z_STRVAL_PP(field), Z_STRLEN_PP(field)); + smart_str_appendl(csvline, Z_STRVAL(field), Z_STRLEN(field)); } if (++i != count) { smart_str_appendl(csvline, delimiter, 1); } zend_hash_move_forward_ex(Z_ARRVAL_P(fields), pos); + + if (Z_TYPE_PP(field_tmp) != IS_STRING) { + zval_dtor(field); + } } smart_str_appendc(csvline, '\n'); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_002.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fputcsv_002.phpt +++ php-src/ext/standard/tests/file/fputcsv_002.phpt --TEST-- fputcsv(): Checking data after calling the function --FILE-- ?php $file = dirname(__FILE__) .'/fgetcsv-test.csv'; $data = array(1, 2, 'foo', 'haha', array(4, 5, 6), 1.3, null); $fp = fopen($file, 'w'); fputcsv($fp, $data); var_dump($data); @unlink($file); ? --EXPECTF-- Notice: Array to string conversion in %s on line %d array(7) { [0]= int(1) [1]= int(2) [2]= unicode(3) foo [3]= unicode(4) haha [4]= array(3) { [0]= int(4) [1]= int(5) [2]= int(6) } [5]= float(1.3) [6]= NULL } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard file.c /ext/standard/tests/file fputcsv_002.phpt
felipe Fri Sep 12 01:14:14 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filefputcsv_002.phpt Modified files: /php-src/ext/standard file.c Log: - MFH: Fixed unexpected zval changes http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.28.2.21r2=1.409.2.6.2.28.2.22diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6.2.28.2.21 php-src/ext/standard/file.c:1.409.2.6.2.28.2.22 --- php-src/ext/standard/file.c:1.409.2.6.2.28.2.21 Tue Aug 12 19:38:54 2008 +++ php-src/ext/standard/file.c Fri Sep 12 01:14:14 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.409.2.6.2.28.2.21 2008/08/12 19:38:54 felipe Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.28.2.22 2008/09/12 01:14:14 felipe Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1866,7 +1866,7 @@ } /* }}} */ -#define FPUTCSV_FLD_CHK(c) memchr(Z_STRVAL_PP(field), c, Z_STRLEN_PP(field)) +#define FPUTCSV_FLD_CHK(c) memchr(Z_STRVAL(field), c, Z_STRLEN(field)) /* {{{ proto int fputcsv(resource fp, array fields [, string delimiter [, string enclosure]]) Format line as CSV and write to file pointer */ @@ -1877,7 +1877,7 @@ const char escape_char = '\\'; php_stream *stream; int ret; - zval *fp = NULL, *fields = NULL, **field = NULL; + zval *fp = NULL, *fields = NULL, **field_tmp = NULL, field; char *delimiter_str = NULL, *enclosure_str = NULL; int delimiter_str_len, enclosure_str_len; HashPosition pos; @@ -1918,11 +1918,14 @@ count = zend_hash_num_elements(Z_ARRVAL_P(fields)); zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(fields), pos); - while (zend_hash_get_current_data_ex(Z_ARRVAL_P(fields), (void **) field, pos) == SUCCESS) { - if (Z_TYPE_PP(field) != IS_STRING) { - SEPARATE_ZVAL(field); - convert_to_string(*field); + while (zend_hash_get_current_data_ex(Z_ARRVAL_P(fields), (void **) field_tmp, pos) == SUCCESS) { + field = **field_tmp; + + if (Z_TYPE_PP(field_tmp) != IS_STRING) { + zval_copy_ctor(field); + convert_to_string(field); } + /* enclose a field that contains a delimiter, an enclosure character, or a newline */ if (FPUTCSV_FLD_CHK(delimiter) || FPUTCSV_FLD_CHK(enclosure) || @@ -1932,8 +1935,8 @@ FPUTCSV_FLD_CHK('\t') || FPUTCSV_FLD_CHK(' ') ) { - char *ch = Z_STRVAL_PP(field); - char *end = ch + Z_STRLEN_PP(field); + char *ch = Z_STRVAL(field); + char *end = ch + Z_STRLEN(field); int escaped = 0; smart_str_appendc(csvline, enclosure); @@ -1950,13 +1953,17 @@ } smart_str_appendc(csvline, enclosure); } else { - smart_str_appendl(csvline, Z_STRVAL_PP(field), Z_STRLEN_PP(field)); + smart_str_appendl(csvline, Z_STRVAL(field), Z_STRLEN(field)); } if (++i != count) { smart_str_appendl(csvline, delimiter, 1); } zend_hash_move_forward_ex(Z_ARRVAL_P(fields), pos); + + if (Z_TYPE_PP(field_tmp) != IS_STRING) { + zval_dtor(field); + } } smart_str_appendc(csvline, '\n'); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_002.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/fputcsv_002.phpt +++ php-src/ext/standard/tests/file/fputcsv_002.phpt --TEST-- fputcsv(): Checking data after calling the function --FILE-- ?php $file = dirname(__FILE__) .'/fgetcsv-test.csv'; $data = array(1, 2, 'foo', 'haha', array(4, 5, 6), 1.3, null); $fp = fopen($file, 'w'); fputcsv($fp, $data); var_dump($data); @unlink($file); ? --EXPECTF-- Notice: Array to string conversion in %s on line %d array(7) { [0]= int(1) [1]= int(2) [2]= unicode(3) foo [3]= unicode(4) haha [4]= array(3) { [0]= int(4) [1]= int(5) [2]= int(6) } [5]= float(1.3) [6]= NULL } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php