[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Fri Jan 9 01:32:25 2009 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1425r2=1.1426diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.1425 ZendEngine2/ChangeLog:1.1426 --- ZendEngine2/ChangeLog:1.1425Thu Jan 8 01:32:26 2009 +++ ZendEngine2/ChangeLog Fri Jan 9 01:32:25 2009 @@ -1,3 +1,33 @@ +2009-01-08 Antony Dovgal t...@daylessday.org + +* (PHP_5_3) + zend_compile.c: + MFH: use correct check for constants and stop segfaulting + (5_2 doesn't need this) + +* zend_compile.c: + use correct check for constants and stop segfaulting + +2009-01-08 Andrei Zmievski and...@gravitonic.com + +* (PHP_5_2) + zend_API.c + tests/access_modifiers_012.phpt + tests/access_modifiers_012.phpt: + Handle __call() on protected/private method access for callbacks too. + +2009-01-08 Antony Dovgal t...@daylessday.org + +* zend_object_handlers.c: + fix ZTS build + +2009-01-08 Andrei Zmievski and...@gravitonic.com + +* (PHP_5_2) + zend_object_handlers.c + tests/access_modifiers_011.phpt: + MFB + 2009-01-07 Andrei Zmievski and...@gravitonic.com * tests/access_modifiers_011.phpt @@ -27421,7 +27451,7 @@ 2003-06-10 Jani Taskinen sni...@iki.fi * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.1425 2009/01/08 01:32:26 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.1426 2009/01/09 01:32:25 changelog Exp $ tag 2003-06-10 James Cox ja...@imajes.info @@ -29145,7 +29175,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.1425 2009/01/08 01:32:26 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.1426 2009/01/09 01:32:25 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky i...@prohost.org
[PHP-CVS] cvs: php-src /ext/standard/tests/file lstat_stat_variation3.phpt rename_basic.phpt
wharmby Thu Jan 8 10:39:50 2009 UTC Modified files: /php-src/ext/standard/tests/filerename_basic.phpt lstat_stat_variation3.phpt Log: Fix bogus file tests - addresses 2 failures in PHP GCOV reports. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/rename_basic.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/standard/tests/file/rename_basic.phpt diff -u php-src/ext/standard/tests/file/rename_basic.phpt:1.5 php-src/ext/standard/tests/file/rename_basic.phpt:1.6 --- php-src/ext/standard/tests/file/rename_basic.phpt:1.5 Wed Nov 26 17:48:40 2008 +++ php-src/ext/standard/tests/file/rename_basic.phpt Thu Jan 8 10:39:50 2009 @@ -8,29 +8,30 @@ echo *** Testing rename() on non-existing file ***\n; $file_path = dirname(__FILE__); +require $file_path/file.inc; + $src_name = $file_path/rename_basic.tmp; $dest_name = $file_path/rename_basic_new.tmp; // create the file $fp = fopen($src_name, w); -$s1 = stat($src_name); +$old_stat = stat($src_name); fclose($fp); var_dump( rename($src_name, $dest_name) ); // expecting true var_dump( file_exists($src_name) ); // expecting false var_dump( file_exists($dest_name) ); // expecting true -$s2 = stat($file_path/rename_basic_new.tmp); +$new_stat = stat($file_path/rename_basic_new.tmp); -// checking statistics of old and renamed file - both should be same -for ($i = 0; $i = 12; $i++) { - if ($s1[$i] != $s2[$i]) { -echo rename_basic.tmp and rename_basic_new.tmp stat differ at element $i\n; - } -} +// checking statistics of old and renamed file - both should be same except ctime +$keys_to_compare = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, + dev, ino, mode, nlink, uid, gid, + rdev, size, atime, mtime, blksize, blocks); +var_dump( compare_stats($old_stat, $new_stat, $keys_to_compare) ); -echo Done\n; ? +===Done=== --CLEAN-- ?php unlink(dirname(__FILE__)./rename_basic.tmp); @@ -41,5 +42,6 @@ bool(true) bool(false) bool(true) -Done +bool(true) +===Done=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/lstat_stat_variation3.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/standard/tests/file/lstat_stat_variation3.phpt diff -u php-src/ext/standard/tests/file/lstat_stat_variation3.phpt:1.3 php-src/ext/standard/tests/file/lstat_stat_variation3.phpt:1.4 --- php-src/ext/standard/tests/file/lstat_stat_variation3.phpt:1.3 Tue May 27 09:34:54 2008 +++ php-src/ext/standard/tests/file/lstat_stat_variation3.phpt Thu Jan 8 10:39:50 2009 @@ -40,12 +40,13 @@ var_dump( compare_self_stat($old_stat) ); var_dump( compare_self_stat($new_stat) ); -// compare the two stats -var_dump( compare_stats($old_stat, $new_stat, $all_stat_keys) ); - -echo \n--- Done ---; +// compare the two stats - all except ctime +$keys_to_compare = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, + dev, ino, mode, nlink, uid, gid, + rdev, size, atime, mtime, blksize, blocks); +var_dump( compare_stats($old_stat, $new_stat, $keys_to_compare) ); ? - +===Done=== --CLEAN-- ?php $file_path = dirname(__FILE__); @@ -58,5 +59,4 @@ bool(true) bool(true) bool(true) - Done --- +===Done=== -- 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/tests/file lstat_stat_variation3.phpt rename_basic.phpt
wharmby Thu Jan 8 10:40:36 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filelstat_stat_variation3.phpt rename_basic.phpt Log: Fix bogus file tests - addresses 2 failures in PHP GCOV reports. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/lstat_stat_variation3.phpt?r1=1.1.2.3r2=1.1.2.3.2.1diff_format=u Index: php-src/ext/standard/tests/file/lstat_stat_variation3.phpt diff -u php-src/ext/standard/tests/file/lstat_stat_variation3.phpt:1.1.2.3 php-src/ext/standard/tests/file/lstat_stat_variation3.phpt:1.1.2.3.2.1 --- php-src/ext/standard/tests/file/lstat_stat_variation3.phpt:1.1.2.3 Thu Jul 26 13:38:24 2007 +++ php-src/ext/standard/tests/file/lstat_stat_variation3.phpt Thu Jan 8 10:40:36 2009 @@ -40,23 +40,23 @@ var_dump( compare_self_stat($old_stat) ); var_dump( compare_self_stat($new_stat) ); -// compare the two stats -var_dump( compare_stats($old_stat, $new_stat, $all_stat_keys) ); - -echo \n--- Done ---; +// compare the two stats - all except ctime +$keys_to_compare = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, + dev, ino, mode, nlink, uid, gid, + rdev, size, atime, mtime, blksize, blocks); +var_dump( compare_stats($old_stat, $new_stat, $keys_to_compare) ); ? - +===Done=== --CLEAN-- ?php $file_path = dirname(__FILE__); unlink($file_path/lstat_stat_variation3.tmp); unlink($file_path/lstat_stat_variation_link3a.tmp); ? ---EXPECTF-- +--EXPECT-- *** Testing lstat() for link after being renamed *** bool(true) bool(true) bool(true) bool(true) - Done --- +===Done=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/rename_basic.phpt?r1=1.1.2.1.2.1r2=1.1.2.1.2.2diff_format=u Index: php-src/ext/standard/tests/file/rename_basic.phpt diff -u php-src/ext/standard/tests/file/rename_basic.phpt:1.1.2.1.2.1 php-src/ext/standard/tests/file/rename_basic.phpt:1.1.2.1.2.2 --- php-src/ext/standard/tests/file/rename_basic.phpt:1.1.2.1.2.1 Wed Apr 30 13:53:52 2008 +++ php-src/ext/standard/tests/file/rename_basic.phpt Thu Jan 8 10:40:36 2009 @@ -8,38 +8,39 @@ echo *** Testing rename() on non-existing file ***\n; $file_path = dirname(__FILE__); +require $file_path/file.inc; + $src_name = $file_path/rename_basic.tmp; $dest_name = $file_path/rename_basic_new.tmp; // create the file $fp = fopen($src_name, w); -$s1 = stat($src_name); +$old_stat = stat($src_name); fclose($fp); var_dump( rename($src_name, $dest_name) ); // expecting true var_dump( file_exists($src_name) ); // expecting false var_dump( file_exists($dest_name) ); // expecting true -$s2 = stat($file_path/rename_basic_new.tmp); +$new_stat = stat($file_path/rename_basic_new.tmp); -// checking statistics of old and renamed file - both should be same -for ($i = 0; $i = 12; $i++) { - if ($s1[$i] != $s2[$i]) { -echo rename_basic.tmp and rename_basic_new.tmp stat differ at element $i\n; - } -} +// checking statistics of old and renamed file - both should be same except ctime +$keys_to_compare = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, + dev, ino, mode, nlink, uid, gid, + rdev, size, atime, mtime, blksize, blocks); +var_dump( compare_stats($old_stat, $new_stat, $keys_to_compare) ); -echo Done\n; ? +===Done=== --CLEAN-- ?php unlink(dirname(__FILE__)./rename_basic.tmp); unlink(dirname(__FILE__)./rename_basic_new.tmp); ? ---EXPECTF-- +--EXPECT-- *** Testing rename() on non-existing file *** bool(true) bool(false) bool(true) -Done - +bool(true) +===Done=== -- 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/standard/tests/file lstat_stat_variation3.phpt rename_basic.phpt
wharmby Thu Jan 8 10:41:08 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/filelstat_stat_variation3.phpt rename_basic.phpt Log: Fix bogus file tests - addresses 2 failures in PHP GCOV reports. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/lstat_stat_variation3.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/standard/tests/file/lstat_stat_variation3.phpt diff -u php-src/ext/standard/tests/file/lstat_stat_variation3.phpt:1.1.2.3 php-src/ext/standard/tests/file/lstat_stat_variation3.phpt:1.1.2.4 --- php-src/ext/standard/tests/file/lstat_stat_variation3.phpt:1.1.2.3 Thu Jul 26 13:38:24 2007 +++ php-src/ext/standard/tests/file/lstat_stat_variation3.phpt Thu Jan 8 10:41:07 2009 @@ -40,23 +40,24 @@ var_dump( compare_self_stat($old_stat) ); var_dump( compare_self_stat($new_stat) ); -// compare the two stats -var_dump( compare_stats($old_stat, $new_stat, $all_stat_keys) ); +// compare the two stats - all except ctime +$keys_to_compare = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, + dev, ino, mode, nlink, uid, gid, + rdev, size, atime, mtime, blksize, blocks); +var_dump( compare_stats($old_stat, $new_stat, $keys_to_compare) ); -echo \n--- Done ---; ? - +===Done=== --CLEAN-- ?php $file_path = dirname(__FILE__); unlink($file_path/lstat_stat_variation3.tmp); unlink($file_path/lstat_stat_variation_link3a.tmp); ? ---EXPECTF-- +--EXPECT-- *** Testing lstat() for link after being renamed *** bool(true) bool(true) bool(true) bool(true) - Done --- +===Done=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/rename_basic.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/file/rename_basic.phpt diff -u php-src/ext/standard/tests/file/rename_basic.phpt:1.1.2.2 php-src/ext/standard/tests/file/rename_basic.phpt:1.1.2.3 --- php-src/ext/standard/tests/file/rename_basic.phpt:1.1.2.2 Wed Apr 30 13:53:49 2008 +++ php-src/ext/standard/tests/file/rename_basic.phpt Thu Jan 8 10:41:07 2009 @@ -8,38 +8,40 @@ echo *** Testing rename() on non-existing file ***\n; $file_path = dirname(__FILE__); +require $file_path/file.inc; + $src_name = $file_path/rename_basic.tmp; $dest_name = $file_path/rename_basic_new.tmp; // create the file $fp = fopen($src_name, w); -$s1 = stat($src_name); +$old_stat = stat($src_name); fclose($fp); var_dump( rename($src_name, $dest_name) ); // expecting true var_dump( file_exists($src_name) ); // expecting false var_dump( file_exists($dest_name) ); // expecting true -$s2 = stat($file_path/rename_basic_new.tmp); +$new_stat = stat($file_path/rename_basic_new.tmp); -// checking statistics of old and renamed file - both should be same -for ($i = 0; $i = 12; $i++) { - if ($s1[$i] != $s2[$i]) { -echo rename_basic.tmp and rename_basic_new.tmp stat differ at element $i\n; - } -} +// checking statistics of old and renamed file - both should be same except ctime +$keys_to_compare = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, + dev, ino, mode, nlink, uid, gid, + rdev, size, atime, mtime, blksize, blocks); +var_dump( compare_stats($old_stat, $new_stat, $keys_to_compare) ); -echo Done\n; ? +===Done=== --CLEAN-- ?php unlink(dirname(__FILE__)./rename_basic.tmp); unlink(dirname(__FILE__)./rename_basic_new.tmp); ? ---EXPECTF-- +--EXPECT-- *** Testing rename() on non-existing file *** bool(true) bool(false) bool(true) -Done +bool(true) +===Done=== -- 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/json/tests bug46944.phpt
scottmacThu Jan 8 13:35:58 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/json/tests bug46944.phpt Log: Fix broken test http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/bug46944.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/json/tests/bug46944.phpt diff -u php-src/ext/json/tests/bug46944.phpt:1.1.2.1 php-src/ext/json/tests/bug46944.phpt:1.1.2.2 --- php-src/ext/json/tests/bug46944.phpt:1.1.2.1Fri Jan 2 03:02:22 2009 +++ php-src/ext/json/tests/bug46944.phptThu Jan 8 13:35:58 2009 @@ -6,7 +6,10 @@ ?php for ($i = 1; $i = 16; $i++) { - echo json_encode(baa . (0xf0|($i 2)) . (0x8f|($i 3) 4) . \xbf\xbdzz) . \n; + $first = 0xf0|($i 2); + $second = 0x8f|($i 3) 4; + $string = sprintf(aa%c%c\xbf\xbdzz, $low, $high); + echo json_encode($string) . \n; } -- 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/json/tests bug46944.phpt
scottmacThu Jan 8 14:09:49 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/json/tests bug46944.phpt Log: Fix test again... http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/bug46944.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/json/tests/bug46944.phpt diff -u php-src/ext/json/tests/bug46944.phpt:1.1.2.2 php-src/ext/json/tests/bug46944.phpt:1.1.2.3 --- php-src/ext/json/tests/bug46944.phpt:1.1.2.2Thu Jan 8 13:35:58 2009 +++ php-src/ext/json/tests/bug46944.phptThu Jan 8 14:09:49 2009 @@ -8,14 +8,14 @@ for ($i = 1; $i = 16; $i++) { $first = 0xf0|($i 2); $second = 0x8f|($i 3) 4; - $string = sprintf(aa%c%c\xbf\xbdzz, $low, $high); + $string = sprintf(aa%c%c\xbf\xbdzz, $first, $second); echo json_encode($string) . \n; } echo Done\n; ? ---EXPECT-- +--EXPECT-- aa\ud83f\udffdzz aa\ud87f\udffdzz aa\ud8bf\udffdzz -- 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/imap php_imap.c
iliaa Thu Jan 8 16:13:52 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/imap php_imap.c Log: Improved parameter fixing address a compiler warning http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.26.2.30r2=1.208.2.7.2.26.2.31diff_format=u Index: php-src/ext/imap/php_imap.c diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.30 php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.31 --- php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.30 Wed Jan 7 18:26:27 2009 +++ php-src/ext/imap/php_imap.c Thu Jan 8 16:13:51 2009 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski z...@zend.com | +--+ */ -/* $Id: php_imap.c,v 1.208.2.7.2.26.2.30 2009/01/07 18:26:27 felipe Exp $ */ +/* $Id: php_imap.c,v 1.208.2.7.2.26.2.31 2009/01/08 16:13:51 iliaa Exp $ */ #define IMAP41 @@ -1204,20 +1204,19 @@ zval *streamind; char *mailbox; int mailbox_len; - long options, retries; + long options = NULL, retries = NULL; pils *imap_le_struct; MAILSTREAM *imap_stream; long flags=NIL; long cl_flags=NIL; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, rs|ll, streamind, mailbox, mailbox_len, options, retries) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs|ll, streamind, mailbox, mailbox_len, options, retries) == FAILURE) { return; } ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, le_imap); - if (argc = 3) { + if (options) { flags = options; if (flags PHP_EXPUNGE) { cl_flags = CL_EXPUNGE; @@ -1226,7 +1225,7 @@ imap_le_struct-flags = cl_flags; } #ifdef SET_MAXLOGINTRIALS - if (argc == 4) { + if (retries) { mail_parameters(NIL, SET_MAXLOGINTRIALS, (void *) retries); } #endif @@ -1256,9 +1255,8 @@ int folder_len, message_len, flags_len = 0; pils *imap_le_struct; STRING st; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, rss|s, streamind, folder, folder_len, message, message_len, flags, flags_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rss|s, streamind, folder, folder_len, message, message_len, flags, flags_len) == FAILURE) { return; } @@ -1266,7 +1264,7 @@ INIT (st, mail_string, (void *) message, message_len); - if (mail_append_full(imap_le_struct-imap_stream, folder, (argc == 4 ? flags : NIL), NIL, st)) { + if (mail_append_full(imap_le_struct-imap_stream, folder, (flags ? flags : NIL), NIL, st)) { RETURN_TRUE; } else { RETURN_FALSE; @@ -2852,17 +2850,16 @@ zval *streamind; char *sequence, *flag; int sequence_len, flag_len; - long flags; + long flags = NULL; pils *imap_le_struct; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, rss|l, streamind, sequence, sequence_len, flag, flag_len, flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rss|l, streamind, sequence, sequence_len, flag, flag_len, flags) == FAILURE) { return; } ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, le_imap); - mail_setflag_full(imap_le_struct-imap_stream, sequence, flag, (argc == 4 ? flags : NIL)); + mail_setflag_full(imap_le_struct-imap_stream, sequence, flag, (flags ? flags : NIL)); RETURN_TRUE; } /* }}} */ @@ -4103,34 +4100,6 @@ } /* }}} */ -/* {{{ _php_rfc822_len - * Calculate string length based on imap's rfc822_cat function. - */ -static int _php_rfc822_len(char *str) -{ - int len; - char *p; - - if (!str || !*str) { - return 0; - } - - /* strings with special characters will need to be quoted, as a safety measure we -* add 2 bytes for the quotes just in case. -*/ - len = strlen(str) + 2; - p = str; - /* rfc822_cat() will escape all and \ characters, therefor we need to increase -* our buffer length to account for these characters. -*/ - while ((p = strpbrk(p, \\\))) { - p++; - len++; - } - - return len; -} -/* }}} */ /* Support Functions */ @@ -4170,6 +4139,35 @@ #else +/* {{{ _php_rfc822_len + * Calculate string length based on imap's rfc822_cat function. + */ +static int _php_rfc822_len(char *str) +{ + int len; + char *p; + + if (!str || !*str) { + return 0; + } + + /* strings with special characters will need to be quoted, as a safety measure we +* add 2 bytes for
[PHP-CVS] cvs: php-src /ext/imap php_imap.c
iliaa Thu Jan 8 16:15:45 2009 UTC Modified files: /php-src/ext/imap php_imap.c Log: MFB: Improved parameter fixing address a compiler warning http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.270r2=1.271diff_format=u Index: php-src/ext/imap/php_imap.c diff -u php-src/ext/imap/php_imap.c:1.270 php-src/ext/imap/php_imap.c:1.271 --- php-src/ext/imap/php_imap.c:1.270 Wed Jan 7 18:25:50 2009 +++ php-src/ext/imap/php_imap.c Thu Jan 8 16:15:45 2009 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski z...@zend.com | +--+ */ -/* $Id: php_imap.c,v 1.270 2009/01/07 18:25:50 felipe Exp $ */ +/* $Id: php_imap.c,v 1.271 2009/01/08 16:15:45 iliaa Exp $ */ #define IMAP41 @@ -1191,20 +1191,19 @@ zval *streamind; char *mailbox; int mailbox_len; - long options, retries; + long options = NULL, retries = NULL; pils *imap_le_struct; MAILSTREAM *imap_stream; long flags=NIL; long cl_flags=NIL; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, rs|ll, streamind, mailbox, mailbox_len, options, retries) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs|ll, streamind, mailbox, mailbox_len, options, retries) == FAILURE) { return; } ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, le_imap); - if (argc = 3) { + if (options) { flags = options; if (flags PHP_EXPUNGE) { cl_flags = CL_EXPUNGE; @@ -1213,7 +1212,7 @@ imap_le_struct-flags = cl_flags; } #ifdef SET_MAXLOGINTRIALS - if (argc == 4) { + if (retries) { mail_parameters(NIL, SET_MAXLOGINTRIALS, (void *) retries); } #endif @@ -1241,9 +1240,8 @@ int folder_len, message_len, flags_len = 0; pils *imap_le_struct; STRING st; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, rss|s, streamind, folder, folder_len, message, message_len, flags, flags_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rss|s, streamind, folder, folder_len, message, message_len, flags, flags_len) == FAILURE) { return; } @@ -1251,7 +1249,7 @@ INIT (st, mail_string, (void *) message, message_len); - if (mail_append_full(imap_le_struct-imap_stream, folder, (argc == 4 ? flags : NIL), NIL, st)) { + if (mail_append_full(imap_le_struct-imap_stream, folder, (flags ? flags : NIL), NIL, st)) { RETURN_TRUE; } else { RETURN_FALSE; @@ -2840,17 +2838,16 @@ zval *streamind; char *sequence, *flag; int sequence_len, flag_len; - long flags; + long flags = NULL; pils *imap_le_struct; - int argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, rss|l, streamind, sequence, sequence_len, flag, flag_len, flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rss|l, streamind, sequence, sequence_len, flag, flag_len, flags) == FAILURE) { return; } ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, le_imap); - mail_setflag_full(imap_le_struct-imap_stream, sequence, flag, (argc == 4 ? flags : NIL)); + mail_setflag_full(imap_le_struct-imap_stream, sequence, flag, (flags ? flags : NIL)); RETURN_TRUE; } /* }}} */ @@ -4093,34 +4090,6 @@ } /* }}} */ -/* {{{ _php_rfc822_len - * Calculate string length based on imap's rfc822_cat function. - */ -static int _php_rfc822_len(char *str) -{ - int len; - char *p; - - if (!str || !*str) { - return 0; - } - - /* strings with special characters will need to be quoted, as a safety measure we -* add 2 bytes for the quotes just in case. -*/ - len = strlen(str) + 2; - p = str; - /* rfc822_cat() will escape all and \ characters, therefor we need to increase -* our buffer length to account for these characters. -*/ - while ((p = strpbrk(p, \\\))) { - p++; - len++; - } - - return len; -} -/* }}} */ /* Support Functions */ @@ -4160,6 +4129,35 @@ #else +/* {{{ _php_rfc822_len + * Calculate string length based on imap's rfc822_cat function. + */ +static int _php_rfc822_len(char *str) +{ + int len; + char *p; + + if (!str || !*str) { + return 0; + } + + /* strings with special characters will need to be quoted, as a safety measure we +* add 2 bytes for the quotes just in case. +*/ + len = strlen(str) + 2; + p = str; + /* rfc822_cat() will
[PHP-CVS] cvs: php-src /ext/standard streamsfuncs.c /ext/standard/tests/filters filter_errors.inc filter_errors_convert_base64_decode.phpt filter_errors_user.phpt filter_errors_zlib_inflate.phpt /ma
lbarnaudThu Jan 8 17:01:11 2009 UTC Added files: /php-src/ext/standard/tests/filters filter_errors_convert_base64_decode.phpt filter_errors.inc filter_errors_user.phpt filter_errors_zlib_inflate.phpt Modified files: /php-src/ext/standard streamsfuncs.c /php-src/main/streams filter.c php_stream_filter_api.h Log: Fixed error conditions handling in stream_filter_append() http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.132r2=1.133diff_format=u Index: php-src/ext/standard/streamsfuncs.c diff -u php-src/ext/standard/streamsfuncs.c:1.132 php-src/ext/standard/streamsfuncs.c:1.133 --- php-src/ext/standard/streamsfuncs.c:1.132 Wed Dec 31 11:12:37 2008 +++ php-src/ext/standard/streamsfuncs.c Thu Jan 8 17:01:11 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: streamsfuncs.c,v 1.132 2008/12/31 11:12:37 sebastian Exp $ */ +/* $Id: streamsfuncs.c,v 1.133 2009/01/08 17:01:11 lbarnaud Exp $ */ #include php.h #include php_globals.h @@ -1261,6 +1261,7 @@ long read_write = 0; zval *filterparams = NULL; php_stream_filter *filter = NULL; + int ret; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs|lz, zstream, filtername, filternamelen, read_write, filterparams) == FAILURE) { @@ -1290,9 +1291,13 @@ } if (append) { - php_stream_filter_append(stream-readfilters, filter); + ret = php_stream_filter_append_ex(stream-readfilters, filter TSRMLS_CC); } else { - php_stream_filter_prepend(stream-readfilters, filter); + ret = php_stream_filter_prepend_ex(stream-readfilters, filter TSRMLS_CC); + } + if (ret != SUCCESS) { + php_stream_filter_remove(filter, 1 TSRMLS_CC); + RETURN_FALSE; } if (FAILURE == php_stream_filter_check_chain(stream-readfilters)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Readfilter chain unstable -- unresolvable unicode/string conversion conflict); @@ -1306,9 +1311,13 @@ } if (append) { - php_stream_filter_append(stream-writefilters, filter); + ret = php_stream_filter_append_ex(stream-writefilters, filter TSRMLS_CC); } else { - php_stream_filter_prepend(stream-writefilters, filter); + ret = php_stream_filter_prepend_ex(stream-writefilters, filter TSRMLS_CC); + } + if (ret != SUCCESS) { + php_stream_filter_remove(filter, 1 TSRMLS_CC); + RETURN_FALSE; } if (FAILURE == php_stream_filter_check_chain(stream-writefilters)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Writefilter chain unstable -- unresolvable unicode/string conversion conflict); http://cvs.php.net/viewvc.cgi/php-src/main/streams/filter.c?r1=1.46r2=1.47diff_format=u Index: php-src/main/streams/filter.c diff -u php-src/main/streams/filter.c:1.46 php-src/main/streams/filter.c:1.47 --- php-src/main/streams/filter.c:1.46 Wed Dec 31 11:12:39 2008 +++ php-src/main/streams/filter.c Thu Jan 8 17:01:11 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: filter.c,v 1.46 2008/12/31 11:12:39 sebastian Exp $ */ +/* $Id: filter.c,v 1.47 2009/01/08 17:01:11 lbarnaud Exp $ */ #include php.h #include php_globals.h @@ -376,7 +376,7 @@ pefree(filter, filter-is_persistent); } -PHPAPI void _php_stream_filter_prepend(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) +PHPAPI int php_stream_filter_prepend_ex(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) { filter-next = chain-head; filter-prev = NULL; @@ -388,9 +388,16 @@ } chain-head = filter; filter-chain = chain; + + return SUCCESS; } -PHPAPI void _php_stream_filter_append(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) +PHPAPI void _php_stream_filter_prepend(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) +{ + php_stream_filter_prepend_ex(chain, filter TSRMLS_CC); +} + +PHPAPI int php_stream_filter_append_ex(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) { php_stream *stream = chain-stream; @@ -428,18 +435,18 @@ } if (status == PSFS_ERR_FATAL) { - /* If
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard streamsfuncs.c /ext/standard/tests/filters filter_errors.inc filter_errors_convert_base64_decode.phpt filter_errors_user.phpt filter_errors_zlib_inflate.
lbarnaudThu Jan 8 17:01:58 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filters filter_errors_convert_base64_decode.phpt filter_errors.inc filter_errors_user.phpt filter_errors_zlib_inflate.phpt Modified files: /php-src/ext/standard streamsfuncs.c /php-src/main/streams filter.c php_stream_filter_api.h Log: MFH: Fixed error conditions handling in stream_filter_append() http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.58.2.6.2.15.2.32r2=1.58.2.6.2.15.2.33diff_format=u Index: php-src/ext/standard/streamsfuncs.c diff -u php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.32 php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.33 --- php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.32 Wed Dec 31 11:15:45 2008 +++ php-src/ext/standard/streamsfuncs.c Thu Jan 8 17:01:58 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: streamsfuncs.c,v 1.58.2.6.2.15.2.32 2008/12/31 11:15:45 sebastian Exp $ */ +/* $Id: streamsfuncs.c,v 1.58.2.6.2.15.2.33 2009/01/08 17:01:58 lbarnaud Exp $ */ #include php.h #include php_globals.h @@ -1147,6 +1147,7 @@ long read_write = 0; zval *filterparams = NULL; php_stream_filter *filter = NULL; + int ret; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs|lz, zstream, filtername, filternamelen, read_write, filterparams) == FAILURE) { @@ -1176,9 +1177,13 @@ } if (append) { - php_stream_filter_append(stream-readfilters, filter); + ret = php_stream_filter_append_ex(stream-readfilters, filter TSRMLS_CC); } else { - php_stream_filter_prepend(stream-readfilters, filter); + ret = php_stream_filter_prepend_ex(stream-readfilters, filter TSRMLS_CC); + } + if (ret != SUCCESS) { + php_stream_filter_remove(filter, 1 TSRMLS_CC); + RETURN_FALSE; } } @@ -1189,9 +1194,13 @@ } if (append) { - php_stream_filter_append(stream-writefilters, filter); + ret = php_stream_filter_append_ex(stream-writefilters, filter TSRMLS_CC); } else { - php_stream_filter_prepend(stream-writefilters, filter); + ret = php_stream_filter_prepend_ex(stream-writefilters, filter TSRMLS_CC); + } + if (ret != SUCCESS) { + php_stream_filter_remove(filter, 1 TSRMLS_CC); + RETURN_FALSE; } } http://cvs.php.net/viewvc.cgi/php-src/main/streams/filter.c?r1=1.17.2.3.2.10.2.3r2=1.17.2.3.2.10.2.4diff_format=u Index: php-src/main/streams/filter.c diff -u php-src/main/streams/filter.c:1.17.2.3.2.10.2.3 php-src/main/streams/filter.c:1.17.2.3.2.10.2.4 --- php-src/main/streams/filter.c:1.17.2.3.2.10.2.3 Wed Dec 31 11:15:48 2008 +++ php-src/main/streams/filter.c Thu Jan 8 17:01:58 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: filter.c,v 1.17.2.3.2.10.2.3 2008/12/31 11:15:48 sebastian Exp $ */ +/* $Id: filter.c,v 1.17.2.3.2.10.2.4 2009/01/08 17:01:58 lbarnaud Exp $ */ #include php.h #include php_globals.h @@ -313,7 +313,7 @@ pefree(filter, filter-is_persistent); } -PHPAPI void _php_stream_filter_prepend(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) +PHPAPI int php_stream_filter_prepend_ex(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) { filter-next = chain-head; filter-prev = NULL; @@ -325,9 +325,16 @@ } chain-head = filter; filter-chain = chain; + + return SUCCESS; } -PHPAPI void _php_stream_filter_append(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) +PHPAPI void _php_stream_filter_prepend(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) +{ + php_stream_filter_prepend_ex(chain, filter TSRMLS_CC); +} + +PHPAPI int php_stream_filter_append_ex(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) { php_stream *stream = chain-stream; @@ -349,7 +356,7 @@ php_stream_bucket *bucket; size_t consumed = 0; - bucket = php_stream_bucket_new(stream, stream-readbuf + stream-readpos, stream-writepos - stream-readpos, 0, 0 TSRMLS_CC); + bucket = php_stream_bucket_new(stream, (char*) stream-readbuf + stream-readpos,
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard streamsfuncs.c /ext/standard/tests/filters filter_errors.inc filter_errors_convert_base64_decode.phpt filter_errors_user.phpt filter_errors_zlib_
lbarnaudThu Jan 8 17:03:42 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/filters filter_errors_convert_base64_decode.phpt filter_errors.inc filter_errors_user.phpt filter_errors_zlib_inflate.phpt Modified files: /php-src/ext/standard streamsfuncs.c /php-src/main/streams filter.c php_stream_filter_api.h /php-srcNEWS Log: MFH: Fixed error conditions handling in stream_filter_append() http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.58.2.6.2.30r2=1.58.2.6.2.31diff_format=u Index: php-src/ext/standard/streamsfuncs.c diff -u php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.30 php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.31 --- php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.30 Wed Dec 31 11:17:45 2008 +++ php-src/ext/standard/streamsfuncs.c Thu Jan 8 17:03:42 2009 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: streamsfuncs.c,v 1.58.2.6.2.30 2008/12/31 11:17:45 sebastian Exp $ */ +/* $Id: streamsfuncs.c,v 1.58.2.6.2.31 2009/01/08 17:03:42 lbarnaud Exp $ */ #include php.h #include php_globals.h @@ -1083,6 +1083,7 @@ long read_write = 0; zval *filterparams = NULL; php_stream_filter *filter = NULL; + int ret; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs|lz, zstream, filtername, filternamelen, read_write, filterparams) == FAILURE) { @@ -1112,9 +1113,13 @@ } if (append) { - php_stream_filter_append(stream-readfilters, filter); + ret = php_stream_filter_append_ex(stream-readfilters, filter TSRMLS_CC); } else { - php_stream_filter_prepend(stream-readfilters, filter); + ret = php_stream_filter_prepend_ex(stream-readfilters, filter TSRMLS_CC); + } + if (ret != SUCCESS) { + php_stream_filter_remove(filter, 1 TSRMLS_CC); + RETURN_FALSE; } } @@ -1125,9 +1130,13 @@ } if (append) { - php_stream_filter_append(stream-writefilters, filter); + ret = php_stream_filter_append_ex(stream-writefilters, filter TSRMLS_CC); } else { - php_stream_filter_prepend(stream-writefilters, filter); + ret = php_stream_filter_prepend_ex(stream-writefilters, filter TSRMLS_CC); + } + if (ret != SUCCESS) { + php_stream_filter_remove(filter, 1 TSRMLS_CC); + RETURN_FALSE; } } http://cvs.php.net/viewvc.cgi/php-src/main/streams/filter.c?r1=1.17.2.3.2.13r2=1.17.2.3.2.14diff_format=u Index: php-src/main/streams/filter.c diff -u php-src/main/streams/filter.c:1.17.2.3.2.13 php-src/main/streams/filter.c:1.17.2.3.2.14 --- php-src/main/streams/filter.c:1.17.2.3.2.13 Wed Dec 31 11:17:48 2008 +++ php-src/main/streams/filter.c Thu Jan 8 17:03:42 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: filter.c,v 1.17.2.3.2.13 2008/12/31 11:17:48 sebastian Exp $ */ +/* $Id: filter.c,v 1.17.2.3.2.14 2009/01/08 17:03:42 lbarnaud Exp $ */ #include php.h #include php_globals.h @@ -313,7 +313,7 @@ pefree(filter, filter-is_persistent); } -PHPAPI void _php_stream_filter_prepend(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) +PHPAPI int php_stream_filter_prepend_ex(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) { filter-next = chain-head; filter-prev = NULL; @@ -325,9 +325,16 @@ } chain-head = filter; filter-chain = chain; + + return SUCCESS; } -PHPAPI void _php_stream_filter_append(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) +PHPAPI void _php_stream_filter_prepend(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) +{ + php_stream_filter_prepend_ex(chain, filter TSRMLS_CC); +} + +PHPAPI int php_stream_filter_append_ex(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC) { php_stream *stream = chain-stream; @@ -349,7 +356,7 @@ php_stream_bucket *bucket; size_t consumed = 0; - bucket = php_stream_bucket_new(stream, stream-readbuf + stream-readpos, stream-writepos - stream-readpos, 0, 0 TSRMLS_CC); + bucket = php_stream_bucket_new(stream, (char*) stream-readbuf + stream-readpos, stream-writepos - stream-readpos, 0, 0 TSRMLS_CC);
[PHP-CVS] cvs: php-src /ext/standard dns.c
felipe Thu Jan 8 17:19:08 2009 UTC Modified files: /php-src/ext/standard dns.c Log: - Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a TXT record) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.101r2=1.102diff_format=u Index: php-src/ext/standard/dns.c diff -u php-src/ext/standard/dns.c:1.101 php-src/ext/standard/dns.c:1.102 --- php-src/ext/standard/dns.c:1.101Tue Jan 6 23:51:03 2009 +++ php-src/ext/standard/dns.c Thu Jan 8 17:19:08 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: dns.c,v 1.101 2009/01/06 23:51:03 pajoye Exp $ */ +/* $Id: dns.c,v 1.102 2009/01/08 17:19:08 felipe Exp $ */ /* {{{ includes */ #include php.h @@ -470,7 +470,7 @@ tp[dlen] = '\0'; cp += dlen; - add_ascii_assoc_rt_stringl(*subarray, txt, tp, dlen, ZSTR_AUTOFREE); + add_ascii_assoc_rt_stringl(*subarray, txt, tp, dlen - 1, ZSTR_AUTOFREE); } break; case DNS_T_SOA: -- 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 dns.c
felipe Thu Jan 8 17:19:50 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard dns.c Log: - MFH: Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a TXT record) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.70.2.7.2.5.2.16r2=1.70.2.7.2.5.2.17diff_format=u Index: php-src/ext/standard/dns.c diff -u php-src/ext/standard/dns.c:1.70.2.7.2.5.2.16 php-src/ext/standard/dns.c:1.70.2.7.2.5.2.17 --- php-src/ext/standard/dns.c:1.70.2.7.2.5.2.16Wed Jan 7 13:49:53 2009 +++ php-src/ext/standard/dns.c Thu Jan 8 17:19:50 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: dns.c,v 1.70.2.7.2.5.2.16 2009/01/07 13:49:53 pajoye Exp $ */ +/* $Id: dns.c,v 1.70.2.7.2.5.2.17 2009/01/08 17:19:50 felipe Exp $ */ /* {{{ includes */ #include php.h @@ -469,7 +469,7 @@ tp[dlen] = '\0'; cp += dlen; - add_assoc_stringl(*subarray, txt, tp, dlen, 0); + add_assoc_stringl(*subarray, txt, tp, dlen - 1, 0); } break; case DNS_T_SOA: -- 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/standard dns.c
felipe Thu Jan 8 17:20:21 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard dns.c Log: - MFH: Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a TXT record) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.70.2.7.2.8r2=1.70.2.7.2.9diff_format=u Index: php-src/ext/standard/dns.c diff -u php-src/ext/standard/dns.c:1.70.2.7.2.8 php-src/ext/standard/dns.c:1.70.2.7.2.9 --- php-src/ext/standard/dns.c:1.70.2.7.2.8 Wed Dec 31 11:17:44 2008 +++ php-src/ext/standard/dns.c Thu Jan 8 17:20:21 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: dns.c,v 1.70.2.7.2.8 2008/12/31 11:17:44 sebastian Exp $ */ +/* $Id: dns.c,v 1.70.2.7.2.9 2009/01/08 17:20:21 felipe Exp $ */ /* {{{ includes */ #include php.h @@ -487,7 +487,7 @@ tp[dlen] = '\0'; cp += dlen; - add_assoc_stringl(*subarray, txt, tp, dlen, 0); + add_assoc_stringl(*subarray, txt, tp, dlen - 1, 0); } break; case DNS_T_SOA: -- 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
felipe Thu Jan 8 17:28:09 2009 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: - BFN #47035 http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1383r2=1.2027.2.547.2.1384diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1383 php-src/NEWS:1.2027.2.547.2.1384 --- php-src/NEWS:1.2027.2.547.2.1383Thu Jan 8 17:03:42 2009 +++ php-src/NEWSThu Jan 8 17:28:08 2009 @@ -14,6 +14,8 @@ (Fixes CVE-2008-5498) (Scott) - Fixed a segfault when malformed string is passed to json_decode(). (Scott) +- Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a TXT + record). (Felipe) - Fixed bug #47027 (var_export doesn't show numeric indices on ArrayObject). (Derick) - Fixed bug #46985 (OVERWRITE and binary mode does not work, regression introduced in -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard user_filters.c /ext/standard/tests/filters filter_errors.inc filter_errors_convert_base64_decode.phpt filter_errors_user.phpt
lbarnaudThu Jan 8 18:39:04 2009 UTC Modified files: /php-src/ext/standard user_filters.c /php-src/ext/standard/tests/filters filter_errors.inc filter_errors_convert_base64_decode.phpt filter_errors_user.phpt Log: Fix memleak when a user filter appends a bucket and returns != PSFS_PASS_ON Improved tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/user_filters.c?r1=1.59r2=1.60diff_format=u Index: php-src/ext/standard/user_filters.c diff -u php-src/ext/standard/user_filters.c:1.59 php-src/ext/standard/user_filters.c:1.60 --- php-src/ext/standard/user_filters.c:1.59Wed Dec 31 11:12:37 2008 +++ php-src/ext/standard/user_filters.c Thu Jan 8 18:39:04 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: user_filters.c,v 1.59 2008/12/31 11:12:37 sebastian Exp $ */ +/* $Id: user_filters.c,v 1.60 2009/01/08 18:39:04 lbarnaud Exp $ */ #include php.h #include php_globals.h @@ -245,6 +245,14 @@ php_stream_bucket_delref(bucket TSRMLS_CC); } } + if (ret != PSFS_PASS_ON) { + php_stream_bucket *bucket = buckets_out-head; + while (bucket != NULL) { + php_stream_bucket_unlink(bucket TSRMLS_CC); + php_stream_bucket_delref(bucket TSRMLS_CC); + bucket = buckets_out-head; + } + } /* filter resources are cleaned up by the stream destructor, * keeping a reference to the stream resource here would prevent it http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/filter_errors.inc?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/filters/filter_errors.inc diff -u php-src/ext/standard/tests/filters/filter_errors.inc:1.1 php-src/ext/standard/tests/filters/filter_errors.inc:1.2 --- php-src/ext/standard/tests/filters/filter_errors.inc:1.1Thu Jan 8 17:01:11 2009 +++ php-src/ext/standard/tests/filters/filter_errors.incThu Jan 8 18:39:04 2009 @@ -27,7 +27,7 @@ fwrite($stream, b$data); fseek($stream, 0, SEEK_SET); - stream_get_line($stream, 8192, \r\n); + stream_filter_append($stream, $filter); stream_get_contents($stream); } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt diff -u php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt:1.1 php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt:1.2 --- php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt:1.1 Thu Jan 8 17:01:11 2009 +++ php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt Thu Jan 8 18:39:04 2009 @@ -14,3 +14,5 @@ Warning: stream_filter_append(): Filter failed to process pre-buffered data in %s test filtering of non buffered data + +Warning: stream_get_contents(): stream filter (convert.base64-decode): invalid byte sequence in %s http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/filter_errors_user.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/filters/filter_errors_user.phpt diff -u php-src/ext/standard/tests/filters/filter_errors_user.phpt:1.1 php-src/ext/standard/tests/filters/filter_errors_user.phpt:1.2 --- php-src/ext/standard/tests/filters/filter_errors_user.phpt:1.1 Thu Jan 8 17:01:11 2009 +++ php-src/ext/standard/tests/filters/filter_errors_user.phpt Thu Jan 8 18:39:04 2009 @@ -26,14 +26,18 @@ } class test_filter3 extends php_user_filter { function filter($in, $out, $consumed, $closing) { - $bucket = stream_bucket_new($this-stream, 42); - stream_bucket_append($out, $bucket); + if (!$closing) { + $bucket = stream_bucket_new($this-stream, 42); + stream_bucket_append($out, $bucket); + } return PSFS_ERR_FATAL; } } class test_filter4 extends php_user_filter { function filter($in, $out, $consumed, $closing) { - $bucket = stream_bucket_new($this-stream, 42); + if (!$closing) { + $bucket = stream_bucket_new($this-stream, 42); + } return PSFS_ERR_FATAL; } } @@ -44,6 +48,43 @@ filter_errors_test(test_filter$i, 42); } +echo test append / read / remove\n; +for($i = 0; $i 5; ++$i) { + echo test_filter$i\n; + $stream = fopen('php://memory', 'wb+'); + fwrite($stream, b42); + fseek($stream, 0, SEEK_SET); + $f = stream_filter_append($stream, test_filter$i); + stream_get_contents($stream); + stream_filter_remove($f);
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard user_filters.c /ext/standard/tests/filters filter_errors.inc filter_errors_convert_base64_decode.phpt filter_errors_user.phpt
lbarnaudThu Jan 8 18:40:27 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard user_filters.c /php-src/ext/standard/tests/filters filter_errors.inc filter_errors_convert_base64_decode.phpt filter_errors_user.phpt Log: MFH: Fix memleak when a user filter appends a bucket and returns != PSFS_PASS_ON Improved tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/user_filters.c?r1=1.31.2.4.2.9.2.10r2=1.31.2.4.2.9.2.11diff_format=u Index: php-src/ext/standard/user_filters.c diff -u php-src/ext/standard/user_filters.c:1.31.2.4.2.9.2.10 php-src/ext/standard/user_filters.c:1.31.2.4.2.9.2.11 --- php-src/ext/standard/user_filters.c:1.31.2.4.2.9.2.10 Wed Dec 31 11:15:46 2008 +++ php-src/ext/standard/user_filters.c Thu Jan 8 18:40:27 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: user_filters.c,v 1.31.2.4.2.9.2.10 2008/12/31 11:15:46 sebastian Exp $ */ +/* $Id: user_filters.c,v 1.31.2.4.2.9.2.11 2009/01/08 18:40:27 lbarnaud Exp $ */ #include php.h #include php_globals.h @@ -245,6 +245,14 @@ php_stream_bucket_delref(bucket TSRMLS_CC); } } + if (ret != PSFS_PASS_ON) { + php_stream_bucket *bucket = buckets_out-head; + while (bucket != NULL) { + php_stream_bucket_unlink(bucket TSRMLS_CC); + php_stream_bucket_delref(bucket TSRMLS_CC); + bucket = buckets_out-head; + } + } /* filter resources are cleaned up by the stream destructor, * keeping a reference to the stream resource here would prevent it http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/filter_errors.inc?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/filters/filter_errors.inc diff -u php-src/ext/standard/tests/filters/filter_errors.inc:1.1.2.2 php-src/ext/standard/tests/filters/filter_errors.inc:1.1.2.3 --- php-src/ext/standard/tests/filters/filter_errors.inc:1.1.2.2Thu Jan 8 17:01:58 2009 +++ php-src/ext/standard/tests/filters/filter_errors.incThu Jan 8 18:40:27 2009 @@ -27,7 +27,7 @@ fwrite($stream, b$data); fseek($stream, 0, SEEK_SET); - stream_get_line($stream, 8192, \r\n); + stream_filter_append($stream, $filter); stream_get_contents($stream); } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt diff -u php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt:1.1.2.2 php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt:1.1.2.3 --- php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt:1.1.2.2 Thu Jan 8 17:01:58 2009 +++ php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt Thu Jan 8 18:40:27 2009 @@ -14,3 +14,5 @@ Warning: stream_filter_append(): Filter failed to process pre-buffered data in %s test filtering of non buffered data + +Warning: stream_get_contents(): stream filter (convert.base64-decode): invalid byte sequence in %s http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/filter_errors_user.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/filters/filter_errors_user.phpt diff -u php-src/ext/standard/tests/filters/filter_errors_user.phpt:1.1.2.2 php-src/ext/standard/tests/filters/filter_errors_user.phpt:1.1.2.3 --- php-src/ext/standard/tests/filters/filter_errors_user.phpt:1.1.2.2 Thu Jan 8 17:01:58 2009 +++ php-src/ext/standard/tests/filters/filter_errors_user.phpt Thu Jan 8 18:40:27 2009 @@ -26,14 +26,18 @@ } class test_filter3 extends php_user_filter { function filter($in, $out, $consumed, $closing) { - $bucket = stream_bucket_new($this-stream, 42); - stream_bucket_append($out, $bucket); + if (!$closing) { + $bucket = stream_bucket_new($this-stream, 42); + stream_bucket_append($out, $bucket); + } return PSFS_ERR_FATAL; } } class test_filter4 extends php_user_filter { function filter($in, $out, $consumed, $closing) { - $bucket = stream_bucket_new($this-stream, 42); + if (!$closing) { + $bucket = stream_bucket_new($this-stream, 42); + } return PSFS_ERR_FATAL; } } @@ -44,6 +48,43 @@ filter_errors_test(test_filter$i, 42); } +echo test append / read / remove\n; +for($i = 0; $i 5; ++$i) { + echo test_filter$i\n; + $stream = fopen('php://memory', 'wb+'); +
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard user_filters.c /ext/standard/tests/filters filter_errors.inc filter_errors_convert_base64_decode.phpt filter_errors_user.phpt
lbarnaudThu Jan 8 18:40:56 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard user_filters.c /php-src/ext/standard/tests/filters filter_errors.inc filter_errors_convert_base64_decode.phpt filter_errors_user.phpt Log: MFH: Fix memleak when a user filter appends a bucket and returns != PSFS_PASS_ON Improved tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/user_filters.c?r1=1.31.2.4.2.12r2=1.31.2.4.2.13diff_format=u Index: php-src/ext/standard/user_filters.c diff -u php-src/ext/standard/user_filters.c:1.31.2.4.2.12 php-src/ext/standard/user_filters.c:1.31.2.4.2.13 --- php-src/ext/standard/user_filters.c:1.31.2.4.2.12 Wed Dec 31 11:17:46 2008 +++ php-src/ext/standard/user_filters.c Thu Jan 8 18:40:56 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: user_filters.c,v 1.31.2.4.2.12 2008/12/31 11:17:46 sebastian Exp $ */ +/* $Id: user_filters.c,v 1.31.2.4.2.13 2009/01/08 18:40:56 lbarnaud Exp $ */ #include php.h #include php_globals.h @@ -248,6 +248,14 @@ php_stream_bucket_delref(bucket TSRMLS_CC); } } + if (ret != PSFS_PASS_ON) { + php_stream_bucket *bucket = buckets_out-head; + while (bucket != NULL) { + php_stream_bucket_unlink(bucket TSRMLS_CC); + php_stream_bucket_delref(bucket TSRMLS_CC); + bucket = buckets_out-head; + } + } /* filter resources are cleaned up by the stream destructor, * keeping a reference to the stream resource here would prevent it http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/filter_errors.inc?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/filters/filter_errors.inc diff -u php-src/ext/standard/tests/filters/filter_errors.inc:1.1.4.2 php-src/ext/standard/tests/filters/filter_errors.inc:1.1.4.3 --- php-src/ext/standard/tests/filters/filter_errors.inc:1.1.4.2Thu Jan 8 17:03:42 2009 +++ php-src/ext/standard/tests/filters/filter_errors.incThu Jan 8 18:40:56 2009 @@ -27,7 +27,7 @@ fwrite($stream, b$data); fseek($stream, 0, SEEK_SET); - stream_get_line($stream, 8192, \r\n); + stream_filter_append($stream, $filter); stream_get_contents($stream); } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt diff -u php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt:1.1.4.2 php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt:1.1.4.3 --- php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt:1.1.4.2 Thu Jan 8 17:03:42 2009 +++ php-src/ext/standard/tests/filters/filter_errors_convert_base64_decode.phpt Thu Jan 8 18:40:56 2009 @@ -14,3 +14,5 @@ Warning: stream_filter_append(): Filter failed to process pre-buffered data in %s test filtering of non buffered data + +Warning: stream_get_contents(): stream filter (convert.base64-decode): invalid byte sequence in %s http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/filter_errors_user.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/filters/filter_errors_user.phpt diff -u php-src/ext/standard/tests/filters/filter_errors_user.phpt:1.1.4.2 php-src/ext/standard/tests/filters/filter_errors_user.phpt:1.1.4.3 --- php-src/ext/standard/tests/filters/filter_errors_user.phpt:1.1.4.2 Thu Jan 8 17:03:42 2009 +++ php-src/ext/standard/tests/filters/filter_errors_user.phpt Thu Jan 8 18:40:56 2009 @@ -26,14 +26,18 @@ } class test_filter3 extends php_user_filter { function filter($in, $out, $consumed, $closing) { - $bucket = stream_bucket_new($this-stream, 42); - stream_bucket_append($out, $bucket); + if (!$closing) { + $bucket = stream_bucket_new($this-stream, 42); + stream_bucket_append($out, $bucket); + } return PSFS_ERR_FATAL; } } class test_filter4 extends php_user_filter { function filter($in, $out, $consumed, $closing) { - $bucket = stream_bucket_new($this-stream, 42); + if (!$closing) { + $bucket = stream_bucket_new($this-stream, 42); + } return PSFS_ERR_FATAL; } } @@ -44,6 +48,43 @@ filter_errors_test(test_filter$i, 42); } +echo test append / read / remove\n; +for($i = 0; $i 5; ++$i) { + echo test_filter$i\n; + $stream = fopen('php://memory', 'wb+'); + fwrite($stream, b42); + fseek($stream,
[PHP-CVS] cvs: php-src /main/streams streams.c
felipe Thu Jan 8 18:43:12 2009 UTC Modified files: /php-src/main/streams streams.c Log: - Fixed bug #47037 (No error when using fopen with emty string) Patch by Cristian Rodriguez R. http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.177r2=1.178diff_format=u Index: php-src/main/streams/streams.c diff -u php-src/main/streams/streams.c:1.177 php-src/main/streams/streams.c:1.178 --- php-src/main/streams/streams.c:1.177Wed Dec 31 11:12:39 2008 +++ php-src/main/streams/streams.c Thu Jan 8 18:43:12 2009 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: streams.c,v 1.177 2008/12/31 11:12:39 sebastian Exp $ */ +/* $Id: streams.c,v 1.178 2009/01/08 18:43:12 felipe Exp $ */ #define _GNU_SOURCE #include php.h @@ -2387,6 +2387,7 @@ } if (!path || !*path) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Filename cannot be empty); return 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) /main/streams streams.c
felipe Thu Jan 8 18:46:00 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/main/streams streams.c Log: MFH: - Fixed bug #47037 (No error when using fopen with emty string) Patch by Cristian Rodriguez R. http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.82.2.6.2.18.2.22r2=1.82.2.6.2.18.2.23diff_format=u Index: php-src/main/streams/streams.c diff -u php-src/main/streams/streams.c:1.82.2.6.2.18.2.22 php-src/main/streams/streams.c:1.82.2.6.2.18.2.23 --- php-src/main/streams/streams.c:1.82.2.6.2.18.2.22 Wed Dec 31 11:15:48 2008 +++ php-src/main/streams/streams.c Thu Jan 8 18:46:00 2009 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: streams.c,v 1.82.2.6.2.18.2.22 2008/12/31 11:15:48 sebastian Exp $ */ +/* $Id: streams.c,v 1.82.2.6.2.18.2.23 2009/01/08 18:46:00 felipe Exp $ */ #define _GNU_SOURCE #include php.h @@ -1783,6 +1783,7 @@ } if (!path || !*path) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Filename cannot be empty); return NULL; } -- 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/file 007_error.phpt file_variation2.phpt readfile_error.phpt
felipe Thu Jan 8 18:46:55 2009 UTC Modified files: /php-src/ext/standard/tests/file007_error.phpt file_variation2.phpt readfile_error.phpt Log: - Fixed tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/007_error.phpt?r1=1.7r2=1.8diff_format=u Index: php-src/ext/standard/tests/file/007_error.phpt diff -u php-src/ext/standard/tests/file/007_error.phpt:1.7 php-src/ext/standard/tests/file/007_error.phpt:1.8 --- php-src/ext/standard/tests/file/007_error.phpt:1.7 Wed Nov 26 17:48:40 2008 +++ php-src/ext/standard/tests/file/007_error.phpt Thu Jan 8 18:46:55 2009 @@ -81,28 +81,28 @@ bool(false) Warning: fclose() expects parameter 1 to be resource, Unicode string given in %s on line %d -bool(false) +NULL Warning: fclose() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) +NULL Warning: feof(): 5 is not a valid stream resource in %s on line %d bool(false) Warning: feof() expects parameter 1 to be resource, Unicode string given in %s on line %d -bool(false) +NULL Warning: feof() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) +NULL Warning: fopen() expects at most 4 parameters, 5 given in %s on line %d bool(false) Warning: fclose() expects exactly 1 parameter, 2 given in %s on line %d -bool(false) +NULL Warning: feof() expects exactly 1 parameter, 2 given in %s on line %d -bool(false) +NULL -- Testing fopen(), fclose() feof() with invalid arguments -- -- Iteration 1 -- @@ -110,40 +110,40 @@ bool(false) Warning: fclose() expects parameter 1 to be resource, Unicode string given in %s on line %d -bool(false) +NULL Warning: feof() expects parameter 1 to be resource, Unicode string given in %s on line %d -bool(false) +NULL -- Iteration 2 -- Warning: fopen(10): failed to open stream: No such file or directory in %s on line %d bool(false) Warning: fclose() expects parameter 1 to be resource, integer given in %s on line %d -bool(false) +NULL Warning: feof() expects parameter 1 to be resource, integer given in %s on line %d -bool(false) +NULL -- Iteration 3 -- Warning: fopen(10.5): failed to open stream: No such file or directory in %s on line %d bool(false) Warning: fclose() expects parameter 1 to be resource, double given in %s on line %d -bool(false) +NULL Warning: feof() expects parameter 1 to be resource, double given in %s on line %d -bool(false) +NULL -- Iteration 4 -- Warning: fopen(1): failed to open stream: No such file or directory in %s on line %d bool(false) Warning: fclose() expects parameter 1 to be resource, boolean given in %s on line %d -bool(false) +NULL Warning: feof() expects parameter 1 to be resource, boolean given in %s on line %d -bool(false) +NULL -- Iteration 5 -- Notice: Array to string conversion in %s on line %d @@ -152,24 +152,27 @@ bool(false) Warning: fclose() expects parameter 1 to be resource, array given in %s on line %d -bool(false) +NULL Warning: feof() expects parameter 1 to be resource, array given in %s on line %d -bool(false) +NULL -- Iteration 6 -- + +Warning: fopen(): Filename cannot be empty in %s on line %d bool(false) Warning: fclose() expects parameter 1 to be resource, null given in %s on line %d -bool(false) +NULL Warning: feof() expects parameter 1 to be resource, null given in %s on line %d -bool(false) +NULL -- Iteration 7 -- + +Warning: fopen(): Filename cannot be empty in %s on line %d bool(false) Warning: fclose() expects parameter 1 to be resource, Unicode string given in %s on line %d -bool(false) +NULL Warning: feof() expects parameter 1 to be resource, Unicode string given in %s on line %d -bool(false) - +NULL http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_variation2.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/file/file_variation2.phpt diff -u php-src/ext/standard/tests/file/file_variation2.phpt:1.2 php-src/ext/standard/tests/file/file_variation2.phpt:1.3 --- php-src/ext/standard/tests/file/file_variation2.phpt:1.2Wed Jun 11 12:40:34 2008 +++ php-src/ext/standard/tests/file/file_variation2.phptThu Jan 8 18:46:55 2009 @@ -165,9 +165,11 @@ bool(false) --uppercase NULL-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --lowercase null-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --lowercase true-- @@ -175,6 +177,7 @@ bool(false) --lowercase false-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --uppercase TRUE-- @@ -182,12 +185,15 @@ bool(false) --uppercase FALSE-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --empty string DQ-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --empty string SQ-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --instance of
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/file 007_error.phpt file_get_contents_variation8.phpt file_variation2.phpt readfile_error.phpt readfile_variation10.phpt
felipe Thu Jan 8 18:47:27 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/file007_error.phpt file_get_contents_variation8.phpt file_variation2.phpt readfile_error.phpt readfile_variation10.phpt Log: - MFH: Fixed tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/007_error.phpt?r1=1.1.2.1.2.3r2=1.1.2.1.2.4diff_format=u Index: php-src/ext/standard/tests/file/007_error.phpt diff -u php-src/ext/standard/tests/file/007_error.phpt:1.1.2.1.2.3 php-src/ext/standard/tests/file/007_error.phpt:1.1.2.1.2.4 --- php-src/ext/standard/tests/file/007_error.phpt:1.1.2.1.2.3 Wed Nov 26 10:10:17 2008 +++ php-src/ext/standard/tests/file/007_error.phpt Thu Jan 8 18:47:26 2009 @@ -164,6 +164,8 @@ Warning: feof() expects parameter 1 to be resource, object given in %s on line %d bool(false) -- Iteration 7 -- + +Warning: fopen(): Filename cannot be empty in %s on line %d bool(false) Warning: fclose() expects parameter 1 to be resource, null given in %s on line %d @@ -172,6 +174,8 @@ Warning: feof() expects parameter 1 to be resource, null given in %s on line %d bool(false) -- Iteration 8 -- + +Warning: fopen(): Filename cannot be empty in %s on line %d bool(false) Warning: fclose() expects parameter 1 to be resource, string given in %s on line %d @@ -179,4 +183,3 @@ Warning: feof() expects parameter 1 to be resource, string given in %s on line %d bool(false) - http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_get_contents_variation8.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/file/file_get_contents_variation8.phpt diff -u php-src/ext/standard/tests/file/file_get_contents_variation8.phpt:1.1.4.2 php-src/ext/standard/tests/file/file_get_contents_variation8.phpt:1.1.4.3 --- php-src/ext/standard/tests/file/file_get_contents_variation8.phpt:1.1.4.2 Wed Nov 26 10:10:16 2008 +++ php-src/ext/standard/tests/file/file_get_contents_variation8.phpt Thu Jan 8 18:47:26 2009 @@ -52,16 +52,24 @@ Warning: file_get_contents(1): failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 2 -- + +Warning: file_get_contents(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 3 -- + +Warning: file_get_contents(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 4 -- + +Warning: file_get_contents(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 5 -- Warning: file_get_contents( ): failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 6 -- + +Warning: file_get_contents(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 7 -- @@ -69,11 +77,11 @@ NULL -- Iteration 8 -- -Warning: file_get_contents(/no/such/file/dir): failed to open stream: No such file or directory in %s on line %d +Warning: file_get_contents(/no/such/file/dir): failed to open stream: %s in %s on line %d bool(false) -- Iteration 9 -- -Warning: file_get_contents(php/php): failed to open stream: %s directory in %s on line %d +Warning: file_get_contents(php/php): failed to open stream: No such file or directory in %s on line %d bool(false) *** Done *** http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_variation2.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/file/file_variation2.phpt diff -u php-src/ext/standard/tests/file/file_variation2.phpt:1.1.4.2 php-src/ext/standard/tests/file/file_variation2.phpt:1.1.4.3 --- php-src/ext/standard/tests/file/file_variation2.phpt:1.1.4.2Wed Jun 11 12:38:56 2008 +++ php-src/ext/standard/tests/file/file_variation2.phptThu Jan 8 18:47:26 2009 @@ -161,9 +161,11 @@ NULL --uppercase NULL-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --lowercase null-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --lowercase true-- @@ -171,6 +173,7 @@ bool(false) --lowercase false-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --uppercase TRUE-- @@ -178,16 +181,19 @@ bool(false) --uppercase FALSE-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --empty string DQ-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --empty string SQ-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --instance of classWithToString-- -Error: 2 - file(Class A object): failed to open stream: No such file or directory, %s(%d) +Error: 2 - file(Class A object): failed to open stream: %s, %s(%d) bool(false) --instance of classWithoutToString-- @@ -195,8 +201,10 @@ NULL --undefined var-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --unset var-- +Error: 2 - file():
[PHP-CVS] cvs: php-src /ext/filter/tests bug42718.phpt
lbarnaudThu Jan 8 18:58:22 2009 UTC Modified files: /php-src/ext/filter/tests bug42718.phpt Log: XFAIL test http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/bug42718.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/filter/tests/bug42718.phpt diff -u php-src/ext/filter/tests/bug42718.phpt:1.1 php-src/ext/filter/tests/bug42718.phpt:1.2 --- php-src/ext/filter/tests/bug42718.phpt:1.1 Sun Nov 2 22:03:32 2008 +++ php-src/ext/filter/tests/bug42718.phpt Thu Jan 8 18:58:22 2009 @@ -15,6 +15,7 @@ var_dump(FILTER_FLAG_STRIP_LOW == 4); echo addcslashes($_GET['a'],\0) . \n; ? +--XFAIL-- --EXPECT-- unsafe_raw 4 -- 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/tests/file rmdir_variation1.phpt
felipe Thu Jan 8 19:00:02 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filermdir_variation1.phpt Log: - Fixed test [only in this branch] http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/rmdir_variation1.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/file/rmdir_variation1.phpt diff -u php-src/ext/standard/tests/file/rmdir_variation1.phpt:1.1.4.2 php-src/ext/standard/tests/file/rmdir_variation1.phpt:1.1.4.3 --- php-src/ext/standard/tests/file/rmdir_variation1.phpt:1.1.4.2 Wed Nov 26 10:10:17 2008 +++ php-src/ext/standard/tests/file/rmdir_variation1.phpt Thu Jan 8 19:00:02 2009 @@ -90,38 +90,38 @@ *** Testing rmdir() : usage variation *** --uppercase NULL-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --lowercase null-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --lowercase false-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --uppercase FALSE-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --empty string DQ-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --empty string SQ-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --undefined var-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --unset var-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --single space-- -Error: 2 - rmdir( ): No such file or directory, %s(%d) +Error: 2 - rmdir( ): %s, %s(%d) bool(false) ===DONE=== -- 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/standard/tests/file 007_error.phpt file_get_contents_variation8.phpt file_variation2.phpt parse_ini_file_variation4.phpt readfile_error.phpt
felipe Thu Jan 8 20:03:32 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/file007_error.phpt file_get_contents_variation8.phpt file_variation2.phpt parse_ini_file_variation4.phpt readfile_error.phpt Log: - MFH: Fixed tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/007_error.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/file/007_error.phpt diff -u php-src/ext/standard/tests/file/007_error.phpt:1.1.2.2 php-src/ext/standard/tests/file/007_error.phpt:1.1.2.3 --- php-src/ext/standard/tests/file/007_error.phpt:1.1.2.2 Tue Nov 25 11:31:25 2008 +++ php-src/ext/standard/tests/file/007_error.phpt Thu Jan 8 20:03:32 2009 @@ -74,7 +74,7 @@ Warning: fopen() expects at least 2 parameters, 0 given in %s on line %d bool(false) -Warning: fclose(): %d is not a valid stream resource in %s on line %d +Warning: fclose(): 5 is not a valid stream resource in %s on line %d bool(false) Warning: fclose(): supplied argument is not a valid stream resource in %s on line %d @@ -83,7 +83,7 @@ Warning: Wrong parameter count for fclose() in %s on line %d NULL -Warning: feof(): %d is not a valid stream resource in %s on line %d +Warning: feof(): 5 is not a valid stream resource in %s on line %d bool(false) Warning: feof(): supplied argument is not a valid stream resource in %s on line %d @@ -162,6 +162,8 @@ Warning: feof(): supplied argument is not a valid stream resource in %s on line %d bool(false) -- Iteration 7 -- + +Warning: fopen(): Filename cannot be empty in %s on line %d bool(false) Warning: fclose(): supplied argument is not a valid stream resource in %s on line %d @@ -170,6 +172,8 @@ Warning: feof(): supplied argument is not a valid stream resource in %s on line %d bool(false) -- Iteration 8 -- + +Warning: fopen(): Filename cannot be empty in %s on line %d bool(false) Warning: fclose(): supplied argument is not a valid stream resource in %s on line %d http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_get_contents_variation8.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/file/file_get_contents_variation8.phpt diff -u php-src/ext/standard/tests/file/file_get_contents_variation8.phpt:1.1.2.1 php-src/ext/standard/tests/file/file_get_contents_variation8.phpt:1.1.2.2 --- php-src/ext/standard/tests/file/file_get_contents_variation8.phpt:1.1.2.1 Tue Nov 25 11:31:24 2008 +++ php-src/ext/standard/tests/file/file_get_contents_variation8.phpt Thu Jan 8 20:03:32 2009 @@ -52,16 +52,24 @@ Warning: file_get_contents(1): failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 2 -- + +Warning: file_get_contents(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 3 -- + +Warning: file_get_contents(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 4 -- + +Warning: file_get_contents(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 5 -- Warning: file_get_contents( ): failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 6 -- + +Warning: file_get_contents(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 7 -- @@ -73,7 +81,7 @@ bool(false) -- Iteration 9 -- -Warning: file_get_contents(php/php): failed to open stream: %s directory in %s on line %d +Warning: file_get_contents(php/php): failed to open stream: %s in %s on line %d bool(false) *** Done *** http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_variation2.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/file/file_variation2.phpt diff -u php-src/ext/standard/tests/file/file_variation2.phpt:1.1.2.1 php-src/ext/standard/tests/file/file_variation2.phpt:1.1.2.2 --- php-src/ext/standard/tests/file/file_variation2.phpt:1.1.2.1Wed Jun 11 12:38:02 2008 +++ php-src/ext/standard/tests/file/file_variation2.phptThu Jan 8 20:03:32 2009 @@ -161,9 +161,11 @@ NULL --uppercase NULL-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --lowercase null-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --lowercase true-- @@ -171,6 +173,7 @@ bool(false) --lowercase false-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --uppercase TRUE-- @@ -178,12 +181,15 @@ bool(false) --uppercase FALSE-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --empty string DQ-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --empty string SQ-- +Error: 2 - file(): Filename cannot be empty, %s(%d) bool(false) --instance of classWithToString-- @@ -195,8 +201,10 @@ NULL --undefined var-- +Error: 2 - file():
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /main/streams streams.c
On 08.01.2009 21:46, Felipe Pena wrote: felipeThu Jan 8 18:46:00 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/main/streams streams.c Log: MFH: - Fixed bug #47037 (No error when using fopen with emty string) Patch by Cristian Rodriguez R. Would you mind fixing these tests, too? Thanks. 5_2/ext/tidy/tests/019.phpt 5_2/ext/tidy/tests/022.phpt 5_2/ext/standard/tests/strings/md5_file.phpt 5_2/ext/standard/tests/file/readfile_variation10.phpt 5_2/ext/standard/tests/file/file_put_contents_variation8.phpt 5_2/ext/exif/tests/exif_imagetype_variation1.phpt -- Wbr, Antony Dovgal -- 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/file disk_free_space_basic.phpt
tony2001Thu Jan 8 21:53:36 2009 UTC Modified files: /php-src/ext/standard/tests/filedisk_free_space_basic.phpt Log: fix test use bigger file to be able to see the difference http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_free_space_basic.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/standard/tests/file/disk_free_space_basic.phpt diff -u php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.5 php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.6 --- php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.5 Tue Dec 30 16:38:17 2008 +++ php-src/ext/standard/tests/file/disk_free_space_basic.phpt Thu Jan 8 21:53:36 2009 @@ -25,8 +25,8 @@ var_dump( $space1 ); $fh = fopen($file_path.$dir./disk_free_space.tmp, a); -for( $i=1; $i=1000; $i++) -fwrite($fh, (binary)x); +$data = str_repeat(x, 4096); +fwrite($fh, (binary)$data); fclose($fh); echo \n Free Space after writing to a file\n; -- 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/tests/file disk_free_space_basic.phpt
tony2001Thu Jan 8 21:53:51 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filedisk_free_space_basic.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_free_space_basic.phpt?r1=1.1.2.3.2.3r2=1.1.2.3.2.4diff_format=u Index: php-src/ext/standard/tests/file/disk_free_space_basic.phpt diff -u php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.1.2.3.2.3 php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.1.2.3.2.4 --- php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.1.2.3.2.3 Tue Dec 30 16:49:43 2008 +++ php-src/ext/standard/tests/file/disk_free_space_basic.phpt Thu Jan 8 21:53:50 2009 @@ -25,8 +25,8 @@ var_dump( $space1 ); $fh = fopen($file_path.$dir./disk_free_space.tmp, a); -for( $i=1; $i=1000; $i++) -fwrite($fh, (binary)x); +$data = str_repeat(x, 4096); +fwrite($fh, (binary)$data); fclose($fh); echo \n Free Space after writing to a file\n; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/zip/tests bug11216.phpt bug38944.phpt oo_properties.phpt
tony2001Thu Jan 8 22:00:28 2009 UTC Modified files: /php-src/ext/zip/tests bug11216.phpt bug38944.phpt oo_properties.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/bug11216.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/zip/tests/bug11216.phpt diff -u php-src/ext/zip/tests/bug11216.phpt:1.2 php-src/ext/zip/tests/bug11216.phpt:1.3 --- php-src/ext/zip/tests/bug11216.phpt:1.2 Sun Jun 3 21:30:12 2007 +++ php-src/ext/zip/tests/bug11216.phpt Thu Jan 8 22:00:27 2009 @@ -2,7 +2,7 @@ Bug #11216 (::addEmptyDir() crashes when the directory already exists) --SKIPIF-- ?php -/* $Id: bug11216.phpt,v 1.2 2007/06/03 21:30:12 pajoye Exp $ */ +/* $Id: bug11216.phpt,v 1.3 2009/01/08 22:00:27 tony2001 Exp $ */ if(!extension_loaded('zip')) die('skip'); ? --FILE-- @@ -22,7 +22,7 @@ [status] = 0 [statusSys] = 0 [numFiles] = 1 -[filename] = +[filename] = %s [comment] = ) bool(false) http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/bug38944.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/zip/tests/bug38944.phpt diff -u php-src/ext/zip/tests/bug38944.phpt:1.4 php-src/ext/zip/tests/bug38944.phpt:1.5 --- php-src/ext/zip/tests/bug38944.phpt:1.4 Wed Nov 12 11:24:48 2008 +++ php-src/ext/zip/tests/bug38944.phpt Thu Jan 8 22:00:27 2009 @@ -23,7 +23,7 @@ int(0) int(0) int(0) -string(0) +string(%d) %s string(0) object(ZipArchive)#1 (5) { [status]= @@ -33,7 +33,7 @@ [numFiles]= int(0) [filename]= - string(0) + string(%d) %s [comment]= string(0) } http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/oo_properties.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/zip/tests/oo_properties.phpt diff -u php-src/ext/zip/tests/oo_properties.phpt:1.3 php-src/ext/zip/tests/oo_properties.phpt:1.4 --- php-src/ext/zip/tests/oo_properties.phpt:1.3Mon Nov 19 11:12:21 2007 +++ php-src/ext/zip/tests/oo_properties.phptThu Jan 8 22:00:27 2009 @@ -2,7 +2,7 @@ ziparchive::properties isset()/empty() checks --SKIPIF-- ?php -/* $Id: oo_properties.phpt,v 1.3 2007/11/19 11:12:21 tony2001 Exp $ */ +/* $Id: oo_properties.phpt,v 1.4 2009/01/08 22:00:27 tony2001 Exp $ */ if(!extension_loaded('zip')) die('skip'); ? --FILE-- @@ -51,8 +51,8 @@ zip-numFiles (5): empty(): 0 isset(): 1 -zip-filename (0): - empty(): 1 +zip-filename (%d): + empty(): 0 isset(): 1 zip-comment (19): empty(): 0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/zip/tests bug11216.phpt
tony2001Thu Jan 8 22:02:53 2009 UTC Modified files: /php-src/ext/zip/tests bug11216.phpt Log: fix test for real http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/bug11216.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/zip/tests/bug11216.phpt diff -u php-src/ext/zip/tests/bug11216.phpt:1.3 php-src/ext/zip/tests/bug11216.phpt:1.4 --- php-src/ext/zip/tests/bug11216.phpt:1.3 Thu Jan 8 22:00:27 2009 +++ php-src/ext/zip/tests/bug11216.phpt Thu Jan 8 22:02:53 2009 @@ -2,7 +2,7 @@ Bug #11216 (::addEmptyDir() crashes when the directory already exists) --SKIPIF-- ?php -/* $Id: bug11216.phpt,v 1.3 2009/01/08 22:00:27 tony2001 Exp $ */ +/* $Id: bug11216.phpt,v 1.4 2009/01/08 22:02:53 tony2001 Exp $ */ if(!extension_loaded('zip')) die('skip'); ? --FILE-- @@ -15,14 +15,14 @@ $archive-close(); unlink('__test.zip'); ? ---EXPECT-- +--EXPECTF-- bool(true) ZipArchive Object ( [status] = 0 [statusSys] = 0 [numFiles] = 1 -[filename] = %s +[filename] = %s [comment] = ) bool(false) -- 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/zip/tests bug11216.phpt bug38944.phpt oo_properties.phpt
tony2001Thu Jan 8 22:03:33 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/zip/tests bug11216.phpt bug38944.phpt oo_properties.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/bug11216.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u Index: php-src/ext/zip/tests/bug11216.phpt diff -u php-src/ext/zip/tests/bug11216.phpt:1.1.2.2.2.1 php-src/ext/zip/tests/bug11216.phpt:1.1.2.2.2.2 --- php-src/ext/zip/tests/bug11216.phpt:1.1.2.2.2.1 Wed May 21 09:27:41 2008 +++ php-src/ext/zip/tests/bug11216.phpt Thu Jan 8 22:03:32 2009 @@ -2,7 +2,7 @@ Bug #11216 (::addEmptyDir() crashes when the directory already exists) --SKIPIF-- ?php -/* $Id: bug11216.phpt,v 1.1.2.2.2.1 2008/05/21 09:27:41 pajoye Exp $ */ +/* $Id: bug11216.phpt,v 1.1.2.2.2.2 2009/01/08 22:03:32 tony2001 Exp $ */ if(!extension_loaded('zip')) die('skip'); ? --FILE-- @@ -15,14 +15,14 @@ $archive-close(); unlink('__test.zip'); ? ---EXPECT-- +--EXPECTF-- bool(true) ZipArchive Object ( [status] = 0 [statusSys] = 0 [numFiles] = 1 -[filename] = +[filename] = %s [comment] = ) bool(false) http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/bug38944.phpt?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u Index: php-src/ext/zip/tests/bug38944.phpt diff -u php-src/ext/zip/tests/bug38944.phpt:1.1.2.2 php-src/ext/zip/tests/bug38944.phpt:1.1.2.2.2.1 --- php-src/ext/zip/tests/bug38944.phpt:1.1.2.2 Mon Sep 25 08:45:08 2006 +++ php-src/ext/zip/tests/bug38944.phpt Thu Jan 8 22:03:32 2009 @@ -23,7 +23,7 @@ int(0) int(0) int(0) -string(0) +string(%d) %s string(0) object(ZipArchive)#%d (5) { [status]= @@ -33,7 +33,7 @@ [numFiles]= int(0) [filename]= - string(0) + string(%d) %s [comment]= string(0) } http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/oo_properties.phpt?r1=1.1.2.4.2.2r2=1.1.2.4.2.3diff_format=u Index: php-src/ext/zip/tests/oo_properties.phpt diff -u php-src/ext/zip/tests/oo_properties.phpt:1.1.2.4.2.2 php-src/ext/zip/tests/oo_properties.phpt:1.1.2.4.2.3 --- php-src/ext/zip/tests/oo_properties.phpt:1.1.2.4.2.2Wed May 21 09:27:41 2008 +++ php-src/ext/zip/tests/oo_properties.phptThu Jan 8 22:03:32 2009 @@ -2,7 +2,7 @@ ziparchive::properties isset()/empty() checks --SKIPIF-- ?php -/* $Id: oo_properties.phpt,v 1.1.2.4.2.2 2008/05/21 09:27:41 pajoye Exp $ */ +/* $Id: oo_properties.phpt,v 1.1.2.4.2.3 2009/01/08 22:03:32 tony2001 Exp $ */ if(!extension_loaded('zip')) die('skip'); ? --FILE-- @@ -51,8 +51,8 @@ zip-numFiles (5): empty(): 0 isset(): 1 -zip-filename (0): - empty(): 1 +zip-filename (%d): + empty(): 0 isset(): 1 zip-comment (19): empty(): 0 -- 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/zip/tests bug11216.phpt bug38944.phpt oo_properties.phpt
tony2001Thu Jan 8 22:03:40 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/zip/tests bug11216.phpt bug38944.phpt oo_properties.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/bug11216.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/zip/tests/bug11216.phpt diff -u php-src/ext/zip/tests/bug11216.phpt:1.1.2.2 php-src/ext/zip/tests/bug11216.phpt:1.1.2.3 --- php-src/ext/zip/tests/bug11216.phpt:1.1.2.2 Sun Jun 3 21:21:57 2007 +++ php-src/ext/zip/tests/bug11216.phpt Thu Jan 8 22:03:40 2009 @@ -2,7 +2,7 @@ Bug #11216 (::addEmptyDir() crashes when the directory already exists) --SKIPIF-- ?php -/* $Id: bug11216.phpt,v 1.1.2.2 2007/06/03 21:21:57 pajoye Exp $ */ +/* $Id: bug11216.phpt,v 1.1.2.3 2009/01/08 22:03:40 tony2001 Exp $ */ if(!extension_loaded('zip')) die('skip'); ? --FILE-- @@ -15,14 +15,14 @@ $archive-close(); unlink('__test.zip'); ? ---EXPECT-- +--EXPECTF-- bool(true) ZipArchive Object ( [status] = 0 [statusSys] = 0 [numFiles] = 1 -[filename] = +[filename] = %s [comment] = ) bool(false) http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/bug38944.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/zip/tests/bug38944.phpt diff -u php-src/ext/zip/tests/bug38944.phpt:1.1.2.2 php-src/ext/zip/tests/bug38944.phpt:1.1.2.3 --- php-src/ext/zip/tests/bug38944.phpt:1.1.2.2 Mon Sep 25 08:45:08 2006 +++ php-src/ext/zip/tests/bug38944.phpt Thu Jan 8 22:03:40 2009 @@ -23,7 +23,7 @@ int(0) int(0) int(0) -string(0) +string(%d) %s string(0) object(ZipArchive)#%d (5) { [status]= @@ -33,7 +33,7 @@ [numFiles]= int(0) [filename]= - string(0) + string(%d) %s [comment]= string(0) } http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/oo_properties.phpt?r1=1.1.2.5r2=1.1.2.6diff_format=u Index: php-src/ext/zip/tests/oo_properties.phpt diff -u php-src/ext/zip/tests/oo_properties.phpt:1.1.2.5 php-src/ext/zip/tests/oo_properties.phpt:1.1.2.6 --- php-src/ext/zip/tests/oo_properties.phpt:1.1.2.5Mon Nov 19 11:12:36 2007 +++ php-src/ext/zip/tests/oo_properties.phptThu Jan 8 22:03:40 2009 @@ -2,7 +2,7 @@ ziparchive::properties isset()/empty() checks --SKIPIF-- ?php -/* $Id: oo_properties.phpt,v 1.1.2.5 2007/11/19 11:12:36 tony2001 Exp $ */ +/* $Id: oo_properties.phpt,v 1.1.2.6 2009/01/08 22:03:40 tony2001 Exp $ */ if(!extension_loaded('zip')) die('skip'); ? --FILE-- @@ -51,8 +51,8 @@ zip-numFiles (5): empty(): 0 isset(): 1 -zip-filename (0): - empty(): 1 +zip-filename (%d): + empty(): 0 isset(): 1 zip-comment (19): empty(): 0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /main/streams streams.c
Em Sex, 2009-01-09 às 00:27 +0300, Antony Dovgal escreveu: On 08.01.2009 21:46, Felipe Pena wrote: felipe Thu Jan 8 18:46:00 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/main/streams streams.c Log: MFH: - Fixed bug #47037 (No error when using fopen with emty string) Patch by Cristian Rodriguez R. Would you mind fixing these tests, too? Thanks. 5_2/ext/tidy/tests/019.phpt 5_2/ext/tidy/tests/022.phpt 5_2/ext/standard/tests/strings/md5_file.phpt 5_2/ext/standard/tests/file/readfile_variation10.phpt 5_2/ext/standard/tests/file/file_put_contents_variation8.phpt 5_2/ext/exif/tests/exif_imagetype_variation1.phpt Ops, np! I'll fix them. Thanks Tony ;) -- Regards, Felipe Pena -- 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/exif/tests exif_imagetype_variation1.phpt /ext/standard/tests/strings md5_file.phpt /ext/tidy/tests 019.phpt 022.phpt
felipe Fri Jan 9 02:11:55 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/exif/tests exif_imagetype_variation1.phpt /php-src/ext/tidy/tests 019.phpt 022.phpt /php-src/ext/standard/tests/strings md5_file.phpt Log: - Fixed tests http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/exif_imagetype_variation1.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/exif/tests/exif_imagetype_variation1.phpt diff -u php-src/ext/exif/tests/exif_imagetype_variation1.phpt:1.1.4.2 php-src/ext/exif/tests/exif_imagetype_variation1.phpt:1.1.4.3 --- php-src/ext/exif/tests/exif_imagetype_variation1.phpt:1.1.4.2 Mon Dec 1 12:25:21 2008 +++ php-src/ext/exif/tests/exif_imagetype_variation1.phpt Fri Jan 9 02:11:54 2009 @@ -165,20 +165,32 @@ Warning: exif_imagetype(1): failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 16 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 17 -- Warning: exif_imagetype(1): failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 18 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 19 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 20 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 21 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 22 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 23 -- @@ -189,11 +201,14 @@ Warning: exif_imagetype() expects parameter 1 to be string, resource given in %s on line %d NULL -- Iteration 25 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 26 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) Done ? ===Done=== - http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tests/019.phpt?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u Index: php-src/ext/tidy/tests/019.phpt diff -u php-src/ext/tidy/tests/019.phpt:1.1.2.2 php-src/ext/tidy/tests/019.phpt:1.1.2.2.2.1 --- php-src/ext/tidy/tests/019.phpt:1.1.2.2 Wed Aug 30 22:34:48 2006 +++ php-src/ext/tidy/tests/019.phpt Fri Jan 9 02:11:54 2009 @@ -34,5 +34,9 @@ Warning: tidy_repair_string() expects parameter 1 to be string, array given in %s on line %d +Warning: tidy_repair_file(): Filename cannot be empty in %s on line %d + +Warning: tidy_repair_file(): Filename cannot be empty in %s on line %d + Warning: tidy_repair_file() expects parameter 1 to be string, array given in %s on line %d Done http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tests/022.phpt?r1=1.2.2.2r2=1.2.2.2.2.1diff_format=u Index: php-src/ext/tidy/tests/022.phpt diff -u php-src/ext/tidy/tests/022.phpt:1.2.2.2 php-src/ext/tidy/tests/022.phpt:1.2.2.2.2.1 --- php-src/ext/tidy/tests/022.phpt:1.2.2.2 Tue Sep 5 15:23:26 2006 +++ php-src/ext/tidy/tests/022.phpt Fri Jan 9 02:11:54 2009 @@ -34,5 +34,9 @@ Warning: tidy_repair_string() expects parameter 1 to be string, array given in %s on line %d +Warning: tidy_repair_file(): Filename cannot be empty in %s on line %d + +Warning: tidy_repair_file(): Filename cannot be empty in %s on line %d + Warning: tidy_repair_file() expects parameter 1 to be string, array given in %s on line %d Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/md5_file.phpt?r1=1.1.2.1r2=1.1.2.1.2.1diff_format=u Index: php-src/ext/standard/tests/strings/md5_file.phpt -- 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/exif/tests exif_imagetype_variation1.phpt /ext/standard/tests/file file_put_contents_variation8.phpt readfile_variation10.phpt /ext/standard/tests/strings md5_fi
felipe Fri Jan 9 02:35:37 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/exif/tests exif_imagetype_variation1.phpt /php-src/ext/standard/tests/filefile_put_contents_variation8.phpt readfile_variation10.phpt /php-src/ext/standard/tests/strings md5_file.phpt /php-src/ext/tidy/tests 019.phpt 022.phpt Log: - Fixed tests http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/exif_imagetype_variation1.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/exif/tests/exif_imagetype_variation1.phpt diff -u php-src/ext/exif/tests/exif_imagetype_variation1.phpt:1.1.2.1 php-src/ext/exif/tests/exif_imagetype_variation1.phpt:1.1.2.2 --- php-src/ext/exif/tests/exif_imagetype_variation1.phpt:1.1.2.1 Mon Dec 1 12:23:26 2008 +++ php-src/ext/exif/tests/exif_imagetype_variation1.phpt Fri Jan 9 02:35:37 2009 @@ -175,20 +175,32 @@ Warning: exif_imagetype(1): failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 16 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 17 -- Warning: exif_imagetype(1): failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 18 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 19 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 20 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 21 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 22 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 23 -- @@ -199,8 +211,12 @@ Warning: exif_imagetype(Resource id #%d): failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 25 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) -- Iteration 26 -- + +Warning: exif_imagetype(): Filename cannot be empty in %s on line %d bool(false) Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_put_contents_variation8.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/file/file_put_contents_variation8.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readfile_variation10.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/file/readfile_variation10.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/md5_file.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/md5_file.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tests/019.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/tidy/tests/019.phpt diff -u php-src/ext/tidy/tests/019.phpt:1.1.2.2 php-src/ext/tidy/tests/019.phpt:1.1.2.3 --- php-src/ext/tidy/tests/019.phpt:1.1.2.2 Wed Aug 30 22:34:48 2006 +++ php-src/ext/tidy/tests/019.phpt Fri Jan 9 02:35:37 2009 @@ -34,5 +34,9 @@ Warning: tidy_repair_string() expects parameter 1 to be string, array given in %s on line %d +Warning: tidy_repair_file(): Filename cannot be empty in %s on line %d + +Warning: tidy_repair_file(): Filename cannot be empty in %s on line %d + Warning: tidy_repair_file() expects parameter 1 to be string, array given in %s on line %d Done http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tests/022.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u Index: php-src/ext/tidy/tests/022.phpt diff -u php-src/ext/tidy/tests/022.phpt:1.2.2.2 php-src/ext/tidy/tests/022.phpt:1.2.2.3 --- php-src/ext/tidy/tests/022.phpt:1.2.2.2 Tue Sep 5 15:23:26 2006 +++ php-src/ext/tidy/tests/022.phpt Fri Jan 9 02:35:37 2009 @@ -34,5 +34,9 @@ Warning: tidy_repair_string() expects parameter 1 to be string, array given in %s on line %d +Warning: tidy_repair_file(): Filename cannot be empty in %s on line %d + +Warning: tidy_repair_file(): Filename cannot be empty in %s on line %d + Warning: tidy_repair_file() expects parameter 1 to be string, array given in %s on line %d Done -- 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 /main/streams streams.c
felipe Thu Jan 8 19:21:26 2009 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/main/streams streams.c Log: MFH: - Fixed bug #47037 (No error when using fopen with emty string) Patch by Cristian Rodriguez R. http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1384r2=1.2027.2.547.2.1385diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1384 php-src/NEWS:1.2027.2.547.2.1385 --- php-src/NEWS:1.2027.2.547.2.1384Thu Jan 8 17:28:08 2009 +++ php-src/NEWSThu Jan 8 19:21:25 2009 @@ -14,6 +14,8 @@ (Fixes CVE-2008-5498) (Scott) - Fixed a segfault when malformed string is passed to json_decode(). (Scott) +- Fixed bug #47037 (No error when using fopen with emty string). + (Cristian Rodriguez R.) - Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a TXT record). (Felipe) - Fixed bug #47027 (var_export doesn't show numeric indices on ArrayObject). http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.82.2.6.2.32r2=1.82.2.6.2.33diff_format=u Index: php-src/main/streams/streams.c diff -u php-src/main/streams/streams.c:1.82.2.6.2.32 php-src/main/streams/streams.c:1.82.2.6.2.33 --- php-src/main/streams/streams.c:1.82.2.6.2.32Wed Dec 31 11:17:48 2008 +++ php-src/main/streams/streams.c Thu Jan 8 19:21:25 2009 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: streams.c,v 1.82.2.6.2.32 2008/12/31 11:17:48 sebastian Exp $ */ +/* $Id: streams.c,v 1.82.2.6.2.33 2009/01/08 19:21:25 felipe Exp $ */ #define _GNU_SOURCE #include php.h @@ -1763,6 +1763,7 @@ } if (!path || !*path) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Filename cannot be empty); return 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_2) /ext/date/tests localtime_basic.phpt localtime_variation1.phpt localtime_variation2.phpt localtime_variation3.phpt localtime_variation4.phpt localtime_variation5.phpt
smantoorFri Jan 9 05:08:44 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/date/tests localtime_variation3.phpt localtime_variation4.phpt localtime_variation5.phpt localtime_basic.phpt localtime_variation1.phpt localtime_variation2.phpt Log: New testcases for localtime function http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/localtime_variation3.phpt +++ php-src/ext/date/tests/localtime_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/localtime_variation4.phpt +++ php-src/ext/date/tests/localtime_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/localtime_variation5.phpt +++ php-src/ext/date/tests/localtime_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_basic.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/localtime_basic.phpt +++ php-src/ext/date/tests/localtime_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/localtime_variation1.phpt +++ php-src/ext/date/tests/localtime_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/localtime_variation2.phpt +++ php-src/ext/date/tests/localtime_variation2.phpt -- 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/date/tests localtime_basic.phpt localtime_variation1.phpt localtime_variation2.phpt localtime_variation3.phpt localtime_variation4.phpt localtime_variation5.phpt
smantoorFri Jan 9 05:09:40 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/date/tests localtime_variation5.phpt localtime_basic.phpt localtime_variation1.phpt localtime_variation2.phpt localtime_variation3.phpt localtime_variation4.phpt Log: New testcases for localtime function http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/localtime_variation5.phpt +++ php-src/ext/date/tests/localtime_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_basic.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/localtime_basic.phpt +++ php-src/ext/date/tests/localtime_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/localtime_variation1.phpt +++ php-src/ext/date/tests/localtime_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/localtime_variation2.phpt +++ php-src/ext/date/tests/localtime_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/localtime_variation3.phpt +++ php-src/ext/date/tests/localtime_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/localtime_variation4.phpt +++ php-src/ext/date/tests/localtime_variation4.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/date/tests localtime_basic.phpt localtime_variation1.phpt localtime_variation2.phpt localtime_variation3.phpt localtime_variation4.phpt localtime_variation5.phpt
smantoorFri Jan 9 05:10:33 2009 UTC Modified files: /php-src/ext/date/tests localtime_variation1.phpt localtime_variation2.phpt localtime_variation3.phpt localtime_variation4.phpt localtime_variation5.phpt localtime_basic.phpt Log: New testcases for localtime function http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/date/tests/localtime_variation1.phpt diff -u /dev/null php-src/ext/date/tests/localtime_variation1.phpt:1.2 --- /dev/null Fri Jan 9 05:10:33 2009 +++ php-src/ext/date/tests/localtime_variation1.phptFri Jan 9 05:10:33 2009 @@ -0,0 +1,658 @@ +--TEST-- +Test localtime() function : usage variation - Passing unexpected values to first argument 'timestamp'. +--FILE-- +?php +/* Prototype : array localtime([int timestamp [, bool associative_array]]) + * Description: Returns the results of the C system call localtime as an associative array + * if the associative_array argument is set to 1 other wise it is a regular array + * Source code: ext/date/php_date.c + * Alias to functions: + */ + +echo *** Testing localtime() : usage variation ***\n; + +date_default_timezone_set(UTC); +// Initialise function arguments not being substituted (if any) +$is_associative = true; + +//get an unset variable +$unset_var = 10; +unset ($unset_var); + +// 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( + + // float data + 'float 10.5' = 10.5, + 'float -10.5' = -10.5, + 'float .5' = .5, + + // array data + 'empty array' = array(), + 'int indexed array' = $index_array, + 'associative array' = $assoc_array, + 'nested arrays' = array('foo', $index_array, $assoc_array), + + // 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, +); + +// loop through each element of the array for timestamp + +foreach($inputs as $key =$value) { + echo \n--$key--\n; + var_dump( localtime($value) ); + var_dump( localtime($value, $is_associative) ); +}; + +? +===DONE=== +--EXPECTF-- +*** Testing localtime() : usage variation *** + +--float 10.5-- +array(9) { + [0]= + int(10) + [1]= + int(0) + [2]= + int(0) + [3]= + int(1) + [4]= + int(0) + [5]= + int(70) + [6]= + int(4) + [7]= + int(0) + [8]= + int(0) +} +array(9) { + [utm_sec]= + int(10) + [utm_min]= + int(0) + [utm_hour]= + int(0) + [utm_mday]= + int(1) + [utm_mon]= + int(0) + [utm_year]= + int(70) + [utm_wday]= + int(4) + [utm_yday]= + int(0) + [utm_isdst]= + int(0) +} + +--float -10.5-- +array(9) { + [0]= + int(50) + [1]= + int(59) + [2]= + int(23) + [3]= + int(31) + [4]= + int(11) + [5]= + int(69) + [6]= + int(3) + [7]= + int(364) + [8]= + int(0) +} +array(9) { + [utm_sec]= + int(50) + [utm_min]= + int(59) + [utm_hour]= + int(23) + [utm_mday]= + int(31) + [utm_mon]= + int(11) + [utm_year]= + int(69) + [utm_wday]= + int(3) + [utm_yday]= + int(364) + [utm_isdst]= + int(0) +} + +--float .5-- +array(9) { + [0]= + int(0) + [1]= + int(0) + [2]= + int(0) + [3]= + int(1) + [4]= + int(0) + [5]= + int(70) + [6]= + int(4) + [7]= + int(0) + [8]= + int(0) +} +array(9) { + [utm_sec]= + int(0) + [utm_min]= + int(0) + [utm_hour]= + int(0) + [utm_mday]= + int(1) + [utm_mon]= + int(0) + [utm_year]= + int(70) + [utm_wday]= + int(4) + [utm_yday]= + int(0) + [utm_isdst]= + int(0) +} + +--empty array-- + +Warning: localtime() expects parameter 1 to be long, array given in %s on line %d +bool(false) + +Warning: localtime() expects parameter 1 to be long, array given in %s on line %d +bool(false) + +--int indexed array-- + +Warning: localtime() expects parameter 1 to be long, array given in %s on line %d +bool(false) + +Warning:
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS
janiFri Jan 9 07:17:57 2009 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: fix news http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1385r2=1.2027.2.547.2.1386diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1385 php-src/NEWS:1.2027.2.547.2.1386 --- php-src/NEWS:1.2027.2.547.2.1385Thu Jan 8 19:21:25 2009 +++ php-src/NEWSFri Jan 9 07:17:57 2009 @@ -3,6 +3,7 @@ ?? ??? 2009, PHP 5.2.9 - Changed __call() to be invoked on private/protected method access, similar to properties and __get(). (Andrei) + - Added optional sorting type flag parameter to array_unique(). Default is SORT_REGULAR. (Andrei) @@ -10,12 +11,12 @@ - Fixed zip filename property read. (Pierre) - Fixed explode() behavior with empty string to respect negative limit. (Shire) - Fixed security issue in imagerotate(), background colour isn't validated - correctly with a non truecolour image, reported by Hamid Ebadi, APA Laboratory. - (Fixes CVE-2008-5498) (Scott) + correctly with a non truecolour image. Reported by Hamid Ebadi, + APA Laboratory (Fixes CVE-2008-5498). (Scott) - Fixed a segfault when malformed string is passed to json_decode(). (Scott) -- Fixed bug #47037 (No error when using fopen with emty string). - (Cristian Rodriguez R.) +- Fixed bug #47037 (No error when using fopen with empty string). + (Cristian Rodriguez R., Felipe) - Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a TXT record). (Felipe) - Fixed bug #47027 (var_export doesn't show numeric indices on ArrayObject). @@ -52,7 +53,7 @@ - Reverted bug fix #42718 that broke magic_quotes_gpc (Scott) 04 Dec 2008, PHP 5.2.7 -- Upgraded PCRE to version 7.8 (Fixes CVE-2008-2371) (Ilia) +- Upgraded PCRE to version 7.8 (Fixes CVE-2008-2371). (Ilia) - Updated timezone database to version 2008.9. (Derick) - Upgraded bundled libzip to 0.9.0. (Pierre) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php