[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Thu Jul 24 01:31:50 2008 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3116r2=1.3117diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.3116 php-src/ChangeLog:1.3117 --- php-src/ChangeLog:1.3116Wed Jul 23 01:31:49 2008 +++ php-src/ChangeLog Thu Jul 24 01:31:50 2008 @@ -1,3 +1,389 @@ +2008-07-23 Hartmut Holzgraefe [EMAIL PROTECTED] + +* (PHP_5_3) + ext/pgsql/config.m4: + MFH: corrected library search path order in tests + +* ext/pgsql/config.m4: + corrected library search path order in tests + +2008-07-23 Lars Strojny [EMAIL PROTECTED] + +* ext/standard/tests/array_intersect_ukey_error.phpt + ext/standard/tests/array_intersect_ukey_variation1.phpt + ext/standard/tests/array_intersect_ukey_variation2.phpt + ext/standard/tests/array_intersect_ukey_variation3.phpt + ext/standard/tests/array_intersect_ukey_variation4.phpt + ext/standard/tests/array_intersect_ukey_variation5.phpt + ext/standard/tests/array_intersect_ukey_variation6.phpt + ext/standard/tests/array_intersect_ukey_variation7.phpt + ext/standard/tests/array_intersect_ukey_variation8.phpt + ext/standard/tests/array_intersect_ukey_variation9.phpt: + array_intersect_ukey tests by Sanjay Mantoor + +* ext/standard/tests/array_intersect_ukey_error.phpt + ext/standard/tests/array_intersect_ukey_error.phpt + ext/standard/tests/array_intersect_ukey_variation1.phpt + ext/standard/tests/array_intersect_ukey_variation1.phpt + ext/standard/tests/array_intersect_ukey_variation2.phpt + ext/standard/tests/array_intersect_ukey_variation2.phpt + ext/standard/tests/array_intersect_ukey_variation3.phpt + ext/standard/tests/array_intersect_ukey_variation3.phpt + ext/standard/tests/array_intersect_ukey_variation4.phpt + ext/standard/tests/array_intersect_ukey_variation4.phpt + ext/standard/tests/array_intersect_ukey_variation5.phpt + ext/standard/tests/array_intersect_ukey_variation5.phpt + ext/standard/tests/array_intersect_ukey_variation6.phpt + ext/standard/tests/array_intersect_ukey_variation6.phpt + ext/standard/tests/array_intersect_ukey_variation7.phpt + ext/standard/tests/array_intersect_ukey_variation7.phpt + ext/standard/tests/array_intersect_ukey_variation8.phpt + ext/standard/tests/array_intersect_ukey_variation8.phpt + ext/standard/tests/array_intersect_ukey_variation9.phpt + ext/standard/tests/array_intersect_ukey_variation9.phpt: + + file array_intersect_ukey_error.phpt was initially added on branch + PHP_5_3. + +2008-07-23 Stanislav Malyshev [EMAIL PROTECTED] + +* ext/intl/locale/locale_methods.c + ext/intl/tests/locale_accept.phpt + ext/intl/tests/locale_compose_locale.phpt: + implement bug #14266 + +* ext/intl/tests/ut_common.inc: + typoes + +2008-07-23 Derick Rethans [EMAIL PROTECTED] + +* (PHP_5_3) + ext/date/lib/parse_date.c + ext/date/lib/parse_date.re: + - MFH: Fixed an issue with first weekday of in case the first weekday + was +the same day-of-week as the first day of the month. + +* ext/date/lib/parse_date.c + ext/date/lib/parse_date.re: + - Fixed an issue with first weekday of in case the first weekday was + the +same day-of-week as the first day of the month. + +2008-07-23 Jani Taskinen [EMAIL PROTECTED] + +* (PHP_5_3) + NEWS: + 80 chars per line.. + +2008-07-23 Felipe Pena [EMAIL PROTECTED] + +* ext/standard/tests/class_object/get_class_error_001.phpt + ext/standard/tests/class_object/get_class_methods_error_001.phpt + ext/standard/tests/class_object/get_object_vars_error_001.phpt + ext/standard/tests/class_object/get_parent_class_error_001.phpt + ext/standard/tests/class_object/is_a_error_001.phpt + ext/standard/tests/class_object/is_subclass_of_error_001.phpt + ext/standard/tests/class_object/method_exists_error_001.phpt: + - Fixed tests + +2008-07-23 Stanislav Malyshev [EMAIL PROTECTED] + +* (PHP_5_3) + ext/intl/locale/locale_methods.c + ext/intl/tests/locale_compose_locale.phpt: + add compose syntax as per request #14266 + +2008-07-23 Felipe Pena [EMAIL PROTECTED] + +* ext/standard/assert.c + ext/standard/basic_functions.c + ext/standard/tests/assert/assert04.phpt + ext/standard/tests/assert/assert_error1.phpt: + - New parameter parsing API + +2008-07-23 Derick Rethans [EMAIL PROTECTED] + +* (PHP_5_3) + NEWS + ext/date/lib/parse_date.c + ext/date/lib/parse_date.re + ext/date/tests/bug43452.phpt: + - MFH: Fixed bug #43452 (strings containing a weekday, or a number plus + weekday +behaved incorrect of the current day-of-week was the same as the one in + the +
[PHP-CVS] cvs: php-src /ext/spl spl.php
helly Wed Jul 23 06:07:55 2008 UTC Modified files: /php-src/ext/splspl.php Log: - Add new classes http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl.php?r1=1.85r2=1.86diff_format=u Index: php-src/ext/spl/spl.php diff -u php-src/ext/spl/spl.php:1.85 php-src/ext/spl/spl.php:1.86 --- php-src/ext/spl/spl.php:1.85Sat Jul 19 15:43:35 2008 +++ php-src/ext/spl/spl.php Wed Jul 23 06:07:55 2008 @@ -49,6 +49,7 @@ * - class AppendIterator implements OuterIterator * - class RegexIterator extends FilterIterator * - class RecursiveRegexIterator extends RegexIterator implements RecursiveIterator + * - class MultipleIterator extends Iterator * * 2) Directories and Files * @@ -75,6 +76,7 @@ * - class ArrayObject implements IteratorAggregate, ArrayAccess, Countable * - class ArrayIterator implements Iterator, ArrayAccess, Countable, SeekableIterator * - class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator + * - class SplFixedArray implements Iterator, ArrayAccess, Countable * * As the above suggest an ArrayObject creates an ArrayIterator when it comes to * iteration (e.g. ArrayObject instance used inside foreach). -- 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/spl spl.php
helly Wed Jul 23 06:08:07 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/splspl.php Log: - MFH Add new classes http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl.php?r1=1.49.2.11.2.7.2.5r2=1.49.2.11.2.7.2.6diff_format=u Index: php-src/ext/spl/spl.php diff -u php-src/ext/spl/spl.php:1.49.2.11.2.7.2.5 php-src/ext/spl/spl.php:1.49.2.11.2.7.2.6 --- php-src/ext/spl/spl.php:1.49.2.11.2.7.2.5 Sat Jul 19 15:49:21 2008 +++ php-src/ext/spl/spl.php Wed Jul 23 06:08:07 2008 @@ -6,7 +6,7 @@ * * SPL - Standard PHP Library * - * (c) Marcus Boerger, 2003 - 2007 + * (c) Marcus Boerger, 2003 - 2008 */ /** @mainpage SPL - Standard PHP Library @@ -49,6 +49,7 @@ * - class AppendIterator implements OuterIterator * - class RegexIterator extends FilterIterator * - class RecursiveRegexIterator extends RegexIterator implements RecursiveIterator + * - class MultipleIterator extends Iterator * * 2) Directories and Files * @@ -75,6 +76,7 @@ * - class ArrayObject implements IteratorAggregate, ArrayAccess, Countable * - class ArrayIterator implements Iterator, ArrayAccess, Countable, SeekableIterator * - class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator + * - class SplFixedArray implements Iterator, ArrayAccess, Countable * * As the above suggest an ArrayObject creates an ArrayIterator when it comes to * iteration (e.g. ArrayObject instance used inside foreach). -- 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/spl spl_directory.c
helly Wed Jul 23 06:12:29 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/splspl_directory.c Log: - [DOC] Add FilesystemIterator::SKIP_DOTS (flag to skip '.' and '..' in iteration) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.23.2.25r2=1.45.2.27.2.23.2.26diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.25 php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.26 --- php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.25 Sat Jul 19 11:20:18 2008 +++ php-src/ext/spl/spl_directory.c Wed Jul 23 06:12:29 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.25 2008/07/19 11:20:18 colder Exp $ */ +/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.26 2008/07/23 06:12:29 helly Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -2623,6 +2623,7 @@ REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, KEY_AS_PATHNAME, SPL_FILE_DIR_KEY_AS_PATHNAME); REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, KEY_AS_FILENAME, SPL_FILE_DIR_KEY_AS_FILENAME); REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, NEW_CURRENT_AND_KEY, SPL_FILE_DIR_KEY_AS_FILENAME|SPL_FILE_DIR_CURRENT_AS_FILEINFO); + REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, SKIP_DOTS, SPL_FILE_DIR_SKIPDOTS); spl_ce_FilesystemIterator-get_iterator = spl_filesystem_tree_get_iterator; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl spl_directory.c
helly Wed Jul 23 06:12:44 2008 UTC Modified files: /php-src/ext/splspl_directory.c Log: - MFH [DOC] Add FilesystemIterator::SKIP_DOTS (flag to skip '.' and '..' in iteration) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.160r2=1.161diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.160 php-src/ext/spl/spl_directory.c:1.161 --- php-src/ext/spl/spl_directory.c:1.160 Sat Jul 19 11:20:04 2008 +++ php-src/ext/spl/spl_directory.c Wed Jul 23 06:12:44 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_directory.c,v 1.160 2008/07/19 11:20:04 colder Exp $ */ +/* $Id: spl_directory.c,v 1.161 2008/07/23 06:12:44 helly Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -1848,7 +1848,7 @@ static const zend_function_entry spl_FilesystemIterator_functions[] = { SPL_ME(FilesystemIterator, __construct, arginfo_r_dir___construct, ZEND_ACC_PUBLIC) SPL_ME(FilesystemIterator, rewind,NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, next, NULL, ZEND_ACC_PUBLIC) + SPL_ME(DirectoryIterator, next, NULL, ZEND_ACC_PUBLIC) SPL_ME(FilesystemIterator, key, NULL, ZEND_ACC_PUBLIC) SPL_ME(FilesystemIterator, current, NULL, ZEND_ACC_PUBLIC) SPL_ME(FilesystemIterator, getFlags, NULL, ZEND_ACC_PUBLIC) @@ -2769,6 +2769,7 @@ REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, KEY_AS_PATHNAME, SPL_FILE_DIR_KEY_AS_PATHNAME); REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, KEY_AS_FILENAME, SPL_FILE_DIR_KEY_AS_FILENAME); REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, NEW_CURRENT_AND_KEY, SPL_FILE_DIR_KEY_AS_FILENAME|SPL_FILE_DIR_CURRENT_AS_FILEINFO); + REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, SKIP_DOTS, SPL_FILE_DIR_SKIPDOTS); spl_ce_FilesystemIterator-get_iterator = spl_filesystem_tree_get_iterator; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/spl spl_directory.c
Hello Marcus, pf, I executed the commands in the wrong window/order. Now head got MFH :-) Wednesday, July 23, 2008, 8:12:44 AM, you wrote: helly Wed Jul 23 06:12:44 2008 UTC Modified files: /php-src/ext/splspl_directory.c Log: - MFH [DOC] Add FilesystemIterator::SKIP_DOTS (flag to skip '.' and '..' in iteration) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.160r2=1.161diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.160 php-src/ext/spl/spl_directory.c:1.161 --- php-src/ext/spl/spl_directory.c:1.160 Sat Jul 19 11:20:04 2008 +++ php-src/ext/spl/spl_directory.c Wed Jul 23 06:12:44 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_directory.c,v 1.160 2008/07/19 11:20:04 colder Exp $ */ +/* $Id: spl_directory.c,v 1.161 2008/07/23 06:12:44 helly Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -1848,7 +1848,7 @@ static const zend_function_entry spl_FilesystemIterator_functions[] = { SPL_ME(FilesystemIterator, __construct, arginfo_r_dir___construct, ZEND_ACC_PUBLIC) SPL_ME(FilesystemIterator, rewind,NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, next, NULL, ZEND_ACC_PUBLIC) + SPL_ME(DirectoryIterator, next, NULL, ZEND_ACC_PUBLIC) SPL_ME(FilesystemIterator, key, NULL, ZEND_ACC_PUBLIC) SPL_ME(FilesystemIterator, current, NULL, ZEND_ACC_PUBLIC) SPL_ME(FilesystemIterator, getFlags, NULL, ZEND_ACC_PUBLIC) @@ -2769,6 +2769,7 @@ REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, KEY_AS_PATHNAME, SPL_FILE_DIR_KEY_AS_PATHNAME); REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, KEY_AS_FILENAME, SPL_FILE_DIR_KEY_AS_FILENAME); REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, NEW_CURRENT_AND_KEY, SPL_FILE_DIR_KEY_AS_FILENAME|SPL_FILE_DIR_CURRENT_AS_FILEINFO); + REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, SKIP_DOTS, SPL_FILE_DIR_SKIPDOTS); spl_ce_FilesystemIterator-get_iterator = spl_filesystem_tree_get_iterator; Best regards, Marcus -- 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) /ext/spl spl_directory.c
2008/7/23 Marcus Boerger [EMAIL PROTECTED]: helly Wed Jul 23 06:12:29 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/splspl_directory.c Log: - [DOC] Add FilesystemIterator::SKIP_DOTS (flag to skip '.' and '..' in iteration) SKIP_DOTS to me sounds like it will skip all hidden files/folders, not . and .. Don't these dot dirs have some special name which the flag could be named after? -Hannes -- 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) /ext/spl spl_directory.c
Hello Hannes, Wednesday, July 23, 2008, 8:36:22 AM, you wrote: 2008/7/23 Marcus Boerger [EMAIL PROTECTED]: helly Wed Jul 23 06:12:29 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/splspl_directory.c Log: - [DOC] Add FilesystemIterator::SKIP_DOTS (flag to skip '.' and '..' in iteration) SKIP_DOTS to me sounds like it will skip all hidden files/folders, not . and .. Don't these dot dirs have some special name which the flag could be named after? I am not aware of any. But feel free to rename that constant to whatever you see fit. Best regards, Marcus -- 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) /ext/intl/collator collator_create.c /ext/intl/dateformat dateformat.c /ext/intl/formatter formatter_main.c /ext/intl/msgformat msgformat.c
Excellent. Just checking..a bunny thanks you. ;) --Jani Stanislav Malyshev wrote: I am. Jani Taskinen wrote: Why aren't you merging this stuff to HEAD? -- 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/network gethostbynamel_error.phpt
lbarnaudWed Jul 23 08:26:26 2008 UTC Modified files: /php-src/ext/standard/tests/network gethostbynamel_error.phpt Log: Fix test: use canonical name to avoid problems with domain search path http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/gethostbynamel_error.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/network/gethostbynamel_error.phpt diff -u php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.1 php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.2 --- php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.1Wed Mar 26 18:16:55 2008 +++ php-src/ext/standard/tests/network/gethostbynamel_error.phptWed Jul 23 08:26:26 2008 @@ -21,7 +21,7 @@ var_dump( gethostbynamel($hostname, $extra_arg) ); echo \n-- Testing gethostbynamel() with an unknown host --\n; -$hostname = 'unknownhost_zzz_xxx_yyy'; +$hostname = 'unknownhost_zzz_xxx_yyy.'; var_dump( gethostbynamel($hostname) ); echo 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/network gethostbynamel_error.phpt
lbarnaudWed Jul 23 08:27:17 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/network gethostbynamel_error.phpt Log: MFH: Fix test: use canonical name to avoid problems with domain search path http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/gethostbynamel_error.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/network/gethostbynamel_error.phpt diff -u php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.1.4.2 php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.1.4.3 --- php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.1.4.2 Wed Mar 26 18:19:31 2008 +++ php-src/ext/standard/tests/network/gethostbynamel_error.phptWed Jul 23 08:27:17 2008 @@ -21,7 +21,7 @@ var_dump( gethostbynamel($hostname, $extra_arg) ); echo \n-- Testing gethostbynamel() with an unknown host --\n; -$hostname = 'unknownhost_zzz_xxx_yyy'; +$hostname = 'unknownhost_zzz_xxx_yyy.'; var_dump( gethostbynamel($hostname) ); echo Done; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/soap/tests/schema skipif.inc
lbarnaudWed Jul 23 08:55:39 2008 UTC Modified files: /php-src/ext/soap/tests/schema skipif.inc Log: Fix tests: soap tests in schema/ needs the xml extension http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/skipif.inc?r1=1.1r2=1.2diff_format=u Index: php-src/ext/soap/tests/schema/skipif.inc diff -u php-src/ext/soap/tests/schema/skipif.inc:1.1 php-src/ext/soap/tests/schema/skipif.inc:1.2 --- php-src/ext/soap/tests/schema/skipif.inc:1.1Wed Jan 28 13:33:48 2004 +++ php-src/ext/soap/tests/schema/skipif.incWed Jul 23 08:55:39 2008 @@ -1,3 +1,5 @@ ?php if (!extension_loaded('soap')) die('skip soap extension not available'); + /* xml parser is required by test_schema.inc */ + if (!extension_loaded('xml')) die('skip xml extension not available'); ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/bz2 bz2.c
tony2001Wed Jul 23 08:56:00 2008 UTC Modified files: /php-src/ext/bz2bz2.c Log: add PHP_STREAM_FLAG_FCLOSE, bz2 streams can be closed with fclose() http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.35r2=1.36diff_format=u Index: php-src/ext/bz2/bz2.c diff -u php-src/ext/bz2/bz2.c:1.35 php-src/ext/bz2/bz2.c:1.36 --- php-src/ext/bz2/bz2.c:1.35 Mon Dec 31 07:12:07 2007 +++ php-src/ext/bz2/bz2.c Wed Jul 23 08:55:59 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: bz2.c,v 1.35 2007/12/31 07:12:07 sebastian Exp $ */ +/* $Id: bz2.c,v 1.36 2008/07/23 08:55:59 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -247,7 +247,9 @@ if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void **) fd, REPORT_ERRORS)) { bz_file = BZ2_bzdopen(fd, mode); } + stream-flags |= PHP_STREAM_FLAG_FCLOSE; } + /* remove the file created by php_stream_open_wrapper(), it is not needed since BZ2 functions * failed. */ @@ -259,6 +261,7 @@ if (bz_file) { retstream = _php_stream_bz2open_from_BZFILE(bz_file, mode, stream STREAMS_REL_CC TSRMLS_CC); if (retstream) { + retstream-flags |= PHP_STREAM_FLAG_FCLOSE; return retstream; } -- 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/soap/tests/schema skipif.inc
lbarnaudWed Jul 23 08:56:20 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/soap/tests/schema skipif.inc Log: MFH: Fix tests: soap tests in schema/ needs the xml extension http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/skipif.inc?r1=1.1r2=1.1.8.1diff_format=u Index: php-src/ext/soap/tests/schema/skipif.inc diff -u php-src/ext/soap/tests/schema/skipif.inc:1.1 php-src/ext/soap/tests/schema/skipif.inc:1.1.8.1 --- php-src/ext/soap/tests/schema/skipif.inc:1.1Wed Jan 28 13:33:48 2004 +++ php-src/ext/soap/tests/schema/skipif.incWed Jul 23 08:56:20 2008 @@ -1,3 +1,5 @@ ?php if (!extension_loaded('soap')) die('skip soap extension not available'); + /* xml parser is required by test_schema.inc */ + if (!extension_loaded('xml')) die('skip xml extension not available'); ? -- 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/bz2 bz2.c
tony2001Wed Jul 23 08:56:29 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/bz2bz2.c Log: MFH: add PHP_STREAM_FLAG_FCLOSE, bz2 streams can be closed with fclose() http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.14.2.3.2.12.2.4r2=1.14.2.3.2.12.2.5diff_format=u Index: php-src/ext/bz2/bz2.c diff -u php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.4 php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.5 --- php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.4 Tue Jul 1 07:36:59 2008 +++ php-src/ext/bz2/bz2.c Wed Jul 23 08:56:29 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: bz2.c,v 1.14.2.3.2.12.2.4 2008/07/01 07:36:59 tony2001 Exp $ */ +/* $Id: bz2.c,v 1.14.2.3.2.12.2.5 2008/07/23 08:56:29 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -247,7 +247,9 @@ if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void **) fd, REPORT_ERRORS)) { bz_file = BZ2_bzdopen(fd, mode); } + stream-flags |= PHP_STREAM_FLAG_FCLOSE; } + /* remove the file created by php_stream_open_wrapper(), it is not needed since BZ2 functions * failed. */ @@ -259,6 +261,7 @@ if (bz_file) { retstream = _php_stream_bz2open_from_BZFILE(bz_file, mode, stream STREAMS_REL_CC TSRMLS_CC); if (retstream) { + retstream-flags |= PHP_STREAM_FLAG_FCLOSE; return retstream; } -- 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/bz2 bz2.c
tony2001Wed Jul 23 08:56:38 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/bz2bz2.c Log: MFH: add PHP_STREAM_FLAG_FCLOSE, bz2 streams can be closed with fclose() http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.14.2.3.2.13r2=1.14.2.3.2.14diff_format=u Index: php-src/ext/bz2/bz2.c diff -u php-src/ext/bz2/bz2.c:1.14.2.3.2.13 php-src/ext/bz2/bz2.c:1.14.2.3.2.14 --- php-src/ext/bz2/bz2.c:1.14.2.3.2.13 Mon Dec 31 07:20:04 2007 +++ php-src/ext/bz2/bz2.c Wed Jul 23 08:56:37 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: bz2.c,v 1.14.2.3.2.13 2007/12/31 07:20:04 sebastian Exp $ */ +/* $Id: bz2.c,v 1.14.2.3.2.14 2008/07/23 08:56:37 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -247,7 +247,9 @@ if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void **) fd, REPORT_ERRORS)) { bz_file = BZ2_bzdopen(fd, mode); } + stream-flags |= PHP_STREAM_FLAG_FCLOSE; } + /* remove the file created by php_stream_open_wrapper(), it is not needed since BZ2 functions * failed. */ @@ -259,6 +261,7 @@ if (bz_file) { retstream = _php_stream_bz2open_from_BZFILE(bz_file, mode, stream STREAMS_REL_CC TSRMLS_CC); if (retstream) { + retstream-flags |= PHP_STREAM_FLAG_FCLOSE; return retstream; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/spl spl_directory.c
Bunny will be spared..this time. :) --Jani Marcus Boerger wrote: Hello Marcus, pf, I executed the commands in the wrong window/order. Now head got MFH :-) Wednesday, July 23, 2008, 8:12:44 AM, you wrote: helly Wed Jul 23 06:12:44 2008 UTC Modified files: /php-src/ext/splspl_directory.c Log: - MFH [DOC] Add FilesystemIterator::SKIP_DOTS (flag to skip '.' and '..' in iteration) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.160r2=1.161diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.160 php-src/ext/spl/spl_directory.c:1.161 --- php-src/ext/spl/spl_directory.c:1.160 Sat Jul 19 11:20:04 2008 +++ php-src/ext/spl/spl_directory.c Wed Jul 23 06:12:44 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_directory.c,v 1.160 2008/07/19 11:20:04 colder Exp $ */ +/* $Id: spl_directory.c,v 1.161 2008/07/23 06:12:44 helly Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -1848,7 +1848,7 @@ static const zend_function_entry spl_FilesystemIterator_functions[] = { SPL_ME(FilesystemIterator, __construct, arginfo_r_dir___construct, ZEND_ACC_PUBLIC) SPL_ME(FilesystemIterator, rewind,NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, next, NULL, ZEND_ACC_PUBLIC) + SPL_ME(DirectoryIterator, next, NULL, ZEND_ACC_PUBLIC) SPL_ME(FilesystemIterator, key, NULL, ZEND_ACC_PUBLIC) SPL_ME(FilesystemIterator, current, NULL, ZEND_ACC_PUBLIC) SPL_ME(FilesystemIterator, getFlags, NULL, ZEND_ACC_PUBLIC) @@ -2769,6 +2769,7 @@ REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, KEY_AS_PATHNAME, SPL_FILE_DIR_KEY_AS_PATHNAME); REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, KEY_AS_FILENAME, SPL_FILE_DIR_KEY_AS_FILENAME); REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, NEW_CURRENT_AND_KEY, SPL_FILE_DIR_KEY_AS_FILENAME|SPL_FILE_DIR_CURRENT_AS_FILEINFO); + REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, SKIP_DOTS, SPL_FILE_DIR_SKIPDOTS); spl_ce_FilesystemIterator-get_iterator = spl_filesystem_tree_get_iterator; Best regards, Marcus -- 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/pgsql/tests 27large_object_oid.phpt 28large_object_import_oid.phpt
hholzgraWed Jul 23 09:06:59 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/pgsql/tests28large_object_import_oid.phpt Modified files: /php-src/ext/pgsql/tests27large_object_oid.phpt Log: splitted test cases for lo_create and lo_import, added version aware SKIP tests http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/tests/27large_object_oid.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/pgsql/tests/27large_object_oid.phpt diff -u php-src/ext/pgsql/tests/27large_object_oid.phpt:1.1.2.1 php-src/ext/pgsql/tests/27large_object_oid.phpt:1.1.2.2 --- php-src/ext/pgsql/tests/27large_object_oid.phpt:1.1.2.1 Wed Jul 23 00:17:19 2008 +++ php-src/ext/pgsql/tests/27large_object_oid.phpt Wed Jul 23 09:06:59 2008 @@ -1,7 +1,12 @@ --TEST-- -PostgreSQL large object with given oid +PostgreSQL create large object with given oid --SKIPIF-- -?php include(skipif.inc); ? +?php +include(skipif.inc); +$v = pg_version($conn); +if (version_compare(8.3, $v[client]) 0) die(skip - requires pg client = 8.3\n); +if (version_compare(8.3, $v[server]) 0) die(skip - requires pg server = 8.3\n); +? --FILE-- ?php @@ -33,38 +38,10 @@ pg_lo_unlink ($oid); pg_exec (commit); -echo import LO from int\n; -pg_exec($db, 'begin'); -$oid = pg_lo_import($db, __FILE__, 21003); -if (!$oid) echo (pg_lo_import() error\n); -if ($oid != 21003) echo (pg_lo_import() wrong id\n); -pg_lo_unlink ($db, $oid); -pg_exec($db, 'commit'); - -echo import LO from string\n; -pg_exec($db, 'begin'); -$oid = pg_lo_import($db, __FILE__, 21004); -if (!$oid) echo (pg_lo_import() error\n); -if ($oid != 21004) echo (pg_lo_import() wrong id\n); -pg_lo_unlink ($db, $oid); -pg_exec($db, 'commit'); - -echo import LO using default connection\n; -pg_exec('begin'); -$oid = pg_lo_import($db, __FILE__, 21005); -if (!$oid) echo (pg_lo_import() error\n); -if ($oid != 21005) echo (pg_lo_import() wrong id\n); -pg_lo_unlink ($oid); -pg_exec('commit'); - - echo OK; ? --EXPECT-- create LO from int create LO from string create LO using default connection -import LO from int -import LO from string -import LO using default connection OK http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/tests/28large_object_import_oid.phpt?view=markuprev=1.1 Index: php-src/ext/pgsql/tests/28large_object_import_oid.phpt +++ php-src/ext/pgsql/tests/28large_object_import_oid.phpt -- 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) /ext/standard/tests/network gethostbynamel_error.phpt
I remember seeing some bug report about this..did you close it? :) In the future, if there is some bug report the commit either fixes or relates to, use the bug number in the commit message. Like '- Fixed bug #12345..' or - Did this and that, related to bug #12345. --Jani Arnaud Le Blanc wrote: lbarnaudWed Jul 23 08:27:17 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/network gethostbynamel_error.phpt Log: MFH: Fix test: use canonical name to avoid problems with domain search path http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/gethostbynamel_error.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/network/gethostbynamel_error.phpt diff -u php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.1.4.2 php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.1.4.3 --- php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.1.4.2 Wed Mar 26 18:19:31 2008 +++ php-src/ext/standard/tests/network/gethostbynamel_error.phptWed Jul 23 08:27:17 2008 @@ -21,7 +21,7 @@ var_dump( gethostbynamel($hostname, $extra_arg) ); echo \n-- Testing gethostbynamel() with an unknown host --\n; -$hostname = 'unknownhost_zzz_xxx_yyy'; +$hostname = 'unknownhost_zzz_xxx_yyy.'; var_dump( gethostbynamel($hostname) ); echo Done; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/zip zip_stream.c
tony2001Wed Jul 23 09:09:02 2008 UTC Modified files: /php-src/ext/zipzip_stream.c Log: add PHP_STREAM_FLAG_FCLOSE to zip streams http://cvs.php.net/viewvc.cgi/php-src/ext/zip/zip_stream.c?r1=1.6r2=1.7diff_format=u Index: php-src/ext/zip/zip_stream.c diff -u php-src/ext/zip/zip_stream.c:1.6 php-src/ext/zip/zip_stream.c:1.7 --- php-src/ext/zip/zip_stream.c:1.6Wed Mar 14 11:22:13 2007 +++ php-src/ext/zip/zip_stream.cWed Jul 23 09:09:02 2008 @@ -1,4 +1,4 @@ -/* $Id: zip_stream.c,v 1.6 2007/03/14 11:22:13 pajoye Exp $ */ +/* $Id: zip_stream.c,v 1.7 2008/07/23 09:09:02 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H # include config.h #endif @@ -140,6 +140,7 @@ if (!stream) { return NULL; } else { + stream-flags |= PHP_STREAM_FLAG_FCLOSE; return stream; } -- 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 zip_stream.c
tony2001Wed Jul 23 09:09:10 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/zipzip_stream.c Log: MFH: add PHP_STREAM_FLAG_FCLOSE to zip streams http://cvs.php.net/viewvc.cgi/php-src/ext/zip/zip_stream.c?r1=1.1.2.5r2=1.1.2.5.2.1diff_format=u Index: php-src/ext/zip/zip_stream.c diff -u php-src/ext/zip/zip_stream.c:1.1.2.5 php-src/ext/zip/zip_stream.c:1.1.2.5.2.1 --- php-src/ext/zip/zip_stream.c:1.1.2.5Wed Mar 14 11:08:57 2007 +++ php-src/ext/zip/zip_stream.cWed Jul 23 09:09:10 2008 @@ -1,4 +1,4 @@ -/* $Id: zip_stream.c,v 1.1.2.5 2007/03/14 11:08:57 pajoye Exp $ */ +/* $Id: zip_stream.c,v 1.1.2.5.2.1 2008/07/23 09:09:10 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H # include config.h #endif @@ -140,6 +140,7 @@ if (!stream) { return NULL; } else { + stream-flags |= PHP_STREAM_FLAG_FCLOSE; return stream; } -- 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 zip_stream.c
tony2001Wed Jul 23 09:09:20 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/zipzip_stream.c Log: MFH: add PHP_STREAM_FLAG_FCLOSE to zip streams http://cvs.php.net/viewvc.cgi/php-src/ext/zip/zip_stream.c?r1=1.1.2.5r2=1.1.2.6diff_format=u Index: php-src/ext/zip/zip_stream.c diff -u php-src/ext/zip/zip_stream.c:1.1.2.5 php-src/ext/zip/zip_stream.c:1.1.2.6 --- php-src/ext/zip/zip_stream.c:1.1.2.5Wed Mar 14 11:08:57 2007 +++ php-src/ext/zip/zip_stream.cWed Jul 23 09:09:20 2008 @@ -1,4 +1,4 @@ -/* $Id: zip_stream.c,v 1.1.2.5 2007/03/14 11:08:57 pajoye Exp $ */ +/* $Id: zip_stream.c,v 1.1.2.6 2008/07/23 09:09:20 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H # include config.h #endif @@ -140,6 +140,7 @@ if (!stream) { return NULL; } else { + stream-flags |= PHP_STREAM_FLAG_FCLOSE; return stream; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/soap/tests typemap001.phpt typemap003.phpt typemap005.phpt typemap007.phpt
lbarnaudWed Jul 23 09:12:50 2008 UTC Modified files: /php-src/ext/soap/tests typemap001.phpt typemap003.phpt typemap005.phpt typemap007.phpt Log: Fix tests: need simplexml http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/typemap001.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/soap/tests/typemap001.phpt diff -u php-src/ext/soap/tests/typemap001.phpt:1.3 php-src/ext/soap/tests/typemap001.phpt:1.4 --- php-src/ext/soap/tests/typemap001.phpt:1.3 Wed Jan 9 16:46:05 2008 +++ php-src/ext/soap/tests/typemap001.phpt Wed Jul 23 09:12:50 2008 @@ -2,6 +2,7 @@ SOAP typemap 1: SoapServer support for typemap's from_xml() --SKIPIF-- ?php require_once('skipif.inc'); ? +?php if (!extension_loaded('simplexml')) die(skip simplexml extension not available); ? --INI-- soap.wsdl_cache_enabled=0 --FILE-- http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/typemap003.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/soap/tests/typemap003.phpt diff -u php-src/ext/soap/tests/typemap003.phpt:1.5 php-src/ext/soap/tests/typemap003.phpt:1.6 --- php-src/ext/soap/tests/typemap003.phpt:1.5 Tue Jul 22 01:46:43 2008 +++ php-src/ext/soap/tests/typemap003.phpt Wed Jul 23 09:12:50 2008 @@ -2,6 +2,7 @@ SOAP Typemap 3: SoapClient support for typemap's from_xml() --SKIPIF-- ?php require_once('skipif.inc'); ? +?php if (!extension_loaded('simplexml')) die(skip simplexml extension not available); ? --INI-- soap.wsdl_cache_enabled=0 --FILE-- http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/typemap005.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/soap/tests/typemap005.phpt diff -u php-src/ext/soap/tests/typemap005.phpt:1.3 php-src/ext/soap/tests/typemap005.phpt:1.4 --- php-src/ext/soap/tests/typemap005.phpt:1.3 Wed Jan 9 16:46:05 2008 +++ php-src/ext/soap/tests/typemap005.phpt Wed Jul 23 09:12:50 2008 @@ -2,6 +2,7 @@ SOAP typemap 5: SoapServer support for typemap's from_xml() (without WSDL) --SKIPIF-- ?php require_once('skipif.inc'); ? +?php if (!extension_loaded('simplexml')) die(skip simplexml extension not available); ? --INI-- soap.wsdl_cache_enabled=0 --FILE-- http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/typemap007.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/soap/tests/typemap007.phpt diff -u php-src/ext/soap/tests/typemap007.phpt:1.5 php-src/ext/soap/tests/typemap007.phpt:1.6 --- php-src/ext/soap/tests/typemap007.phpt:1.5 Tue Jul 22 01:46:43 2008 +++ php-src/ext/soap/tests/typemap007.phpt Wed Jul 23 09:12:50 2008 @@ -2,6 +2,7 @@ SOAP Typemap 7: SoapClient support for typemap's from_xml() (without WSDL) --SKIPIF-- ?php require_once('skipif.inc'); ? +?php if (!extension_loaded('simplexml')) die(skip simplexml extension not available); ? --INI-- soap.wsdl_cache_enabled=0 --FILE-- -- 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) /ext/zip zip_stream.c
Wouldn't it have been easier to make that flag reverse. ie. PHP_STREAM_FLAG_FCLOSE_NOT_ALLOWED ? And apply it to those that really should not be closeable by fclose().. :) --Jani Antony Dovgal wrote: tony2001Wed Jul 23 09:09:10 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/zip zip_stream.c Log: MFH: add PHP_STREAM_FLAG_FCLOSE to zip streams http://cvs.php.net/viewvc.cgi/php-src/ext/zip/zip_stream.c?r1=1.1.2.5r2=1.1.2.5.2.1diff_format=u Index: php-src/ext/zip/zip_stream.c diff -u php-src/ext/zip/zip_stream.c:1.1.2.5 php-src/ext/zip/zip_stream.c:1.1.2.5.2.1 --- php-src/ext/zip/zip_stream.c:1.1.2.5Wed Mar 14 11:08:57 2007 +++ php-src/ext/zip/zip_stream.cWed Jul 23 09:09:10 2008 @@ -1,4 +1,4 @@ -/* $Id: zip_stream.c,v 1.1.2.5 2007/03/14 11:08:57 pajoye Exp $ */ +/* $Id: zip_stream.c,v 1.1.2.5.2.1 2008/07/23 09:09:10 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H # include config.h #endif @@ -140,6 +140,7 @@ if (!stream) { return NULL; } else { + stream-flags |= PHP_STREAM_FLAG_FCLOSE; return stream; } -- 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/soap/tests typemap001.phpt typemap003.phpt typemap005.phpt typemap007.phpt
lbarnaudWed Jul 23 09:25:06 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/soap/tests typemap001.phpt typemap003.phpt typemap005.phpt typemap007.phpt Log: MFH: Fix tests: need simplexml http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/typemap001.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u Index: php-src/ext/soap/tests/typemap001.phpt diff -u php-src/ext/soap/tests/typemap001.phpt:1.1.2.2.2.1 php-src/ext/soap/tests/typemap001.phpt:1.1.2.2.2.2 --- php-src/ext/soap/tests/typemap001.phpt:1.1.2.2.2.1 Wed Jan 9 16:45:47 2008 +++ php-src/ext/soap/tests/typemap001.phpt Wed Jul 23 09:25:06 2008 @@ -2,6 +2,7 @@ SOAP typemap 1: SoapServer support for typemap's from_xml() --SKIPIF-- ?php require_once('skipif.inc'); ? +?php if (!extension_loaded('simplexml')) die(skip simplexml extension not available); ? --INI-- soap.wsdl_cache_enabled=0 --FILE-- http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/typemap003.phpt?r1=1.1.2.1.2.2r2=1.1.2.1.2.3diff_format=u Index: php-src/ext/soap/tests/typemap003.phpt diff -u php-src/ext/soap/tests/typemap003.phpt:1.1.2.1.2.2 php-src/ext/soap/tests/typemap003.phpt:1.1.2.1.2.3 --- php-src/ext/soap/tests/typemap003.phpt:1.1.2.1.2.2 Tue Jul 22 01:47:21 2008 +++ php-src/ext/soap/tests/typemap003.phpt Wed Jul 23 09:25:06 2008 @@ -2,6 +2,7 @@ SOAP Typemap 3: SoapClient support for typemap's from_xml() --SKIPIF-- ?php require_once('skipif.inc'); ? +?php if (!extension_loaded('simplexml')) die(skip simplexml extension not available); ? --INI-- soap.wsdl_cache_enabled=0 --FILE-- http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/typemap005.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u Index: php-src/ext/soap/tests/typemap005.phpt diff -u php-src/ext/soap/tests/typemap005.phpt:1.1.2.2.2.1 php-src/ext/soap/tests/typemap005.phpt:1.1.2.2.2.2 --- php-src/ext/soap/tests/typemap005.phpt:1.1.2.2.2.1 Wed Jan 9 16:45:47 2008 +++ php-src/ext/soap/tests/typemap005.phpt Wed Jul 23 09:25:06 2008 @@ -2,6 +2,7 @@ SOAP typemap 5: SoapServer support for typemap's from_xml() (without WSDL) --SKIPIF-- ?php require_once('skipif.inc'); ? +?php if (!extension_loaded('simplexml')) die(skip simplexml extension not available); ? --INI-- soap.wsdl_cache_enabled=0 --FILE-- http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/typemap007.phpt?r1=1.1.2.1.2.2r2=1.1.2.1.2.3diff_format=u Index: php-src/ext/soap/tests/typemap007.phpt diff -u php-src/ext/soap/tests/typemap007.phpt:1.1.2.1.2.2 php-src/ext/soap/tests/typemap007.phpt:1.1.2.1.2.3 --- php-src/ext/soap/tests/typemap007.phpt:1.1.2.1.2.2 Tue Jul 22 01:47:21 2008 +++ php-src/ext/soap/tests/typemap007.phpt Wed Jul 23 09:25:06 2008 @@ -2,6 +2,7 @@ SOAP Typemap 7: SoapClient support for typemap's from_xml() (without WSDL) --SKIPIF-- ?php require_once('skipif.inc'); ? +?php if (!extension_loaded('simplexml')) die(skip simplexml extension not available); ? --INI-- soap.wsdl_cache_enabled=0 --FILE-- -- 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) /ext/zip zip_stream.c
On 23.07.2008 13:19, Jani Taskinen wrote: Wouldn't it have been easier to make that flag reverse. ie. PHP_STREAM_FLAG_FCLOSE_NOT_ALLOWED ? And apply it to those that really should not be closeable by fclose().. :) Maybe. -- 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/pgsql config.m4 pgsql.c /ext/pgsql/tests 27large_object_oid.phpt 28large_object_import_oid.phpt
hholzgraWed Jul 23 09:27:01 2008 UTC Modified files: /php-src/ext/pgsql config.m4 pgsql.c /php-src/ext/pgsql/tests27large_object_oid.phpt 28large_object_import_oid.phpt Log: MFB + Unicode: added support for object ids in pg_lo_create() and pg_lo_import() where available (based on code provided by Tatsuo Ishii) http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/config.m4?r1=1.52r2=1.53diff_format=u Index: php-src/ext/pgsql/config.m4 diff -u php-src/ext/pgsql/config.m4:1.52 php-src/ext/pgsql/config.m4:1.53 --- php-src/ext/pgsql/config.m4:1.52Wed Jul 11 21:51:10 2007 +++ php-src/ext/pgsql/config.m4 Wed Jul 23 09:27:01 2008 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.52 2007/07/11 21:51:10 jani Exp $ +dnl $Id: config.m4,v 1.53 2008/07/23 09:27:01 hholzgra Exp $ dnl PHP_ARG_WITH(pgsql,for PostgreSQL support, @@ -92,6 +92,8 @@ AC_CHECK_LIB(pq, PQescapeStringConn, AC_DEFINE(HAVE_PQESCAPE_CONN,1,[PostgreSQL 8.1.4 or later])) AC_CHECK_LIB(pq, PQescapeByteaConn, AC_DEFINE(HAVE_PQESCAPE_BYTEA_CONN,1,[PostgreSQL 8.1.4 or later])) AC_CHECK_LIB(pq, pg_encoding_to_char,AC_DEFINE(HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT,1,[Whether libpq is compiled with --enable-multibyte])) + AC_CHECK_LIB(pq, lo_create, AC_DEFINE(HAVE_PG_LO_CREATE,1,[PostgreSQL 8.1 or later])) + AC_CHECK_LIB(pq, lo_import_with_oid, AC_DEFINE(HAVE_PG_LO_IMPORT_WITH_OID,1,[PostgreSQL 8.4 or later])) LIBS=$old_LIBS LDFLAGS=$old_LDFLAGS http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.381r2=1.382diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.381 php-src/ext/pgsql/pgsql.c:1.382 --- php-src/ext/pgsql/pgsql.c:1.381 Wed Jul 2 00:13:26 2008 +++ php-src/ext/pgsql/pgsql.c Wed Jul 23 09:27:01 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.381 2008/07/02 00:13:26 felipe Exp $ */ +/* $Id: pgsql.c,v 1.382 2008/07/23 09:27:01 hholzgra Exp $ */ #include stdlib.h @@ -350,6 +350,7 @@ static ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_lo_create, 0, 0, 0) ZEND_ARG_INFO(0, connection) + ZEND_ARG_INFO(0, large_object_id) ZEND_END_ARG_INFO() static @@ -392,6 +393,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_lo_import, 0, 0, 0) ZEND_ARG_INFO(0, connection) ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, large_object_oid) ZEND_END_ARG_INFO() static @@ -2978,42 +2980,86 @@ } /* }}} */ -/* {{{ proto int pg_lo_create([resource connection]) +/* {{{ proto mixed pg_lo_create([resource connection],[mixed large_object_oid]) Create a large object */ PHP_FUNCTION(pg_lo_create) { - zval *pgsql_link = NULL; - PGconn *pgsql; - Oid pgsql_oid; - int id = -1, argc = ZEND_NUM_ARGS(); + zval *pgsql_link = NULL, *oid = NULL; + PGconn *pgsql; + Oid pgsql_oid, wanted_oid = InvalidOid; + int id = -1, argc = ZEND_NUM_ARGS(); - if (zend_parse_parameters(argc TSRMLS_CC, |r, pgsql_link) == FAILURE) { + if (zend_parse_parameters(argc TSRMLS_CC, |zz, pgsql_link, oid) == FAILURE) { return; } + + if ((argc == 1) (Z_TYPE_P(pgsql_link) != IS_RESOURCE)) { + oid = pgsql_link; + pgsql_link = NULL; + } - if (argc == 0) { + if (pgsql_link == NULL) { id = PGG(default_link); CHECK_DEFAULT_LINK(id); + if (id == -1) { + RETURN_FALSE; + } } - if (pgsql_link == NULL id == -1) { - RETURN_FALSE; - } - ZEND_FETCH_RESOURCE2(pgsql, PGconn *, pgsql_link, id, PostgreSQL link, le_link, le_plink); - /* NOTE: Archive modes not supported until I get some more data. Don't think anybody's - using it anyway. I believe it's also somehow related to the 'time travel' feature of - PostgreSQL, that's on the list of features to be removed... Create modes not supported. - What's the use of an object that can be only written to, but not read from, and vice - versa? Beats me... And the access type (r/w) must be specified again when opening - the object, probably (?) overrides this. (Jouni) - */ + if (oid) { +#ifndef HAVE_PG_LO_CREATE + php_error_docref(NULL TSRMLS_CC, E_NOTICE, OID value passing not supported); +#else + switch (Z_TYPE_P(oid)) { + case IS_STRING: + { + char *end_ptr; + wanted_oid = (Oid)strtoul(Z_STRVAL_P(oid), end_ptr, 10); + if ((Z_STRVAL_P(oid)+Z_STRLEN_P(oid)) != end_ptr) { + /* wrong integer format */ + php_error_docref(NULL
[PHP-CVS] cvs: php-src /ext/standard/tests/strings sprintf_variation23.phpt
tony2001Wed Jul 23 09:29:09 2008 UTC Modified files: /php-src/ext/standard/tests/strings sprintf_variation23.phpt Log: sync test with other branches http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation23.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation23.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation23.phpt:1.4 php-src/ext/standard/tests/strings/sprintf_variation23.phpt:1.5 --- php-src/ext/standard/tests/strings/sprintf_variation23.phpt:1.4 Tue Jul 22 14:06:17 2008 +++ php-src/ext/standard/tests/strings/sprintf_variation23.phpt Wed Jul 23 09:29:09 2008 @@ -39,11 +39,11 @@ // closing the resources fclose($fp); -closedir($dfp); +fclose($dfp); echo Done; ? ---EXPECT-- +--EXPECTF-- *** Testing sprintf() : char formats with resource values *** -- Iteration 1 -- @@ -75,4 +75,6 @@ unicode(1) unicode(11) [EMAIL PROTECTED]] unicode(1) c + +Warning: fclose(): %d is not a valid stream resource 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_3) /ext/standard/tests/strings sprintf_variation23.phpt
tony2001Wed Jul 23 09:29:21 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings sprintf_variation23.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation23.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation23.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation23.phpt:1.2.2.2 php-src/ext/standard/tests/strings/sprintf_variation23.phpt:1.2.2.3 --- php-src/ext/standard/tests/strings/sprintf_variation23.phpt:1.2.2.2 Sat Sep 29 16:54:57 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation23.phpt Wed Jul 23 09:29:21 2008 @@ -75,4 +75,6 @@ string(1) string(11) [EMAIL PROTECTED]] string(1) c -Done \ No newline at end of file + +Warning: fclose(): %d is not a valid stream resource 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) /ext/standard/tests/strings sprintf_variation23.phpt
tony2001Wed Jul 23 09:29:32 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings sprintf_variation23.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation23.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation23.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation23.phpt:1.1.2.1 php-src/ext/standard/tests/strings/sprintf_variation23.phpt:1.1.2.2 --- php-src/ext/standard/tests/strings/sprintf_variation23.phpt:1.1.2.1 Sat Sep 29 14:13:53 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation23.phpt Wed Jul 23 09:29:32 2008 @@ -75,4 +75,6 @@ string(1) string(11) [EMAIL PROTECTED]] string(1) c -Done \ No newline at end of file + +Warning: fclose(): %d is not a valid stream resource in %s on line %d +Done -- 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) /ext/standard/tests/network gethostbynamel_error.phpt
On Wednesday 23 July 2008 11:07:39 Jani Taskinen wrote: I remember seeing some bug report about this..did you close it? :) Yes, it is closed :) That was #45493 (I reported it). In the future, if there is some bug report the commit either fixes or relates to, use the bug number in the commit message. Like '- Fixed bug #12345..' or - Did this and that, related to bug #12345. Sorry, I will do the next time. --Jani Arnaud Le Blanc wrote: lbarnaudWed Jul 23 08:27:17 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/network gethostbynamel_error.phpt Log: MFH: Fix test: use canonical name to avoid problems with domain search path http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/gethostbynamel_error.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/network/gethostbynamel_error.phpt diff -u php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.1.4.2 php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.1.4.3 --- php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.1.4.2 Wed Mar 26 18:19:31 2008 +++ php-src/ext/standard/tests/network/gethostbynamel_error.phptWed Jul 23 08:27:17 2008 @@ -21,7 +21,7 @@ var_dump( gethostbynamel($hostname, $extra_arg) ); echo \n-- Testing gethostbynamel() with an unknown host --\n; -$hostname = 'unknownhost_zzz_xxx_yyy'; +$hostname = 'unknownhost_zzz_xxx_yyy.'; var_dump( gethostbynamel($hostname) ); echo Done; -- 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 bug45529.phpt
tony2001Wed Jul 23 09:49:11 2008 UTC Modified files: /php-src/ext/date/tests bug45529.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug45529.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/date/tests/bug45529.phpt diff -u php-src/ext/date/tests/bug45529.phpt:1.3 php-src/ext/date/tests/bug45529.phpt:1.4 --- php-src/ext/date/tests/bug45529.phpt:1.3Mon Jul 21 07:27:16 2008 +++ php-src/ext/date/tests/bug45529.phptWed Jul 23 09:49:11 2008 @@ -1,7 +1,7 @@ --TEST-- Bug #45529 (UTC not properly recognised as timezone identifier while parsing) --INI-- -date.default_timezone=Europe/Oslo +date.timezone=Europe/Oslo --FILE-- ?php $tz1 = new DateTimeZone('UTC'); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo_mysql/tests bug_39858.phpt bug_41125.phpt bug_42499.phpt bug_43371.phpt bug_44454.phpt bug_44707.phpt bug_45120.phpt bug_pecl_7976.phpt pdo_mysql_prepare_match_against.
tony2001Wed Jul 23 10:22:58 2008 UTC Modified files: /php-src/ext/pdo_mysql/testsbug_39858.phpt bug_41125.phpt bug_42499.phpt bug_43371.phpt bug_44454.phpt bug_44707.phpt bug_45120.phpt bug_pecl_7976.phpt pdo_mysql_prepare_match_against.phpt Log: fix tests names http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_39858.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/pdo_mysql/tests/bug_39858.phpt diff -u php-src/ext/pdo_mysql/tests/bug_39858.phpt:1.1 php-src/ext/pdo_mysql/tests/bug_39858.phpt:1.2 --- php-src/ext/pdo_mysql/tests/bug_39858.phpt:1.1 Mon Jul 21 13:05:51 2008 +++ php-src/ext/pdo_mysql/tests/bug_39858.phpt Wed Jul 23 10:22:58 2008 @@ -1,5 +1,5 @@ --TEST-- -Bug #39858 (http://bugs.php.net/bug.php?id=39858) +Bug #39858 (Lost connection to MySQL server during query by a repeated call stored proced) --SKIPIF-- ?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); @@ -93,4 +93,4 @@ string(1) 4 } } -done! \ No newline at end of file +done! http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_41125.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/pdo_mysql/tests/bug_41125.phpt diff -u php-src/ext/pdo_mysql/tests/bug_41125.phpt:1.1 php-src/ext/pdo_mysql/tests/bug_41125.phpt:1.2 --- php-src/ext/pdo_mysql/tests/bug_41125.phpt:1.1 Mon Jul 21 13:05:51 2008 +++ php-src/ext/pdo_mysql/tests/bug_41125.phpt Wed Jul 23 10:22:58 2008 @@ -1,5 +1,5 @@ --TEST-- -Bug #41125 (http://bugs.php.net/bug.php?id=41125) +Bug #41125 (PDO mysql + quote() + prepare() can result in segfault) --SKIPIF-- ?php require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); @@ -41,4 +41,4 @@ Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d array(0) { } -done! \ No newline at end of file +done! http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_42499.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/pdo_mysql/tests/bug_42499.phpt diff -u php-src/ext/pdo_mysql/tests/bug_42499.phpt:1.2 php-src/ext/pdo_mysql/tests/bug_42499.phpt:1.3 --- php-src/ext/pdo_mysql/tests/bug_42499.phpt:1.2 Tue Jul 22 18:33:28 2008 +++ php-src/ext/pdo_mysql/tests/bug_42499.phpt Wed Jul 23 10:22:58 2008 @@ -1,5 +1,5 @@ --TEST-- -PDO MySQL Bug #42499 (http://bugs.php.net/bug.php?id=42499) +Bug #42499 (Multi-statement execution via PDO::exec() makes connection unusable) --SKIPIF-- ?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); @@ -77,4 +77,4 @@ } Warning: PDO::exec(): SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in %s on line %d -done! \ No newline at end of file +done! http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_43371.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/pdo_mysql/tests/bug_43371.phpt diff -u php-src/ext/pdo_mysql/tests/bug_43371.phpt:1.1 php-src/ext/pdo_mysql/tests/bug_43371.phpt:1.2 --- php-src/ext/pdo_mysql/tests/bug_43371.phpt:1.1 Mon Jul 21 13:05:51 2008 +++ php-src/ext/pdo_mysql/tests/bug_43371.phpt Wed Jul 23 10:22:58 2008 @@ -1,5 +1,5 @@ --TEST-- -Bug #43371 (http://bugs.php.net/bug.php?id=43371) +Bug #43371 (Memory errors in PDO constructor) --SKIPIF-- ?php ?php @@ -17,4 +17,4 @@ print done!; ? --EXPECT-- -done! \ No newline at end of file +done! http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_44454.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/pdo_mysql/tests/bug_44454.phpt diff -u php-src/ext/pdo_mysql/tests/bug_44454.phpt:1.1 php-src/ext/pdo_mysql/tests/bug_44454.phpt:1.2 --- php-src/ext/pdo_mysql/tests/bug_44454.phpt:1.1 Mon Jul 21 13:05:51 2008 +++ php-src/ext/pdo_mysql/tests/bug_44454.phpt Wed Jul 23 10:22:58 2008 @@ -1,5 +1,5 @@ --TEST-- -Bug #44454 (http://bugs.php.net/bug.php?id=44454) +Bug #44454 (Unexpected exception thrown in foreach() statement) --SKIPIF-- ?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); @@ -101,4 +101,4 @@ 1 = 1062, 2 = 'Duplicate entry \'1-1\' for key 1', ) -done! \ No newline at end of file +done! http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_44707.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/pdo_mysql/tests/bug_44707.phpt diff -u php-src/ext/pdo_mysql/tests/bug_44707.phpt:1.1 php-src/ext/pdo_mysql/tests/bug_44707.phpt:1.2 --- php-src/ext/pdo_mysql/tests/bug_44707.phpt:1.1 Mon Jul 21 13:05:51 2008 +++ php-src/ext/pdo_mysql/tests/bug_44707.phpt Wed Jul 23 10:22:58 2008 @@ -1,5 +1,5 @@
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo_mysql/tests bug_39858.phpt bug_41125.phpt bug_42499.phpt bug_43371.phpt bug_44454.phpt bug_44707.phpt bug_45120.phpt bug_pecl_7976.phpt pdo_mysql_prepare_match
tony2001Wed Jul 23 10:23:08 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pdo_mysql/testsbug_39858.phpt bug_41125.phpt bug_42499.phpt bug_43371.phpt bug_44454.phpt bug_44707.phpt bug_45120.phpt bug_pecl_7976.phpt pdo_mysql_prepare_match_against.phpt Log: fix test names http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_39858.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/pdo_mysql/tests/bug_39858.phpt diff -u php-src/ext/pdo_mysql/tests/bug_39858.phpt:1.1.2.2 php-src/ext/pdo_mysql/tests/bug_39858.phpt:1.1.2.3 --- php-src/ext/pdo_mysql/tests/bug_39858.phpt:1.1.2.2 Mon Jul 21 13:09:27 2008 +++ php-src/ext/pdo_mysql/tests/bug_39858.phpt Wed Jul 23 10:23:08 2008 @@ -1,5 +1,5 @@ --TEST-- -Bug #39858 (http://bugs.php.net/bug.php?id=39858) +Bug #39858 (Lost connection to MySQL server during query by a repeated call stored proced) --SKIPIF-- ?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); @@ -93,4 +93,4 @@ string(1) 4 } } -done! \ No newline at end of file +done! http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_41125.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/pdo_mysql/tests/bug_41125.phpt diff -u php-src/ext/pdo_mysql/tests/bug_41125.phpt:1.1.2.2 php-src/ext/pdo_mysql/tests/bug_41125.phpt:1.1.2.3 --- php-src/ext/pdo_mysql/tests/bug_41125.phpt:1.1.2.2 Mon Jul 21 13:09:27 2008 +++ php-src/ext/pdo_mysql/tests/bug_41125.phpt Wed Jul 23 10:23:08 2008 @@ -1,5 +1,5 @@ --TEST-- -Bug #41125 (http://bugs.php.net/bug.php?id=41125) +Bug #41125 (PDO mysql + quote() + prepare() can result in segfault) --SKIPIF-- ?php require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); @@ -41,4 +41,4 @@ Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d array(0) { } -done! \ No newline at end of file +done! http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_42499.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/pdo_mysql/tests/bug_42499.phpt diff -u php-src/ext/pdo_mysql/tests/bug_42499.phpt:1.1.2.2 php-src/ext/pdo_mysql/tests/bug_42499.phpt:1.1.2.3 --- php-src/ext/pdo_mysql/tests/bug_42499.phpt:1.1.2.2 Mon Jul 21 13:09:27 2008 +++ php-src/ext/pdo_mysql/tests/bug_42499.phpt Wed Jul 23 10:23:08 2008 @@ -1,5 +1,5 @@ --TEST-- -PDO MySQL Bug #42499 (http://bugs.php.net/bug.php?id=42499) +Bug #42499 (Multi-statement execution via PDO::exec() makes connection unusable) --SKIPIF-- ?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); @@ -77,4 +77,4 @@ } Warning: PDO::exec(): SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in %s on line %d -done! \ No newline at end of file +done! http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_43371.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/pdo_mysql/tests/bug_43371.phpt diff -u php-src/ext/pdo_mysql/tests/bug_43371.phpt:1.1.2.2 php-src/ext/pdo_mysql/tests/bug_43371.phpt:1.1.2.3 --- php-src/ext/pdo_mysql/tests/bug_43371.phpt:1.1.2.2 Mon Jul 21 13:09:27 2008 +++ php-src/ext/pdo_mysql/tests/bug_43371.phpt Wed Jul 23 10:23:08 2008 @@ -1,5 +1,5 @@ --TEST-- -Bug #43371 (http://bugs.php.net/bug.php?id=43371) +Bug #43371 (Memory errors in PDO constructor) --SKIPIF-- ?php ?php @@ -17,4 +17,4 @@ print done!; ? --EXPECT-- -done! \ No newline at end of file +done! http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_44454.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/pdo_mysql/tests/bug_44454.phpt diff -u php-src/ext/pdo_mysql/tests/bug_44454.phpt:1.1.2.2 php-src/ext/pdo_mysql/tests/bug_44454.phpt:1.1.2.3 --- php-src/ext/pdo_mysql/tests/bug_44454.phpt:1.1.2.2 Mon Jul 21 13:09:27 2008 +++ php-src/ext/pdo_mysql/tests/bug_44454.phpt Wed Jul 23 10:23:08 2008 @@ -1,5 +1,5 @@ --TEST-- -Bug #44454 (http://bugs.php.net/bug.php?id=44454) +Bug #44454 (Unexpected exception thrown in foreach() statement) --SKIPIF-- ?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); @@ -101,4 +101,4 @@ 1 = 1062, 2 = 'Duplicate entry \'1-1\' for key 1', ) -done! \ No newline at end of file +done! http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_44707.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/pdo_mysql/tests/bug_44707.phpt diff -u php-src/ext/pdo_mysql/tests/bug_44707.phpt:1.1.2.2 php-src/ext/pdo_mysql/tests/bug_44707.phpt:1.1.2.3 --- php-src/ext/pdo_mysql/tests/bug_44707.phpt:1.1.2.2 Mon
[PHP-CVS] cvs: php-src /ext/standard/tests/general_functions bug44394_2.phpt
tony2001Wed Jul 23 10:26:39 2008 UTC Modified files: /php-src/ext/standard/tests/general_functions bug44394_2.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug44394_2.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/standard/tests/general_functions/bug44394_2.phpt diff -u php-src/ext/standard/tests/general_functions/bug44394_2.phpt:1.3 php-src/ext/standard/tests/general_functions/bug44394_2.phpt:1.4 --- php-src/ext/standard/tests/general_functions/bug44394_2.phpt:1.3Thu Apr 10 19:14:23 2008 +++ php-src/ext/standard/tests/general_functions/bug44394_2.phptWed Jul 23 10:26:39 2008 @@ -2,6 +2,8 @@ Bug #44394 (Last two bytes missing from output) with session.use_trans_id --SKIPIF-- ?php if (!extension_loaded(session)) print skip; ? +--INI-- +session.name=PHPSESSID --FILE-- ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/general_functions bug44394_2.phpt
tony2001Wed Jul 23 10:26:45 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/general_functions bug44394_2.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug44394_2.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/general_functions/bug44394_2.phpt diff -u php-src/ext/standard/tests/general_functions/bug44394_2.phpt:1.1.2.2 php-src/ext/standard/tests/general_functions/bug44394_2.phpt:1.1.2.3 --- php-src/ext/standard/tests/general_functions/bug44394_2.phpt:1.1.2.2 Thu Apr 10 19:13:59 2008 +++ php-src/ext/standard/tests/general_functions/bug44394_2.phptWed Jul 23 10:26:45 2008 @@ -2,6 +2,8 @@ Bug #44394 (Last two bytes missing from output) with session.use_trans_id --SKIPIF-- ?php if (!extension_loaded(session)) print skip; ? +--INI-- +session.name=PHPSESSID --FILE-- ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/general_functions bug44394_2.phpt
tony2001Wed Jul 23 10:26:55 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/general_functions bug44394_2.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug44394_2.phpt?r1=1.2.2.3r2=1.2.2.4diff_format=u Index: php-src/ext/standard/tests/general_functions/bug44394_2.phpt diff -u php-src/ext/standard/tests/general_functions/bug44394_2.phpt:1.2.2.3 php-src/ext/standard/tests/general_functions/bug44394_2.phpt:1.2.2.4 --- php-src/ext/standard/tests/general_functions/bug44394_2.phpt:1.2.2.3 Thu Apr 10 19:16:00 2008 +++ php-src/ext/standard/tests/general_functions/bug44394_2.phptWed Jul 23 10:26:55 2008 @@ -2,6 +2,8 @@ Bug #44394 (Last two bytes missing from output) with session.use_trans_id --SKIPIF-- ?php if (!extension_loaded(session)) print skip; ? +--INI-- +session.name=PHPSESSID --FILE-- ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/sockets/tests unixloop.phpt
janiWed Jul 23 10:30:41 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/sockets/tests unixloop.phpt Log: MFH: missing test http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/tests/unixloop.phpt?view=markuprev=1.1 Index: php-src/ext/sockets/tests/unixloop.phpt +++ php-src/ext/sockets/tests/unixloop.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/zip zip_stream.c
Em Qua, 2008-07-23 às 09:09 +, Antony Dovgal escreveu: tony2001 Wed Jul 23 09:09:02 2008 UTC Modified files: /php-src/ext/zip zip_stream.c Log: add PHP_STREAM_FLAG_FCLOSE to zip streams Thanks Tony! http://cvs.php.net/viewvc.cgi/php-src/ext/zip/zip_stream.c?r1=1.6r2=1.7diff_format=u Index: php-src/ext/zip/zip_stream.c diff -u php-src/ext/zip/zip_stream.c:1.6 php-src/ext/zip/zip_stream.c:1.7 --- php-src/ext/zip/zip_stream.c:1.6 Wed Mar 14 11:22:13 2007 +++ php-src/ext/zip/zip_stream.c Wed Jul 23 09:09:02 2008 @@ -1,4 +1,4 @@ -/* $Id: zip_stream.c,v 1.6 2007/03/14 11:22:13 pajoye Exp $ */ +/* $Id: zip_stream.c,v 1.7 2008/07/23 09:09:02 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H # include config.h #endif @@ -140,6 +140,7 @@ if (!stream) { return NULL; } else { + stream-flags |= PHP_STREAM_FLAG_FCLOSE; return stream; } -- 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_2) /ext/bz2 bz2.c /ext/standard dir.c file.c fsock.c proc_open.c streamsfuncs.c /ext/zip zip_stream.c /main php_streams.h /sapi/cli php_cli.c
tony2001Wed Jul 23 11:25:51 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/bz2bz2.c /php-src/ext/standard dir.c file.c fsock.c proc_open.c streamsfuncs.c /php-src/ext/zipzip_stream.c /php-src/main php_streams.h /php-src/sapi/cli php_cli.c Log: MFH: invert the logics - FLAG_FCLOSE - FLAG_NO_FCLOSE http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.14.2.3.2.14r2=1.14.2.3.2.15diff_format=u Index: php-src/ext/bz2/bz2.c diff -u php-src/ext/bz2/bz2.c:1.14.2.3.2.14 php-src/ext/bz2/bz2.c:1.14.2.3.2.15 --- php-src/ext/bz2/bz2.c:1.14.2.3.2.14 Wed Jul 23 08:56:37 2008 +++ php-src/ext/bz2/bz2.c Wed Jul 23 11:25:50 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: bz2.c,v 1.14.2.3.2.14 2008/07/23 08:56:37 tony2001 Exp $ */ +/* $Id: bz2.c,v 1.14.2.3.2.15 2008/07/23 11:25:50 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -247,7 +247,6 @@ if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void **) fd, REPORT_ERRORS)) { bz_file = BZ2_bzdopen(fd, mode); } - stream-flags |= PHP_STREAM_FLAG_FCLOSE; } /* remove the file created by php_stream_open_wrapper(), it is not needed since BZ2 functions @@ -261,7 +260,6 @@ if (bz_file) { retstream = _php_stream_bz2open_from_BZFILE(bz_file, mode, stream STREAMS_REL_CC TSRMLS_CC); if (retstream) { - retstream-flags |= PHP_STREAM_FLAG_FCLOSE; return retstream; } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.147.2.3.2.17r2=1.147.2.3.2.18diff_format=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.147.2.3.2.17 php-src/ext/standard/dir.c:1.147.2.3.2.18 --- php-src/ext/standard/dir.c:1.147.2.3.2.17 Wed Jun 11 09:02:09 2008 +++ php-src/ext/standard/dir.c Wed Jul 23 11:25:50 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.147.2.3.2.17 2008/06/11 09:02:09 dmitry Exp $ */ +/* $Id: dir.c,v 1.147.2.3.2.18 2008/07/23 11:25:50 tony2001 Exp $ */ /* {{{ includes/startup/misc */ @@ -220,6 +220,8 @@ if (dirp == NULL) { RETURN_FALSE; } + + dirp-flags |= PHP_STREAM_FLAG_NO_FCLOSE; php_set_default_dir(dirp-rsrc_id TSRMLS_CC); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.33r2=1.409.2.6.2.34diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6.2.33 php-src/ext/standard/file.c:1.409.2.6.2.34 --- php-src/ext/standard/file.c:1.409.2.6.2.33 Tue Jul 22 14:11:25 2008 +++ php-src/ext/standard/file.c Wed Jul 23 11:25:50 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.409.2.6.2.33 2008/07/22 14:11:25 felipe Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.34 2008/07/23 11:25:50 tony2001 Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -861,8 +861,6 @@ stream = php_stream_fopen_tmpfile(); if (stream) { - stream-flags |= PHP_STREAM_FLAG_FCLOSE; - php_stream_to_zval(stream, return_value); } else { RETURN_FALSE; @@ -894,8 +892,6 @@ RETURN_FALSE; } - stream-flags |= PHP_STREAM_FLAG_FCLOSE; - php_stream_to_zval(stream, return_value); if (zcontext) { @@ -917,7 +913,7 @@ PHP_STREAM_TO_ZVAL(stream, arg1); - if (!(stream-flags PHP_STREAM_FLAG_FCLOSE)) { + if ((stream-flags PHP_STREAM_FLAG_NO_FCLOSE) != 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, %d is not a valid stream resource, stream-rsrc_id); RETURN_FALSE; } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/fsock.c?r1=1.121.2.1.2.3r2=1.121.2.1.2.4diff_format=u Index: php-src/ext/standard/fsock.c diff -u php-src/ext/standard/fsock.c:1.121.2.1.2.3 php-src/ext/standard/fsock.c:1.121.2.1.2.4 --- php-src/ext/standard/fsock.c:1.121.2.1.2.3 Tue Jul 22 14:11:25 2008 +++ php-src/ext/standard/fsock.cWed Jul 23 11:25:50 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: fsock.c,v 1.121.2.1.2.3 2008/07/22 14:11:25 felipe Exp $ */ +/* $Id: fsock.c,v 1.121.2.1.2.4 2008/07/23 11:25:50 tony2001 Exp $ */ #include php.h #include php_globals.h @@ -79,8 +79,6 @@ stream = php_stream_xport_create(hostname, hostname_len, ENFORCE_SAFE_MODE | REPORT_ERRORS, STREAM_XPORT_CLIENT | STREAM_XPORT_CONNECT, hashkey, tv, NULL, errstr, err); - stream-flags |=
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS
felipe Wed Jul 23 12:05:21 2008 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: - Change credits for #44246 http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1180r2=1.2027.2.547.2.1181diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1180 php-src/NEWS:1.2027.2.547.2.1181 --- php-src/NEWS:1.2027.2.547.2.1180Tue Jul 22 14:12:54 2008 +++ php-src/NEWSWed Jul 23 12:05:21 2008 @@ -49,7 +49,7 @@ - Fixed bug #44712 (stream_context_set_params segfaults on invalid arguments). (Hannes) - Fixed bug #44246 (closedir() accepts a file resource opened by fopen()). - (Dmitry, Felipe) + (Dmitry, Tony) - Fixed bug #44127 (UNIX abstract namespace socket connect does not work). (Jani) - Fixed bug #41348 (OCI8: allow compilation with Oracle 8.1). (Chris Jones) -- 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_2) / NEWS
On 23.07.2008 16:05, Felipe Pena wrote: - (Dmitry, Felipe) + (Dmitry, Tony) It should have been (Dmitry, Felipe, Tony) =) -- 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(PHP_5_2) / run-tests.php
janiWed Jul 23 13:43:05 2008 UTC Modified files: (Branch: PHP_5_2) /php-srcrun-tests.php Log: MFH: some fixes to allow certain tests to pass regardless of system php.ini settins http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.45r2=1.226.2.37.2.46diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.226.2.37.2.45 php-src/run-tests.php:1.226.2.37.2.46 --- php-src/run-tests.php:1.226.2.37.2.45 Thu Mar 13 13:51:40 2008 +++ php-src/run-tests.php Wed Jul 23 13:43:05 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.226.2.37.2.45 2008/03/13 13:51:40 felipe Exp $ */ +/* $Id: run-tests.php,v 1.226.2.37.2.46 2008/07/23 13:43:05 jani Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -58,6 +58,11 @@ exit; } +// If timezone is not set, use UTC. +if (ini_get('date.timezone') == '') { + date_default_timezone_set('UTC'); +} + // store current directory $CUR_DIR = getcwd(); @@ -76,6 +81,8 @@ $cwd = getcwd(); set_time_limit(0); +ini_set('pcre.backtrack_limit', PHP_INT_MAX); + $valgrind_version = 0; // delete as much output buffers as possible @@ -421,7 +428,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.226.2.37.2.45 $'.\n; + echo '$Revision: 1.226.2.37.2.46 $'.\n; exit(1); case 'u': -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli/tests bug44897.phpt /ext/mysqlnd mysqlnd_ps.c
andrey Wed Jul 23 14:06:31 2008 UTC Added files: /php-src/ext/mysqli/tests bug44897.phpt Modified files: /php-src/ext/mysqlndmysqlnd_ps.c Log: Fixed bug#44897 - failed to prepare statement After a PS CALL() we have at least one result set. If the SP does also some, then we need to clean the wire more fool-proof. http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_ps.c?r1=1.18r2=1.19diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_ps.c diff -u php-src/ext/mysqlnd/mysqlnd_ps.c:1.18 php-src/ext/mysqlnd/mysqlnd_ps.c:1.19 --- php-src/ext/mysqlnd/mysqlnd_ps.c:1.18 Tue Jul 15 13:12:27 2008 +++ php-src/ext/mysqlnd/mysqlnd_ps.cWed Jul 23 14:06:31 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_ps.c,v 1.18 2008/07/15 13:12:27 andrey Exp $ */ +/* $Id: mysqlnd_ps.c,v 1.19 2008/07/23 14:06:31 andrey Exp $ */ #include php.h #include mysqlnd.h #include mysqlnd_wireprotocol.h @@ -1985,7 +1985,7 @@ zend_uchar cmd_buf[STMT_ID_LENGTH /* statement id */]; enum_mysqlnd_collected_stats stat = STAT_LAST; - DBG_ENTER(mysqlnd_stmt::close); + DBG_ENTER(mysqlnd_stmt::net_close); DBG_INF_FMT(stmt=%lu, stmt-stmt_id); SET_EMPTY_ERROR(stmt-error_info); @@ -1996,17 +1996,20 @@ We have to call the appropriate use_result() or store_result() and clean. */ - if (stmt-state == MYSQLND_STMT_WAITING_USE_OR_STORE) { - DBG_INF(fetching result set header); - stmt-default_rset_handler(stmt TSRMLS_CC); - stmt-state = MYSQLND_STMT_USER_FETCHING; - } + do { + DBG_INF_FMT(stmt-state=%d, stmt-state); + if (stmt-state == MYSQLND_STMT_WAITING_USE_OR_STORE) { + DBG_INF(fetching result set header); + stmt-default_rset_handler(stmt TSRMLS_CC); + stmt-state = MYSQLND_STMT_USER_FETCHING; + } - /* unbuffered set not fetched to the end ? Clean the line */ - if (stmt-result) { - DBG_INF(skipping result); - stmt-result-m.skip_result(stmt-result TSRMLS_CC); - } + /* unbuffered set not fetched to the end ? Clean the line */ + if (stmt-result) { + DBG_INF(skipping result); + stmt-result-m.skip_result(stmt-result TSRMLS_CC); + } + } while (mysqlnd_stmt_more_results(stmt) mysqlnd_stmt_next_result(stmt)); /* After this point we are allowed to free the result set, as we have cleaned the line http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug44897.phpt?view=markuprev=1.1 Index: php-src/ext/mysqli/tests/bug44897.phpt +++ php-src/ext/mysqli/tests/bug44897.phpt --TEST-- Bug #44879 (failed to prepare statement) --SKIPIF-- ?php require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); require_once('connect.inc'); if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error())); } if (mysqli_get_server_version($link) = 5) { die(sprintf('skip Needs MySQL 5.0+, found version %d.', mysqli_get_server_version($link))); } ? --FILE-- ?php require_once(connect.inc); require_once(table.inc); if (!$link-query('DROP PROCEDURE IF EXISTS p')) printf([001] [%d] %s\n, $link-errno, $link-error); if (!$link-query('CREATE PROCEDURE p(IN new_id INT, IN new_label CHAR(1)) BEGIN INSERT INTO test(id, label) VALUES (new_id, new_label); SELECT new_label; END;')) printf([002] [%d] %s\n, $link-errno, $link-error); $new_id = 100; $new_label = 'z'; if (!$stmt = $link-prepare('CALL p(?, ?)')) printf([003] [%d] %s\n, $link-errno, $link-error); if (!$stmt-bind_param('is', $new_id, $new_label) || !$stmt-execute()) printf([004] [%d] %s\n, $stmt-errno, $stmt-error); $out_new_label = null; if (!$stmt-bind_result($out_new_label) || !$stmt-fetch()) printf([005] [%d] %s\n, $stmt-errno, $stmt-error); if ($out_new_label != $new_label) printf([006] IN value and returned value differ. Expecting %s/%s got %s/%s\n, $new_label, gettype($new_label), $out_new_label, gettype($out_new_label)); $stmt-close(); $stmt2 = $link-prepare('SELECT label FROM test WHERE id = ?'); if (!is_object($stmt2)) { printf([007] Failed to create new statement object\n); } else { if (!$stmt2-bind_param(i, $new_id) || !$stmt2-execute()) printf([008] [%d] %s\n, $stmt2-errno, $stmt2-error);
[PHP-CVS] cvs: php-src /ext/standard/tests/math bindec_basic.phpt bindec_basic_64bit.phpt
janiWed Jul 23 14:15:00 2008 UTC Modified files: /php-src/ext/standard/tests/mathbindec_basic_64bit.phpt bindec_basic.phpt Log: Fix test (bug #44985) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/math/bindec_basic_64bit.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/math/bindec_basic_64bit.phpt diff -u php-src/ext/standard/tests/math/bindec_basic_64bit.phpt:1.2 php-src/ext/standard/tests/math/bindec_basic_64bit.phpt:1.3 --- php-src/ext/standard/tests/math/bindec_basic_64bit.phpt:1.2 Tue May 27 07:38:00 2008 +++ php-src/ext/standard/tests/math/bindec_basic_64bit.phpt Wed Jul 23 14:15:00 2008 @@ -4,6 +4,8 @@ ?php if (PHP_INT_SIZE != 8) die(skip this test is for 64bit platform only); ? +--INI-- +precision=14 --FILE-- ?php $values = array(111000111, http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/math/bindec_basic.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/standard/tests/math/bindec_basic.phpt diff -u php-src/ext/standard/tests/math/bindec_basic.phpt:1.3 php-src/ext/standard/tests/math/bindec_basic.phpt:1.4 --- php-src/ext/standard/tests/math/bindec_basic.phpt:1.3 Tue May 27 07:38:00 2008 +++ php-src/ext/standard/tests/math/bindec_basic.phpt Wed Jul 23 14:15:00 2008 @@ -4,6 +4,8 @@ ?php if (PHP_INT_SIZE != 4) die(skip this test is for 32bit platform only); ? +--INI-- +precision=14 --FILE-- ?php $values = array(111000111, -- 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/math bindec_basic.phpt bindec_basic_64bit.phpt
janiWed Jul 23 14:15:37 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/mathbindec_basic_64bit.phpt bindec_basic.phpt Log: MFH: Fix test (bug #44985) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/math/bindec_basic_64bit.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/math/bindec_basic_64bit.phpt diff -u php-src/ext/standard/tests/math/bindec_basic_64bit.phpt:1.1.4.2 php-src/ext/standard/tests/math/bindec_basic_64bit.phpt:1.1.4.3 --- php-src/ext/standard/tests/math/bindec_basic_64bit.phpt:1.1.4.2 Sat Feb 2 23:44:39 2008 +++ php-src/ext/standard/tests/math/bindec_basic_64bit.phpt Wed Jul 23 14:15:37 2008 @@ -4,6 +4,8 @@ ?php if (PHP_INT_SIZE != 8) die(skip this test is for 64bit platform only); ? +--INI-- +precision=14 --FILE-- ?php $values = array(111000111, http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/math/bindec_basic.phpt?r1=1.1.4.3r2=1.1.4.4diff_format=u Index: php-src/ext/standard/tests/math/bindec_basic.phpt diff -u php-src/ext/standard/tests/math/bindec_basic.phpt:1.1.4.3 php-src/ext/standard/tests/math/bindec_basic.phpt:1.1.4.4 --- php-src/ext/standard/tests/math/bindec_basic.phpt:1.1.4.3 Sat Feb 2 23:44:39 2008 +++ php-src/ext/standard/tests/math/bindec_basic.phpt Wed Jul 23 14:15:37 2008 @@ -4,6 +4,8 @@ ?php if (PHP_INT_SIZE != 4) die(skip this test is for 32bit platform only); ? +--INI-- +precision=14 --FILE-- ?php $values = array(111000111, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/standard/tests/math bindec_basic.phpt bindec_basic_64bit.phpt
On 23.07.2008 18:15, Jani Taskinen wrote: janiWed Jul 23 14:15:00 2008 UTC Modified files: /php-src/ext/standard/tests/math bindec_basic_64bit.phpt bindec_basic.phpt Log: Fix test (bug #44985) There are 100+ more tests that fail if you set precision to 5, for instance. -- 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 / run-tests.php
lstrojnyWed Jul 23 16:10:14 2008 UTC Modified files: /php-srcrun-tests.php Log: Allowing %unicode|string% as a placeholder. In 6, this placeholder is resolved to unicode, in 6 to string. This allows to easily write portable tests. Patch by uw http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.366r2=1.367diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.366 php-src/run-tests.php:1.367 --- php-src/run-tests.php:1.366 Tue Jul 22 19:53:00 2008 +++ php-src/run-tests.php Wed Jul 23 16:10:14 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.366 2008/07/22 19:53:00 felipe Exp $ */ +/* $Id: run-tests.php,v 1.367 2008/07/23 16:10:14 lstrojny Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -478,7 +478,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.366 $' . \n; + echo '$Revision: 1.367 $' . \n; exit(1); default: @@ -1711,6 +1711,11 @@ if (isset($section_text['EXPECTF'])) { $wanted_re = preg_quote($wanted_re, '/'); + $wanted_re = str_replace( + array('%unicode\|string%', '%string\|unicode%'), + version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'unicode', + $wanted_re + ); // Stick to basics $wanted_re = str_replace('%e', '\\' . DIRECTORY_SEPARATOR, $wanted_re); $wanted_re = str_replace('%s', '[^\r\n]+', $wanted_re); -- 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) / run-tests.php
lstrojnyWed Jul 23 16:11:00 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcrun-tests.php Log: Allowing %unicode|string% as a placeholder (backport from HEAD) http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.35.2.37r2=1.226.2.37.2.35.2.38diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.226.2.37.2.35.2.37 php-src/run-tests.php:1.226.2.37.2.35.2.38 --- php-src/run-tests.php:1.226.2.37.2.35.2.37 Tue Jul 22 19:59:37 2008 +++ php-src/run-tests.php Wed Jul 23 16:11:00 2008 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.226.2.37.2.35.2.37 2008/07/22 19:59:37 felipe Exp $ */ +/* $Id: run-tests.php,v 1.226.2.37.2.35.2.38 2008/07/23 16:11:00 lstrojny Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -478,7 +478,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.226.2.37.2.35.2.37 $' . \n; + echo '$Revision: 1.226.2.37.2.35.2.38 $' . \n; exit(1); default: @@ -1711,6 +1711,11 @@ if (isset($section_text['EXPECTF'])) { $wanted_re = preg_quote($wanted_re, '/'); + $wanted_re = str_replace( + array('%unicode\|string%', '%string\|unicode%'), + version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'unicode', + $wanted_re + ); // Stick to basics $wanted_re = str_replace('%e', '\\' . DIRECTORY_SEPARATOR, $wanted_re); $wanted_re = str_replace('%s', '[^\r\n]+', $wanted_re); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard array.c
felipe Wed Jul 23 16:27:16 2008 UTC Modified files: /php-src/ext/standard array.c Log: - Fixed bug #45605 (array_uintersect_assoc gives incorrect error message) (patch by ilewis at uk dot ibm dot com) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.455r2=1.456diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.455 php-src/ext/standard/array.c:1.456 --- php-src/ext/standard/array.c:1.455 Wed Jul 9 21:29:39 2008 +++ php-src/ext/standard/array.cWed Jul 23 16:27:16 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.455 2008/07/09 21:29:39 colder Exp $ */ +/* $Id: array.c,v 1.456 2008/07/23 16:27:16 felipe Exp $ */ #include php.h #include php_ini.h @@ -3061,10 +3061,14 @@ /* Get the argument count */ argc = ZEND_NUM_ARGS(); if (data_compare_type == INTERSECT_COMP_DATA_USER) { - if (argc 3 || zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +f, args, argc, BG(user_compare_fci), BG(user_compare_fci_cache)) == FAILURE) { + if (argc 3) { php_error_docref(NULL TSRMLS_CC, E_WARNING, at least 3 parameters are required, %d given, ZEND_NUM_ARGS()); return; } + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +f, args, argc, BG(user_compare_fci), BG(user_compare_fci_cache)) == FAILURE) { + return; + } intersect_data_compare_func = zval_user_compare; } else { if (argc 2 || zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +, args, argc) == FAILURE) { -- 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 array.c
felipe Wed Jul 23 16:28:46 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard array.c Log: - MFH: Fixed bug #45605 (array_uintersect_assoc gives incorrect error message) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.37.2.35r2=1.308.2.21.2.37.2.36diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.21.2.37.2.35 php-src/ext/standard/array.c:1.308.2.21.2.37.2.36 --- php-src/ext/standard/array.c:1.308.2.21.2.37.2.35 Wed Jul 9 21:29:52 2008 +++ php-src/ext/standard/array.cWed Jul 23 16:28:46 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.308.2.21.2.37.2.35 2008/07/09 21:29:52 colder Exp $ */ +/* $Id: array.c,v 1.308.2.21.2.37.2.36 2008/07/23 16:28:46 felipe Exp $ */ #include php.h #include php_ini.h @@ -2837,10 +2837,14 @@ /* Get the argument count */ argc = ZEND_NUM_ARGS(); if (data_compare_type == INTERSECT_COMP_DATA_USER) { - if (argc 3 || zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +f, args, argc, BG(user_compare_fci), BG(user_compare_fci_cache)) == FAILURE) { + if (argc 3) { php_error_docref(NULL TSRMLS_CC, E_WARNING, at least 3 parameters are required, %d given, ZEND_NUM_ARGS()); return; } + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +f, args, argc, BG(user_compare_fci), BG(user_compare_fci_cache)) == FAILURE) { + return; + } intersect_data_compare_func = zval_user_compare; } else { if (argc 2 || zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +, args, argc) == FAILURE) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/standard/tests/math bindec_basic.phpt bindec_basic_64bit.phpt
Antony Dovgal wrote: On 23.07.2008 18:15, Jani Taskinen wrote: janiWed Jul 23 14:15:00 2008 UTC Modified files: /php-src/ext/standard/tests/math bindec_basic_64bit.phpt bindec_basic.phpt Log: Fix test (bug #44985) There are 100+ more tests that fail if you set precision to 5, for instance. Nobody complained about those. :D --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/standard array.c
Did you read my comment in that bug report? --Jani Felipe Pena wrote: felipe Wed Jul 23 16:27:16 2008 UTC Modified files: /php-src/ext/standard array.c Log: - Fixed bug #45605 (array_uintersect_assoc gives incorrect error message) (patch by ilewis at uk dot ibm dot com) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.455r2=1.456diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.455 php-src/ext/standard/array.c:1.456 --- php-src/ext/standard/array.c:1.455 Wed Jul 9 21:29:39 2008 +++ php-src/ext/standard/array.cWed Jul 23 16:27:16 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.455 2008/07/09 21:29:39 colder Exp $ */ +/* $Id: array.c,v 1.456 2008/07/23 16:27:16 felipe Exp $ */ #include php.h #include php_ini.h @@ -3061,10 +3061,14 @@ /* Get the argument count */ argc = ZEND_NUM_ARGS(); if (data_compare_type == INTERSECT_COMP_DATA_USER) { - if (argc 3 || zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +f, args, argc, BG(user_compare_fci), BG(user_compare_fci_cache)) == FAILURE) { + if (argc 3) { php_error_docref(NULL TSRMLS_CC, E_WARNING, at least 3 parameters are required, %d given, ZEND_NUM_ARGS()); return; } + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +f, args, argc, BG(user_compare_fci), BG(user_compare_fci_cache)) == FAILURE) { + return; + } intersect_data_compare_func = zval_user_compare; } else { if (argc 2 || zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +, args, argc) == FAILURE) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/standard array.c
Em Qua, 2008-07-23 às 20:11 +0300, Jani Taskinen escreveu: Did you read my comment in that bug report? Yes, but after the commit. --Jani Felipe Pena wrote: felipe Wed Jul 23 16:27:16 2008 UTC Modified files: /php-src/ext/standard array.c Log: - Fixed bug #45605 (array_uintersect_assoc gives incorrect error message) (patch by ilewis at uk dot ibm dot com) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.455r2=1.456diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.455 php-src/ext/standard/array.c:1.456 --- php-src/ext/standard/array.c:1.455 Wed Jul 9 21:29:39 2008 +++ php-src/ext/standard/array.cWed Jul 23 16:27:16 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.455 2008/07/09 21:29:39 colder Exp $ */ +/* $Id: array.c,v 1.456 2008/07/23 16:27:16 felipe Exp $ */ #include php.h #include php_ini.h @@ -3061,10 +3061,14 @@ /* Get the argument count */ argc = ZEND_NUM_ARGS(); if (data_compare_type == INTERSECT_COMP_DATA_USER) { - if (argc 3 || zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +f, args, argc, BG(user_compare_fci), BG(user_compare_fci_cache)) == FAILURE) { + if (argc 3) { php_error_docref(NULL TSRMLS_CC, E_WARNING, at least 3 parameters are required, %d given, ZEND_NUM_ARGS()); return; } + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +f, args, argc, BG(user_compare_fci), BG(user_compare_fci_cache)) == FAILURE) { + return; + } intersect_data_compare_func = zval_user_compare; } else { if (argc 2 || zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +, args, argc) == FAILURE) { -- 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 /ext/intl intl_data.h php_intl.c /ext/intl/locale locale_class.c locale_methods.c locale_methods.h /ext/intl/tests ut_common.inc
stasWed Jul 23 18:45:10 2008 UTC Modified files: /php-src/ext/intl intl_data.h php_intl.c /php-src/ext/intl/localelocale_class.c locale_methods.c locale_methods.h /php-src/ext/intl/tests ut_common.inc Log: add locale_accept_from_http http://cvs.php.net/viewvc.cgi/php-src/ext/intl/intl_data.h?r1=1.3r2=1.4diff_format=u Index: php-src/ext/intl/intl_data.h diff -u php-src/ext/intl/intl_data.h:1.3 php-src/ext/intl/intl_data.h:1.4 --- php-src/ext/intl/intl_data.h:1.3Tue Jul 22 22:11:21 2008 +++ php-src/ext/intl/intl_data.hWed Jul 23 18:45:10 2008 @@ -45,6 +45,15 @@ obj = (oclass##_object *) zend_object_store_get_object( object TSRMLS_CC ); \ intl_error_reset( INTL_DATA_ERROR_P(obj) TSRMLS_CC ); \ +// Check status by error code, if error - exit +#define INTL_CHECK_STATUS(err, msg) \ +intl_error_set_code( NULL, (err) TSRMLS_CC ); \ +if( U_FAILURE((err)) ) \ +{ \ +intl_errors_set_custom_msg( NULL, msg, 0 TSRMLS_CC ); \ +RETURN_FALSE; \ +} + #define INTL_METHOD_CHECK_STATUS(obj, msg) \ intl_error_set_code( NULL, INTL_DATA_ERROR_CODE((obj)) TSRMLS_CC ); \ if( U_FAILURE( INTL_DATA_ERROR_CODE((obj)) ) ) \ http://cvs.php.net/viewvc.cgi/php-src/ext/intl/php_intl.c?r1=1.3r2=1.4diff_format=u Index: php-src/ext/intl/php_intl.c diff -u php-src/ext/intl/php_intl.c:1.3 php-src/ext/intl/php_intl.c:1.4 --- php-src/ext/intl/php_intl.c:1.3 Mon Jul 14 07:16:36 2008 +++ php-src/ext/intl/php_intl.c Wed Jul 23 18:45:10 2008 @@ -272,6 +272,7 @@ PHP_FE( locale_parse, locale_1_arg ) PHP_FE( locale_filter_matches, locale_filter_args ) PHP_FE( locale_lookup, locale_lookup_args ) + PHP_FE( locale_accept_from_http, locale_1_arg ) // MessageFormatter functions PHP_FE( msgfmt_create, NULL ) http://cvs.php.net/viewvc.cgi/php-src/ext/intl/locale/locale_class.c?r1=1.2r2=1.3diff_format=u Index: php-src/ext/intl/locale/locale_class.c diff -u php-src/ext/intl/locale/locale_class.c:1.2 php-src/ext/intl/locale/locale_class.c:1.3 --- php-src/ext/intl/locale/locale_class.c:1.2 Mon Jul 7 23:42:29 2008 +++ php-src/ext/intl/locale/locale_class.c Wed Jul 23 18:45:10 2008 @@ -89,6 +89,7 @@ ZEND_FENTRY( filterMatches, ZEND_FN( locale_filter_matches ), locale_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) ZEND_FENTRY( lookup, ZEND_FN( locale_lookup ), locale_4_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) ZEND_FENTRY( canonicalize, ZEND_FN( locale_canonicalize ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) + ZEND_FENTRY( acceptFromHttp, ZEND_FN( locale_accept_from_http ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) { NULL, NULL, NULL } }; /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/intl/locale/locale_methods.c?r1=1.2r2=1.3diff_format=u Index: php-src/ext/intl/locale/locale_methods.c diff -u php-src/ext/intl/locale/locale_methods.c:1.2 php-src/ext/intl/locale/locale_methods.c:1.3 --- php-src/ext/intl/locale/locale_methods.c:1.2Mon Jul 7 23:42:29 2008 +++ php-src/ext/intl/locale/locale_methods.cWed Jul 23 18:45:10 2008 @@ -21,12 +21,14 @@ #include unicode/ustring.h #include unicode/udata.h #include unicode/putil.h +#include unicode/ures.h #include php_intl.h #include locale.h #include locale_class.h #include locale_methods.h #include intl_convert.h +#include intl_data.h #include zend_API.h #include zend.h @@ -420,12 +422,10 @@ } /* }}} */ -/* {{{ - * proto public static string Locale::getScript($locale) +/* {{{ proto static string Locale::getScript($locale) * gets the script for the $locale }}} */ -/* {{{ - * proto public static string locale_get_script($locale) +/* {{{ proto static string locale_get_script($locale) * gets the script for the $locale */ PHP_FUNCTION( locale_get_script ) @@ -434,12 +434,10 @@ } /* }}} */ -/* {{{ - * proto public static string Locale::getRegion($locale) +/* {{{ proto static string Locale::getRegion($locale) * gets the region for the $locale }}} */ -/* {{{ - * proto public static string locale_get_region($locale) +/* {{{ proto static string
[PHP-CVS] cvs: php-src /ext/intl/tests locale_accept.phpt
stasWed Jul 23 18:46:09 2008 UTC Modified files: /php-src/ext/intl/tests locale_accept.phpt Log: add test http://cvs.php.net/viewvc.cgi/php-src/ext/intl/tests/locale_accept.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/intl/tests/locale_accept.phpt diff -u /dev/null php-src/ext/intl/tests/locale_accept.phpt:1.2 --- /dev/null Wed Jul 23 18:46:09 2008 +++ php-src/ext/intl/tests/locale_accept.phpt Wed Jul 23 18:46:09 2008 @@ -0,0 +1,46 @@ +--TEST-- +locale_accept_from_http +--SKIPIF-- +?php if( !extension_loaded( 'intl' ) ) print 'skip'; ? +--FILE-- +?php + +/* + * Try parsing different Locales + * with Procedural and Object methods. + */ + +function ut_main() +{ + $res_str = ; + $http_acc = array( + 'en-us,en;q=0.5', + 'da, en-gb;q=0.8, en;q=0.7', + 'zh, en-us;q=0.8, en;q=0.7', + 'xx, fr-FR;q=0.3, de-DE;q=0.5', + 'none', + array() + ); + + foreach($http_acc as $http) { + $res = ut_loc_accept_http($http); + $res_str .= Accepting $http: $res\n; + } + +return $res_str; +} + +include_once( 'ut_common.inc' ); +ut_run(); + +? +--EXPECTF-- +Warning: Locale::acceptFromHttp() expects parameter 1 to be string, array given in %s on line %d + +Warning: locale_accept_from_http() expects parameter 1 to be string, array given in %s on line %d +Accepting en-us,en;q=0.5: en_US +Accepting da, en-gb;q=0.8, en;q=0.7: da +Accepting zh, en-us;q=0.8, en;q=0.7: zh +Accepting xx, fr-FR;q=0.3, de-DE;q=0.5: de_DE +Accepting none: +Accepting Array: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/date/lib parse_date.c parse_date.re /ext/date/tests bug43452.phpt
derick Wed Jul 23 18:49:38 2008 UTC Added files: /php-src/ext/date/tests bug43452.phpt Modified files: /php-src/ext/date/lib parse_date.re parse_date.c Log: - Fixed bug #43452 (strings containing a weekday, or a number plus weekday behaved incorrect of the current day-of-week was the same as the one in the phrase). (Derick) http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.86r2=1.87diff_format=u Index: php-src/ext/date/lib/parse_date.re diff -u php-src/ext/date/lib/parse_date.re:1.86 php-src/ext/date/lib/parse_date.re:1.87 --- php-src/ext/date/lib/parse_date.re:1.86 Wed Jul 16 15:40:01 2008 +++ php-src/ext/date/lib/parse_date.re Wed Jul 23 18:49:37 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: parse_date.re,v 1.86 2008/07/16 15:40:01 derick Exp $ */ +/* $Id: parse_date.re,v 1.87 2008/07/23 18:49:37 derick Exp $ */ #include timelib.h @@ -1680,7 +1680,7 @@ while(*ptr) { i = timelib_get_unsigned_nr((char **) ptr, 24); timelib_eat_spaces((char **) ptr); - timelib_set_relative((char **) ptr, i, 0, s); + timelib_set_relative((char **) ptr, i, 1, s); } TIMELIB_DEINIT; return TIMELIB_RELATIVE; http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.95r2=1.96diff_format=u Index: php-src/ext/date/lib/parse_date.c diff -u php-src/ext/date/lib/parse_date.c:1.95 php-src/ext/date/lib/parse_date.c:1.96 --- php-src/ext/date/lib/parse_date.c:1.95 Wed Jul 16 15:40:00 2008 +++ php-src/ext/date/lib/parse_date.c Wed Jul 23 18:49:37 2008 @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Wed Jul 16 17:39:20 2008 */ +/* Generated by re2c 0.13.5 on Wed Jul 23 20:47:26 2008 */ #line 1 ext/date/lib/parse_date.re /* +--+ @@ -18,7 +18,7 @@ +--+ */ -/* $Id: parse_date.c,v 1.95 2008/07/16 15:40:00 derick Exp $ */ +/* $Id: parse_date.c,v 1.96 2008/07/23 18:49:37 derick Exp $ */ #include timelib.h @@ -2749,7 +2749,7 @@ while(*ptr) { i = timelib_get_unsigned_nr((char **) ptr, 24); timelib_eat_spaces((char **) ptr); - timelib_set_relative((char **) ptr, i, 0, s); + timelib_set_relative((char **) ptr, i, 1, s); } TIMELIB_DEINIT; return TIMELIB_RELATIVE; http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug43452.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/bug43452.phpt +++ php-src/ext/date/tests/bug43452.phpt --TEST-- Bug #43452 (weekday is not equivalent to 1 weekday of the current weekday is weekday) --INI-- date.default_timezone=Europe/Oslo --FILE-- ?php // day is equivalent to 1 day and will *not* forward if the current day // (November 1st) is the same day of week. $day = strtotime( Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( 1 Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( 2 Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( 3 Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n\n; // forward one week, then behaves like above for week days $day = strtotime( Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( +1 week Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( +2 week Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( +3 week Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n\n; // First, second, etc skip to the first/second weekday *after* the current day. // This makes first thursday equivalent to +1 week thursday - but only // if the current day-of-week is the one mentioned in the phrase. $day = strtotime( Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( first Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( second Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( third Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n\n; // Now the same where the current day-of-week does not match the one in the // phrase. $day = strtotime( Friday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( first Friday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( second Friday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( third Friday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n\n; ? --EXPECT-- 2007-11-01T00:00:00+0100 2007-11-01T00:00:00+0100 2007-11-08T00:00:00+0100
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date/lib parse_date.c parse_date.re /ext/date/tests bug43452.phpt
derick Wed Jul 23 18:50:51 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/date/tests bug43452.phpt Modified files: /php-src/ext/date/lib parse_date.re parse_date.c /php-srcNEWS Log: - MFH: Fixed bug #43452 (strings containing a weekday, or a number plus weekday behaved incorrect of the current day-of-week was the same as the one in the phrase). http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.26.2.27.2.12.2.20r2=1.26.2.27.2.12.2.21diff_format=u Index: php-src/ext/date/lib/parse_date.re diff -u php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.20 php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.21 --- php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.20 Wed Jul 16 15:41:01 2008 +++ php-src/ext/date/lib/parse_date.re Wed Jul 23 18:50:18 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: parse_date.re,v 1.26.2.27.2.12.2.20 2008/07/16 15:41:01 derick Exp $ */ +/* $Id: parse_date.re,v 1.26.2.27.2.12.2.21 2008/07/23 18:50:18 derick Exp $ */ #include timelib.h @@ -1680,7 +1680,7 @@ while(*ptr) { i = timelib_get_unsigned_nr((char **) ptr, 24); timelib_eat_spaces((char **) ptr); - timelib_set_relative((char **) ptr, i, 0, s); + timelib_set_relative((char **) ptr, i, 1, s); } TIMELIB_DEINIT; return TIMELIB_RELATIVE; http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.29.2.30.2.14.2.22r2=1.29.2.30.2.14.2.23diff_format=u Index: php-src/ext/date/lib/parse_date.c diff -u php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.22 php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.23 --- php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.22 Wed Jul 16 15:40:41 2008 +++ php-src/ext/date/lib/parse_date.c Wed Jul 23 18:50:18 2008 @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Wed Jul 16 17:24:19 2008 */ +/* Generated by re2c 0.13.5 on Wed Jul 23 19:59:35 2008 */ #line 1 ext/date/lib/parse_date.re /* +--+ @@ -18,7 +18,7 @@ +--+ */ -/* $Id: parse_date.c,v 1.29.2.30.2.14.2.22 2008/07/16 15:40:41 derick Exp $ */ +/* $Id: parse_date.c,v 1.29.2.30.2.14.2.23 2008/07/23 18:50:18 derick Exp $ */ #include timelib.h @@ -2749,7 +2749,7 @@ while(*ptr) { i = timelib_get_unsigned_nr((char **) ptr, 24); timelib_eat_spaces((char **) ptr); - timelib_set_relative((char **) ptr, i, 0, s); + timelib_set_relative((char **) ptr, i, 1, s); } TIMELIB_DEINIT; return TIMELIB_RELATIVE; http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.213r2=1.2027.2.547.2.965.2.214diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.213 php-src/NEWS:1.2027.2.547.2.965.2.214 --- php-src/NEWS:1.2027.2.547.2.965.2.213 Wed Jul 23 14:10:04 2008 +++ php-src/NEWSWed Jul 23 18:50:37 2008 @@ -249,6 +249,9 @@ - Fixed bug #43808 (date_create never fails (even when it should)). (Derick) - Fixed bug #43527 (DateTime created from a timestamp reports environment timezone). (Derick) +- Fixed bug #43452 (strings containing a weekday, or a number plus weekday + behaved incorrect of the current day-of-week was the same as the one in the + phrase). (Derick) - Fixed bug #43426 (crash on nested call_user_func() calls). (Dmitry) - Fixed bug #43323 (Wrong count abstract methods). (Felipe, Dmitry) - Fixed bug #43261 (Use ^ as the escape with escapeshellcmd() on Windows). (Scott) http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug43452.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/bug43452.phpt +++ php-src/ext/date/tests/bug43452.phpt --TEST-- Bug #43452 (weekday is not equivalent to 1 weekday of the current weekday is weekday) --INI-- date.default_timezone=Europe/Oslo --FILE-- ?php // day is equivalent to 1 day and will *not* forward if the current day // (November 1st) is the same day of week. $day = strtotime( Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( 1 Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( 2 Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( 3 Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n\n; // forward one week, then behaves like above for week days $day = strtotime( Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( +1 week Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ), \n; $day = strtotime( +2 week Thursday Nov 2007 ); echo date( DateTime::ISO8601, $day ),
[PHP-CVS] cvs: php-src /ext/standard assert.c basic_functions.c /ext/standard/tests/assert assert04.phpt assert_error1.phpt
felipe Wed Jul 23 19:33:58 2008 UTC Modified files: /php-src/ext/standard assert.c basic_functions.c /php-src/ext/standard/tests/assert assert04.phpt assert_error1.phpt Log: - New parameter parsing API http://cvs.php.net/viewvc.cgi/php-src/ext/standard/assert.c?r1=1.76r2=1.77diff_format=u Index: php-src/ext/standard/assert.c diff -u php-src/ext/standard/assert.c:1.76 php-src/ext/standard/assert.c:1.77 --- php-src/ext/standard/assert.c:1.76 Mon Dec 31 07:12:15 2007 +++ php-src/ext/standard/assert.c Wed Jul 23 19:33:58 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: assert.c,v 1.76 2007/12/31 07:12:15 sebastian Exp $ */ +/* $Id: assert.c,v 1.77 2008/07/23 19:33:58 felipe Exp $ */ /* {{{ includes */ #include php.h @@ -149,8 +149,8 @@ RETURN_TRUE; } - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, assertion) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Z, assertion) == FAILURE) { + return; } if (Z_TYPE_PP(assertion) == IS_STRING || Z_TYPE_PP(assertion) == IS_UNICODE) { @@ -262,17 +262,16 @@ Set/get the various assert flags */ PHP_FUNCTION(assert_options) { - zval **what, **value; + zval **value; + long what; int oldint; int ac = ZEND_NUM_ARGS(); - if (ac 1 || ac 2 || zend_get_parameters_ex(ac, what, value) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ac TSRMLS_CC, l|Z, what, value) == FAILURE) { + return; } - convert_to_long_ex(what); - - switch (Z_LVAL_PP(what)) { + switch (what) { case ASSERT_ACTIVE: oldint = ASSERTG(active); if (ac == 2) { @@ -328,7 +327,7 @@ break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown value %ld, Z_LVAL_PP(what)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown value %ld, what); break; } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.905r2=1.906diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.905 php-src/ext/standard/basic_functions.c:1.906 --- php-src/ext/standard/basic_functions.c:1.905Mon Jul 21 11:27:45 2008 +++ php-src/ext/standard/basic_functions.c Wed Jul 23 19:33:58 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.905 2008/07/21 11:27:45 jani Exp $ */ +/* $Id: basic_functions.c,v 1.906 2008/07/23 19:33:58 felipe Exp $ */ #include php.h #include php_streams.h @@ -4928,65 +4928,17 @@ Send an error message somewhere */ PHP_FUNCTION(error_log) { - zval **string, **erropt = NULL, **option = NULL, **emailhead = NULL; - int opt_err = 0; char *message, *opt = NULL, *headers = NULL; + int message_len, opt_len, headers_len; + int opt_err = 0, argc = ZEND_NUM_ARGS(); + long erropt; - switch (ZEND_NUM_ARGS()) { - case 1: - if (zend_get_parameters_ex(1, string) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Argument 1 invalid); - RETURN_FALSE; - } - break; - - case 2: - if (zend_get_parameters_ex(2, string, erropt) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid arguments); - RETURN_FALSE; - } - convert_to_long_ex(erropt); - opt_err = Z_LVAL_PP(erropt); - break; - - case 3: - if (zend_get_parameters_ex(3, string, erropt, option) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid arguments); - RETURN_FALSE; - } - convert_to_long_ex(erropt); - opt_err = Z_LVAL_PP(erropt); - convert_to_string_ex(option); - opt = Z_STRVAL_PP(option); - break; - - case 4: - if (zend_get_parameters_ex (4, string, erropt, option, emailhead) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid arguments); - RETURN_FALSE; - } - break; - - default: - WRONG_PARAM_COUNT; - } - - convert_to_string_ex(string); - message =
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard assert.c basic_functions.c /ext/standard/tests/assert assert04.phpt assert_error1.phpt /ext/standard/tests/file magic_quotes.phpt
felipe Wed Jul 23 19:34:35 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard assert.c basic_functions.c /php-src/ext/standard/tests/assert assert04.phpt assert_error1.phpt /php-src/ext/standard/tests/filemagic_quotes.phpt Log: - MFH: New parameter parsing API http://cvs.php.net/viewvc.cgi/php-src/ext/standard/assert.c?r1=1.60.2.3.2.6.2.2r2=1.60.2.3.2.6.2.3diff_format=u Index: php-src/ext/standard/assert.c diff -u php-src/ext/standard/assert.c:1.60.2.3.2.6.2.2 php-src/ext/standard/assert.c:1.60.2.3.2.6.2.3 --- php-src/ext/standard/assert.c:1.60.2.3.2.6.2.2 Mon Dec 31 07:17:14 2007 +++ php-src/ext/standard/assert.c Wed Jul 23 19:34:35 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: assert.c,v 1.60.2.3.2.6.2.2 2007/12/31 07:17:14 sebastian Exp $ */ +/* $Id: assert.c,v 1.60.2.3.2.6.2.3 2008/07/23 19:34:35 felipe Exp $ */ /* {{{ includes */ #include php.h @@ -148,8 +148,8 @@ RETURN_TRUE; } - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, assertion) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Z, assertion) == FAILURE) { + return; } if (Z_TYPE_PP(assertion) == IS_STRING) { @@ -239,17 +239,16 @@ Set/get the various assert flags */ PHP_FUNCTION(assert_options) { - zval **what, **value; + zval **value; + long what; int oldint; int ac = ZEND_NUM_ARGS(); - if (ac 1 || ac 2 || zend_get_parameters_ex(ac, what, value) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ac TSRMLS_CC, l|Z, what, value) == FAILURE) { + return; } - convert_to_long_ex(what); - - switch (Z_LVAL_PP(what)) { + switch (what) { case ASSERT_ACTIVE: oldint = ASSERTG(active); if (ac == 2) { @@ -305,7 +304,7 @@ break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown value %ld, Z_LVAL_PP(what)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown value %ld, what); break; } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.38r2=1.725.2.31.2.64.2.39diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.38 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.39 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.38 Sun Jul 20 14:28:41 2008 +++ php-src/ext/standard/basic_functions.c Wed Jul 23 19:34:35 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.38 2008/07/20 14:28:41 felipe Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.39 2008/07/23 19:34:35 felipe Exp $ */ #include php.h #include php_streams.h @@ -4940,15 +4940,13 @@ Set the current active configuration setting of magic_quotes_runtime and return previous */ PHP_FUNCTION(set_magic_quotes_runtime) { - zval **new_setting; + zend_bool new_setting; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, new_setting) == FAILURE) { - RETURN_FALSE; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, b, new_setting) == FAILURE) { + return; } - convert_to_boolean_ex(new_setting); - - PG(magic_quotes_runtime) = (zend_bool) Z_LVAL_PP(new_setting); + PG(magic_quotes_runtime) = new_setting; RETURN_TRUE; } /* }}} */ @@ -4986,65 +4984,17 @@ Send an error message somewhere */ PHP_FUNCTION(error_log) { - zval **string, **erropt = NULL, **option = NULL, **emailhead = NULL; - int opt_err = 0; char *message, *opt = NULL, *headers = NULL; + int message_len, opt_len, headers_len; + int opt_err = 0, argc = ZEND_NUM_ARGS(); + long erropt; - switch (ZEND_NUM_ARGS()) { - case 1: - if (zend_get_parameters_ex(1, string) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Argument 1 invalid); - RETURN_FALSE; - } - break; - - case 2: - if (zend_get_parameters_ex(2, string, erropt) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid arguments); - RETURN_FALSE; - } - convert_to_long_ex(erropt); - opt_err = Z_LVAL_PP(erropt); - break; - - case 3: - if (zend_get_parameters_ex(3, string, erropt, option)
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/intl/locale locale_methods.c /ext/intl/tests locale_compose_locale.phpt
stasWed Jul 23 19:44:51 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/intl/localelocale_methods.c /php-src/ext/intl/tests locale_compose_locale.phpt Log: add compose syntax as per request #14266 http://cvs.php.net/viewvc.cgi/php-src/ext/intl/locale/locale_methods.c?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/intl/locale/locale_methods.c diff -u php-src/ext/intl/locale/locale_methods.c:1.1.2.2 php-src/ext/intl/locale/locale_methods.c:1.1.2.3 --- php-src/ext/intl/locale/locale_methods.c:1.1.2.2Wed Jul 23 01:15:33 2008 +++ php-src/ext/intl/locale/locale_methods.cWed Jul 23 19:44:51 2008 @@ -34,6 +34,7 @@ #include zend.h #include php.h #include main/php_ini.h +#include ext/standard/php_smart_str.h ZEND_EXTERN_MODULE_GLOBALS( intl ) @@ -50,6 +51,8 @@ #define MAX_NO_PRIVATE 15 #define MAX_NO_LOOKUP_LANG_TAG 100 +#define LOC_NOT_FOUND 1 + //Sizes required for the strings variant15 , extlang3, private12 etc. #define VARIANT_KEYNAME_LEN 11 #define EXTLANG_KEYNAME_LEN 10 @@ -758,66 +761,42 @@ } /* }}} */ - /* {{{ append_key_value * Internal function which is called from locale_compose * gets the value for the key_name and appends to the loc_name * returns 1 if successful , -1 if not found , * 0 if array element is not a string , -2 if buffer-overflow */ -static int append_key_value(char* loc_name, int loc_name_capacity , HashTable* hash_arr, char* key_name TSRMLS_DC) +static int append_key_value(smart_str* loc_name, HashTable* hash_arr, char* key_name) { - int needed_size = -1; zval** ele_value = NULL; - intl_error_reset( NULL TSRMLS_CC ); - - if( zend_hash_find( hash_arr , key_name , strlen(key_name) + 1 ,(void **)ele_value ) == SUCCESS ){ - if( Z_TYPE_PP(ele_value)!= IS_STRING ){ + if(zend_hash_find(hash_arr , key_name , strlen(key_name) + 1 ,(void **)ele_value ) == SUCCESS ) { + if(Z_TYPE_PP(ele_value)!= IS_STRING ){ //element value is not a string - return 0; + return FAILURE; } - if( strcmp(key_name , LOC_LANG_TAG) != 0 - strcmp(key_name , LOC_GRANDFATHERED_LANG_TAG)!=0 ){ - - needed_size = Z_STRLEN_PP(ele_value)+1 ; - if( needed_size loc_name_capacity ){ - //Will cause Buffer_overflow - return -2; - - } else { - strcat( loc_name , SEPARATOR); - strncat( loc_name , -Z_STRVAL_PP(ele_value) , -Z_STRLEN_PP(ele_value) ); - } - } else { - //lang or grandfathered tag - needed_size = Z_STRLEN_PP(ele_value) ; - if( needed_size loc_name_capacity ){ - //Will cause Buffer_overflow - return -2; - - } else { - strncat( loc_name , Z_STRVAL_PP(ele_value) , Z_STRLEN_PP(ele_value) ); - } + if(strcmp(key_name, LOC_LANG_TAG) != 0 + strcmp(key_name, LOC_GRANDFATHERED_LANG_TAG)!=0 ) { + // not lang or grandfathered tag + smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); } - - return 1; + smart_str_appendl(loc_name, Z_STRVAL_PP(ele_value) , Z_STRLEN_PP(ele_value)); + return SUCCESS; } - return -1; + return LOC_NOT_FOUND; } /* }}} */ /* {{{ append_prefix , appends the prefix needed * e.g. private adds 'x' */ -static void add_prefix(char* loc_name , char* key_name) +static void add_prefix(smart_str* loc_name, char* key_name) { if( strncmp(key_name , LOC_PRIVATE_TAG , 7) == 0 ){ - strcat( loc_name , SEPARATOR); - strcat( loc_name , PRIVATE_PREFIX); + smart_str_appendl(loc_name, SEPARATOR , sizeof(SEPARATOR)-1); + smart_str_appendl(loc_name, PRIVATE_PREFIX , sizeof(PRIVATE_PREFIX)-1); } } /* }}} */ @@ -829,44 +808,45 @@ * returns 1 if successful , -1 if not found , * 0 if array element is not a string , -2 if buffer-overflow */ -static int append_multiple_key_values(char* loc_name, int loc_name_capacity , HashTable* hash_arr, char* key_name TSRMLS_DC) +static int append_multiple_key_values(smart_str* loc_name, HashTable* hash_arr, char* key_name) { - int result = -1; zval** ele_value = NULL; - char* cur_key_name= NULL;
[PHP-CVS] cvs: php-src /ext/standard/tests/class_object get_class_error_001.phpt get_class_methods_error_001.phpt get_object_vars_error_001.phpt get_parent_class_error_001.phpt is_a_error_001.phpt is_
felipe Wed Jul 23 19:49:08 2008 UTC Modified files: /php-src/ext/standard/tests/class_objectget_class_error_001.phpt get_class_methods_error_001.phpt get_object_vars_error_001.phpt get_parent_class_error_001.phpt is_a_error_001.phpt is_subclass_of_error_001.phpt method_exists_error_001.phpt Log: - Fixed tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/get_class_error_001.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/standard/tests/class_object/get_class_error_001.phpt diff -u php-src/ext/standard/tests/class_object/get_class_error_001.phpt:1.3 php-src/ext/standard/tests/class_object/get_class_error_001.phpt:1.4 --- php-src/ext/standard/tests/class_object/get_class_error_001.phpt:1.3 Mon May 26 23:45:15 2008 +++ php-src/ext/standard/tests/class_object/get_class_error_001.phptWed Jul 23 19:49:07 2008 @@ -23,6 +23,6 @@ -- Testing get_class() function with more than expected no. of arguments -- -Warning: Wrong parameter count for get_class() in %s on line 14 +Warning: get_class() expects at most 1 parameter, 2 given in %s on line %d NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/get_class_methods_error_001.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/standard/tests/class_object/get_class_methods_error_001.phpt diff -u php-src/ext/standard/tests/class_object/get_class_methods_error_001.phpt:1.3 php-src/ext/standard/tests/class_object/get_class_methods_error_001.phpt:1.4 --- php-src/ext/standard/tests/class_object/get_class_methods_error_001.phpt:1.3 Mon May 26 23:45:15 2008 +++ php-src/ext/standard/tests/class_object/get_class_methods_error_001.phpt Wed Jul 23 19:49:07 2008 @@ -31,11 +31,11 @@ -- Testing get_class_methods() function with Zero arguments -- -Warning: Wrong parameter count for get_class_methods() in %s on line 16 +Warning: get_class_methods() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Testing get_class_methods() function with more than expected no. of arguments -- -Warning: Wrong parameter count for get_class_methods() in %s on line 22 +Warning: get_class_methods() expects exactly 1 parameter, 2 given in %s on line %d NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/get_object_vars_error_001.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/standard/tests/class_object/get_object_vars_error_001.phpt diff -u php-src/ext/standard/tests/class_object/get_object_vars_error_001.phpt:1.3 php-src/ext/standard/tests/class_object/get_object_vars_error_001.phpt:1.4 --- php-src/ext/standard/tests/class_object/get_object_vars_error_001.phpt:1.3 Mon May 26 23:45:15 2008 +++ php-src/ext/standard/tests/class_object/get_object_vars_error_001.phpt Wed Jul 23 19:49:07 2008 @@ -27,11 +27,11 @@ -- Testing get_object_vars() function with Zero arguments -- -Warning: Wrong parameter count for get_object_vars() in %s on line 12 +Warning: get_object_vars() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Testing get_object_vars() function with more than expected no. of arguments -- -Warning: Wrong parameter count for get_object_vars() in %s on line 18 +Warning: get_object_vars() expects exactly 1 parameter, 2 given in %s on line %d NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/get_parent_class_error_001.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/standard/tests/class_object/get_parent_class_error_001.phpt diff -u php-src/ext/standard/tests/class_object/get_parent_class_error_001.phpt:1.3 php-src/ext/standard/tests/class_object/get_parent_class_error_001.phpt:1.4 --- php-src/ext/standard/tests/class_object/get_parent_class_error_001.phpt:1.3 Mon May 26 23:45:15 2008 +++ php-src/ext/standard/tests/class_object/get_parent_class_error_001.phpt Wed Jul 23 19:49:07 2008 @@ -24,6 +24,6 @@ -- Testing get_parent_class() function with more than expected no. of arguments -- -Warning: Wrong parameter count for get_parent_class() in %s on line 15 +Warning: get_parent_class() expects at most 1 parameter, 2 given in %s on line %d NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/class_object/is_a_error_001.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/standard/tests/class_object/is_a_error_001.phpt diff -u php-src/ext/standard/tests/class_object/is_a_error_001.phpt:1.4 php-src/ext/standard/tests/class_object/is_a_error_001.phpt:1.5 --- php-src/ext/standard/tests/class_object/is_a_error_001.phpt:1.4 Thu Jun 26 11:07:14 2008 +++ php-src/ext/standard/tests/class_object/is_a_error_001.phpt Wed Jul 23 19:49:07 2008 @@
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS
janiWed Jul 23 19:50:47 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: 80 chars per line.. http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.214r2=1.2027.2.547.2.965.2.215diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.214 php-src/NEWS:1.2027.2.547.2.965.2.215 --- php-src/NEWS:1.2027.2.547.2.965.2.214 Wed Jul 23 18:50:37 2008 +++ php-src/NEWSWed Jul 23 19:50:47 2008 @@ -32,11 +32,13 @@ . Improved checks for callbacks. (Marcus) . Added __DIR__ constant. (Lars Strojny) . Added PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION, -PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants. (Pierre) - . Added new error modes E_USER_DEPRECATED and E_DEPRECATED which is used to inform -about stuff to be dropped in future PHP versions. (Lars Strojny, Felipe, Marcus) - . Added request_order INI variable to control specifically $_REQUEST behavior. -(Stas) +PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants. +(Pierre) + . Added new error modes E_USER_DEPRECATED and E_DEPRECATED. +E_DEPRECATED is used to inform about stuff being scheduled for removal +in future PHP versions. (Lars Strojny, Felipe, Marcus) + . Added request_order INI variable to control specifically $_REQUEST +behavior. (Stas) . Added support for exception linking. (Marcus) . Added ability to handle exceptions in destructors. (Marcus) @@ -87,7 +89,7 @@ time of script repeated several times. (Dmitry) - Improved streams: - . Fixed potentially confusing error message on failure when no errors are logged (Greg) + . Fixed confusing error message on failure when no errors are logged. (Greg) . Added stream_supports_lock() function. (Benjamin Schulz) . Added ignore_errors option to http fopen wrapper. (David Zulke, Sara) . Added context parameter for copy() function. (Sara) @@ -123,9 +125,9 @@ - Improved Zend Engine: . Added compact handler for Zend MM storage. (Dmitry) . Added + and * specifiers to zend_parse_parameters(). (Andrei) - . Added concept of delayed early binding that allows opcode caches to perform -class declaration (early and/or run-time binding) in exactly the same order -as vanilla PHP. (Dmitry) + . Added concept of delayed early binding that allows opcode caches to +perform class declaration (early and/or run-time binding) in exactly +the same order as vanilla PHP. (Dmitry) - Added new date/time functionality: (Derick) . date_parse_from_format(): Parse date/time strings according to a format. @@ -156,7 +158,7 @@ . support for diffing date/times through date_diff() / DateTime::diff(). . support for adding/subtracting weekdays with strtotime() and DateTime::modify(). - . added DateInterval class to represent the difference between two date/times. + . DateInterval class to represent the difference between two date/times. . support for parsing ISO intervals for use with DateInterval. . date_add() / DateTime::add(), date_sub() / DateTime::sub() for applying an interval to an existing date/time. @@ -165,9 +167,9 @@ around the current day. . support for xth weekday of and last weekday of phrases to be used with months - like in last saturday of februari 2008. - . added the DatePeriod class, that supports iterating over a DateTime object -applying a DateInterval on each iteration, up to an end date or limited by -a maximum number of occurences. + . DatePeriod class which supports iterating over a DateTime object applying +DateInterval on each iteration, up to an end date or limited by maximum +number of occurences. - Added hash_copy() function. (Tony) - Added sha224 hash algorithm to the hash extension. (Scott) @@ -196,7 +198,8 @@ - Added OCI8 SQLT_AFC (aka CHAR datatype) support to oci_bind_by_name. (Chris Jones) - Added PREG_BAD_UTF8_OFFSET_ERROR constant. (Nuno) -- Added native support for asinh(), acosh(), atanh(), log1p() and expm1(). (Kalle) +- Added native support for asinh(), acosh(), atanh(), log1p() and expm1(). + (Kalle) - Added inet_pton() and inet_ntop() also for Windows platforms. (Kalle) - Added mcrypt_create_iv() also for Windows platforms. (Pierre) @@ -204,26 +207,27 @@ to different characters with cp1251 and cp866. (Scott) - Fixed an issue in date() where a : was printed for the O modifier after a P modifier was used. (Derick) -- Fixed an issue where exec() on Windows would eat the first and last double quotes. - (Scott) +- Fixed exec() on Windows to not eat the first and last double quotes. (Scott) - Fixed PECL bug #12794 (PDOStatement-nextRowset() doesn¿t work). (Johannes) - Fixed PECL bug #12431 (OCI8 ping functionality is broken). (Oracle Corp.) - Fixed PECL bug #12401 (Add support for ATTR_FETCH_TABLE_NAMES). (Johannes) -- Fixed bug #45571 (ReflectionClass::export() shows superclasses'
Re: [PHP-CVS] cvs: php-src /ext/standard array.c
Felipe Pena kirjoitti: Em Qua, 2008-07-23 às 20:11 +0300, Jani Taskinen escreveu: Did you read my comment in that bug report? Yes, but after the commit. ...and? :) --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/standard array.c
Em Qua, 2008-07-23 às 22:53 +0300, Jani Taskinen escreveu: Felipe Pena kirjoitti: Em Qua, 2008-07-23 às 20:11 +0300, Jani Taskinen escreveu: Did you read my comment in that bug report? Yes, but after the commit. ...and? :) --Jani I'll fix it again in some minutes... (goto home;) Thanks. -- 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 /ext/intl/tests ut_common.inc
stasWed Jul 23 20:21:23 2008 UTC Modified files: /php-src/ext/intl/tests ut_common.inc Log: typoes http://cvs.php.net/viewvc.cgi/php-src/ext/intl/tests/ut_common.inc?r1=1.4r2=1.5diff_format=u Index: php-src/ext/intl/tests/ut_common.inc diff -u php-src/ext/intl/tests/ut_common.inc:1.4 php-src/ext/intl/tests/ut_common.inc:1.5 --- php-src/ext/intl/tests/ut_common.inc:1.4Wed Jul 23 18:45:10 2008 +++ php-src/ext/intl/tests/ut_common.incWed Jul 23 20:21:23 2008 @@ -352,8 +352,8 @@ return $GLOBALS['oo-mode'] ? Locale::lookup( $lang_tag_arr,$loc_range,$isCanonical,$default_loc ) : locale_lookup( $lang_tag_arr,$loc_range,$isCanonical,$default_loc ); } function ut_loc_accept_http($http) { - return $GLOBALS['oo-mode'] ? Locale::acceptFromHttp($http):locale_accept_from_http($http);^ - + return $GLOBALS['oo-mode'] ? Locale::acceptFromHttp($http):locale_accept_from_http($http); +} /* MessageFormatter functions */ function ut_msgfmt_create( $locale, $pattern) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/intl/locale locale_methods.c /ext/intl/tests locale_accept.phpt locale_compose_locale.phpt
stasWed Jul 23 20:22:28 2008 UTC Modified files: /php-src/ext/intl/localelocale_methods.c /php-src/ext/intl/tests locale_accept.phpt locale_compose_locale.phpt Log: implement bug #14266 http://cvs.php.net/viewvc.cgi/php-src/ext/intl/locale/locale_methods.c?r1=1.3r2=1.4diff_format=u Index: php-src/ext/intl/locale/locale_methods.c diff -u php-src/ext/intl/locale/locale_methods.c:1.3 php-src/ext/intl/locale/locale_methods.c:1.4 --- php-src/ext/intl/locale/locale_methods.c:1.3Wed Jul 23 18:45:10 2008 +++ php-src/ext/intl/locale/locale_methods.cWed Jul 23 20:22:28 2008 @@ -34,6 +34,7 @@ #include zend.h #include php.h #include main/php_ini.h +#include ext/standard/php_smart_str.h ZEND_EXTERN_MODULE_GLOBALS( intl ) @@ -55,6 +56,7 @@ #define EXTLANG_KEYNAME_LEN 10 #define PRIVATE_KEYNAME_LEN 11 +#define LOC_NOT_FOUND 1 /* Based on IANA registry at the time of writing this code * */ @@ -633,12 +635,10 @@ } /* }}} */ -/* {{{ -* proto static string Locale::getDisplayVariant($locale, $in_locale = null) +/* {{{ proto static string Locale::getDisplayVariant($locale, $in_locale = null) * gets the variant for the $locale in $in_locale or default_locale }}} */ -/* {{{ -* proto static string get_display_variant($locale, $in_locale = null) +/* {{{ proto static string get_display_variant($locale, $in_locale = null) * gets the variant for the $locale in $in_locale or default_locale */ PHP_FUNCTION(locale_get_display_variant) @@ -647,13 +647,11 @@ } /* }}} */ - /* {{{ - * proto static string[] getKeywords(string $locale) + /* {{{ proto static string[] getKeywords(string $locale) * return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array (doh!) * }}}*/ - /* {{{ - * proto static string[] locale_get_keywords(string $locale) + /* {{{ proto static string[] locale_get_keywords(string $locale) * return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array (doh!) */ @@ -731,12 +729,10 @@ } /* }}} */ - /* {{{ - * proto static string Locale::canonicalize($locale) + /* {{{ proto static string Locale::canonicalize($locale) * @return string the canonicalized locale * }}} */ - /* {{{ - * proto static string locale_canonicalize(Locale $loc, string $locale) + /* {{{ proto static string locale_canonicalize(Locale $loc, string $locale) * @param string $locale The locale string to canonicalize */ PHP_FUNCTION(locale_canonicalize) @@ -745,335 +741,272 @@ } /* }}} */ -#define FREE_VALUE() if(Z_TYPE_PP(ele_value) == IS_UNICODE) { efree(value); } -/* {{{ append_key_value +/* {{{ append_convert_to_string +*/ +static int append_convert_to_string(zval **val, char **strval, int *str_len) +{ + if(Z_TYPE_PP(val) == IS_UNICODE) { + *strval = zend_unicode_to_ascii(Z_USTRVAL_PP(val), Z_USTRLEN_PP(val)); + *str_len = strlen(*strval); + return 1; + } else if(Z_TYPE_PP(val) == IS_STRING) { + *strval = Z_STRVAL_PP(val); + *str_len = Z_STRLEN_PP(val); + return 0; + } + *strval = NULL; + return 0; +} +/* }}} */ + +/* {{{ append_key_value * Internal function which is called from locale_compose * gets the value for the key_name and appends to the loc_name -* returns 1 if successful , -1 if not found , +* returns 1 if successful , -1 if not found , * 0 if array element is not a string , -2 if buffer-overflow */ -static int append_key_value(char* loc_name, int loc_name_capacity , HashTable* hash_arr, char* key_name TSRMLS_DC) +static int append_key_value(smart_str* loc_name, HashTable* hash_arr, char* key_name) { -int needed_size = -1; -zval** ele_value = NULL; - -intl_error_reset( NULL TSRMLS_CC ); - -if( zend_hash_find( hash_arr , key_name , strlen(key_name) + 1 , (void **)ele_value ) == SUCCESS || - zend_ascii_hash_find( hash_arr , key_name , strlen(key_name) + 1 , (void **)ele_value ) == SUCCESS) { - char *value; - int value_len; - -if( Z_TYPE_PP(ele_value) == IS_UNICODE ){ - value = zend_unicode_to_ascii(Z_USTRVAL_PP(ele_value), Z_USTRLEN_PP(ele_value)); - value_len = strlen(value); - } else if( Z_TYPE_PP(ele_value) == IS_STRING ) { - value = Z_STRVAL_PP(ele_value); - value_len = Z_STRLEN_PP(ele_value); - } else { -//element value is not a string -return 0; -} -if( strcmp(key_name , LOC_LANG_TAG) != 0 -strcmp(key_name ,
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests array_intersect_ukey_error.phpt array_intersect_ukey_variation1.phpt array_intersect_ukey_variation2.phpt array_intersect_ukey_variation3.phpt array
lstrojnyWed Jul 23 20:37:23 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests array_intersect_ukey_error.phpt array_intersect_ukey_variation1.phpt array_intersect_ukey_variation2.phpt array_intersect_ukey_variation3.phpt array_intersect_ukey_variation4.phpt array_intersect_ukey_variation5.phpt array_intersect_ukey_variation6.phpt array_intersect_ukey_variation7.phpt array_intersect_ukey_variation8.phpt array_intersect_ukey_variation9.phpt Log: array_intersect_ukey tests by Sanjay Mantoor http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array_intersect_ukey_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array_intersect_ukey_error.phpt +++ php-src/ext/standard/tests/array_intersect_ukey_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array_intersect_ukey_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array_intersect_ukey_variation1.phpt +++ php-src/ext/standard/tests/array_intersect_ukey_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array_intersect_ukey_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array_intersect_ukey_variation2.phpt +++ php-src/ext/standard/tests/array_intersect_ukey_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array_intersect_ukey_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array_intersect_ukey_variation3.phpt +++ php-src/ext/standard/tests/array_intersect_ukey_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array_intersect_ukey_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array_intersect_ukey_variation4.phpt +++ php-src/ext/standard/tests/array_intersect_ukey_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array_intersect_ukey_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array_intersect_ukey_variation5.phpt +++ php-src/ext/standard/tests/array_intersect_ukey_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array_intersect_ukey_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array_intersect_ukey_variation6.phpt +++ php-src/ext/standard/tests/array_intersect_ukey_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array_intersect_ukey_variation7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array_intersect_ukey_variation7.phpt +++ php-src/ext/standard/tests/array_intersect_ukey_variation7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array_intersect_ukey_variation8.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array_intersect_ukey_variation8.phpt +++ php-src/ext/standard/tests/array_intersect_ukey_variation8.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array_intersect_ukey_variation9.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array_intersect_ukey_variation9.phpt +++ php-src/ext/standard/tests/array_intersect_ukey_variation9.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests array_intersect_ukey_error.phpt array_intersect_ukey_variation1.phpt array_intersect_ukey_variation2.phpt array_intersect_ukey_variation3.phpt array_intersec
lstrojnyWed Jul 23 20:38:10 2008 UTC Modified files: /php-src/ext/standard/tests array_intersect_ukey_error.phpt array_intersect_ukey_variation1.phpt array_intersect_ukey_variation2.phpt array_intersect_ukey_variation3.phpt array_intersect_ukey_variation4.phpt array_intersect_ukey_variation5.phpt array_intersect_ukey_variation6.phpt array_intersect_ukey_variation7.phpt array_intersect_ukey_variation8.phpt array_intersect_ukey_variation9.phpt Log: array_intersect_ukey tests by Sanjay Mantoor http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array_intersect_ukey_error.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array_intersect_ukey_error.phpt diff -u /dev/null php-src/ext/standard/tests/array_intersect_ukey_error.phpt:1.2 --- /dev/null Wed Jul 23 20:38:10 2008 +++ php-src/ext/standard/tests/array_intersect_ukey_error.phpt Wed Jul 23 20:38:10 2008 @@ -0,0 +1,56 @@ +--TEST-- +Test array_intersect_ukey() function : error conditions +--FILE-- +?php +/* Prototype : array array_intersect_ukey(array arr1, array arr2 [, array ...], callback key_compare_func) + * Description: Computes the intersection of arrays using a callback function on the keys for comparison. + * Source code: ext/standard/array.c + */ + +echo *** Testing array_intersect_ukey() : error conditions ***\n; + +//Initialise arguments +$array1 = array('blue' = 1, 'red' = 2, 'green' = 3, 'purple' = 4); +$array2 = array('green' = 5, 'blue' = 6, 'yellow' = 7, 'cyan' = 8); + +//Call back function +function key_compare_func($key1, $key2) +{ +if ($key1 == $key2) +return 0; +else +return ($key1 $key2)? 1:-1; +} + +//Test array_intersect_ukey with one more than the expected number of arguments +echo \n-- Testing array_intersect_ukey() function with more than expected no. of arguments --\n; +$extra_arg = 10; +var_dump( array_intersect_ukey($array1, $array2, 'key_compare_func',$extra_arg) ); + +// Testing array_intersect_ukey with one less than the expected number of arguments +echo \n-- Testing array_intersect_ukey() function with less than expected no. of arguments --\n; +var_dump( array_intersect_ukey($array1, $array2) ); + +// Testing array_intersect_ukey with no arguments +echo \n-- Testing array_intersect_ukey() function with no arguments --\n; +var_dump( array_intersect_ukey() ); +? +===DONE=== +--EXPECTF-- +*** Testing array_intersect_ukey() : error conditions *** + +-- Testing array_intersect_ukey() function with more than expected no. of arguments -- + +Warning: array_intersect_ukey() expects parameter 4 to be a valid callback, no array or string given in %s on line %d +NULL + +-- Testing array_intersect_ukey() function with less than expected no. of arguments -- + +Warning: array_intersect_ukey(): at least 3 parameters are required, 2 given in %s on line %d +NULL + +-- Testing array_intersect_ukey() function with no arguments -- + +Warning: array_intersect_ukey(): at least 3 parameters are required, 0 given in %s on line %d +NULL +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array_intersect_ukey_variation1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array_intersect_ukey_variation1.phpt diff -u /dev/null php-src/ext/standard/tests/array_intersect_ukey_variation1.phpt:1.2 --- /dev/null Wed Jul 23 20:38:10 2008 +++ php-src/ext/standard/tests/array_intersect_ukey_variation1.phpt Wed Jul 23 20:38:10 2008 @@ -0,0 +1,320 @@ +--TEST-- +Test array_intersect_ukey() function : usage variation - Passing unexpected values to first argument +--FILE-- +?php +/* Prototype : array array_intersect_ukey(array arr1, array arr2 [, array ...], callback key_compare_func) + * Description: Computes the intersection of arrays using a callback function on the keys for comparison. + * Source code: ext/standard/array.c + */ + +echo *** Testing array_intersect_ukey() : usage variation ***\n; + +//Initialise arguments +$array2 = array('green' = 5, 'blue' = 6, 'yellow' = 7, 'cyan' = 8); +$array3 = array('green' = 5, 'cyan' = 8); + +//Call back function +function key_compare_func($key1, $key2) +{ +if ($key1 == $key2) +return 0; +else +return ($key1 $key2)? 1:-1; +} + +//get an unset variable +$unset_var = 10; +unset ($unset_var); + +//resource variable +$fp = fopen(__FILE__, r); + +// define some classes +class classWithToString +{ + public function __toString() { + return Class A object; + } +} + +class classWithoutToString +{ +} + +// heredoc string +$heredoc = EOT +hello world +EOT; + +//array of values to iterate over +$inputs
[PHP-CVS] cvs: php-src /ext/pgsql config.m4
hholzgraWed Jul 23 21:41:27 2008 UTC Modified files: /php-src/ext/pgsql config.m4 Log: corrected library search path order in tests http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/config.m4?r1=1.53r2=1.54diff_format=u Index: php-src/ext/pgsql/config.m4 diff -u php-src/ext/pgsql/config.m4:1.53 php-src/ext/pgsql/config.m4:1.54 --- php-src/ext/pgsql/config.m4:1.53Wed Jul 23 09:27:01 2008 +++ php-src/ext/pgsql/config.m4 Wed Jul 23 21:41:27 2008 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.53 2008/07/23 09:27:01 hholzgra Exp $ +dnl $Id: config.m4,v 1.54 2008/07/23 21:41:27 hholzgra Exp $ dnl PHP_ARG_WITH(pgsql,for PostgreSQL support, @@ -66,7 +66,7 @@ AC_DEFINE(HAVE_PGSQL,1,[Whether to build PostgreSQL support or not]) old_LIBS=$LIBS old_LDFLAGS=$LDFLAGS - LDFLAGS=$LDFLAGS -L$PGSQL_LIBDIR + LDFLAGS=-L$PGSQL_LIBDIR $LDFLAGS AC_CHECK_LIB(pq, PQescapeString,AC_DEFINE(HAVE_PQESCAPE,1,[PostgreSQL 7.2.0 or later])) AC_CHECK_LIB(pq, PQunescapeBytea,AC_DEFINE(HAVE_PQUNESCAPEBYTEA,1,[PostgreSQL 7.3.0 or later])) AC_CHECK_LIB(pq, PQsetnonblocking,AC_DEFINE(HAVE_PQSETNONBLOCKING,1,[PostgreSQL 7.0.x or later])) -- 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/pgsql config.m4
hholzgraWed Jul 23 21:44:25 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pgsql config.m4 Log: MFH: corrected library search path order in tests http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/config.m4?r1=1.46.2.1.2.5.2.1r2=1.46.2.1.2.5.2.2diff_format=u Index: php-src/ext/pgsql/config.m4 diff -u php-src/ext/pgsql/config.m4:1.46.2.1.2.5.2.1 php-src/ext/pgsql/config.m4:1.46.2.1.2.5.2.2 --- php-src/ext/pgsql/config.m4:1.46.2.1.2.5.2.1Wed Jul 23 00:17:19 2008 +++ php-src/ext/pgsql/config.m4 Wed Jul 23 21:44:25 2008 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.46.2.1.2.5.2.1 2008/07/23 00:17:19 hholzgra Exp $ +dnl $Id: config.m4,v 1.46.2.1.2.5.2.2 2008/07/23 21:44:25 hholzgra Exp $ dnl PHP_ARG_WITH(pgsql,for PostgreSQL support, @@ -66,7 +66,7 @@ AC_DEFINE(HAVE_PGSQL,1,[Whether to build PostgreSQL support or not]) old_LIBS=$LIBS old_LDFLAGS=$LDFLAGS - LDFLAGS=$LDFLAGS -L$PGSQL_LIBDIR + LDFLAGS=-L$PGSQL_LIBDIR $LDFLAGS AC_CHECK_LIB(pq, PQescapeString,AC_DEFINE(HAVE_PQESCAPE,1,[PostgreSQL 7.2.0 or later])) AC_CHECK_LIB(pq, PQunescapeBytea,AC_DEFINE(HAVE_PQUNESCAPEBYTEA,1,[PostgreSQL 7.3.0 or later])) AC_CHECK_LIB(pq, PQsetnonblocking,AC_DEFINE(HAVE_PQSETNONBLOCKING,1,[PostgreSQL 7.0.x or later])) -- 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/pdo_sqlite config.m4 pdo_sqlite.c post-bundle.sh /ext/pdo_sqlite/libsqlite sqlite3.c sqlite3.h sqlite3ext.h
scottmacThu Jul 24 00:24:04 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/pdo_sqlite/libsqlite sqlite3.c sqlite3.h sqlite3ext.h Removed files: /php-src/ext/pdo_sqlite post-bundle.sh Modified files: /php-src/ext/pdo_sqlite config.m4 pdo_sqlite.c Log: Update pdo_sqlite to use the amalgamation, much easier to upgrade / maintain. Also kill useless PECL version tag in MINFO. Will probably be chastised by Jani for doing branch first... http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/config.m4?r1=1.26.2.9.2.7.2.1r2=1.26.2.9.2.7.2.2diff_format=u Index: php-src/ext/pdo_sqlite/config.m4 diff -u php-src/ext/pdo_sqlite/config.m4:1.26.2.9.2.7.2.1 php-src/ext/pdo_sqlite/config.m4:1.26.2.9.2.7.2.2 --- php-src/ext/pdo_sqlite/config.m4:1.26.2.9.2.7.2.1 Fri Mar 7 10:47:23 2008 +++ php-src/ext/pdo_sqlite/config.m4Thu Jul 24 00:24:03 2008 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.26.2.9.2.7.2.1 2008/03/07 10:47:23 scottmac Exp $ +dnl $Id: config.m4,v 1.26.2.9.2.7.2.2 2008/07/24 00:24:03 scottmac Exp $ dnl config.m4 for extension pdo_sqlite dnl vim:et:sw=2:ts=2: @@ -71,20 +71,7 @@ PHP_NEW_EXTENSION(pdo_sqlite, $php_pdo_sqlite_sources_core, $ext_shared,,-I$pdo_inc_path) else # use bundled libs -pdo_sqlite_sources=sqlite/src/attach.c sqlite/src/auth.c sqlite/src/btree.c \ - sqlite/src/build.c sqlite/src/callback.c sqlite/src/date.c sqlite/src/delete.c sqlite/src/expr.c \ - sqlite/src/func.c sqlite/src/hash.c sqlite/src/insert.c sqlite/src/legacy.c \ - sqlite/src/main.c sqlite/src/os_unix.c sqlite/src/os_win.c sqlite/src/os.c \ - sqlite/src/pager.c sqlite/src/pragma.c sqlite/src/prepare.c \ - sqlite/src/printf.c sqlite/src/random.c sqlite/src/select.c \ - sqlite/src/table.c sqlite/src/tokenize.c sqlite/src/analyze.c sqlite/src/complete.c \ - sqlite/src/trigger.c sqlite/src/update.c sqlite/src/utf.c sqlite/src/util.c \ - sqlite/src/vacuum.c sqlite/src/vdbeapi.c sqlite/src/vdbeaux.c sqlite/src/vdbe.c \ - sqlite/src/vdbemem.c sqlite/src/where.c sqlite/src/parse.c sqlite/src/opcodes.c \ - sqlite/src/alter.c sqlite/src/vdbefifo.c sqlite/src/vtab.c sqlite/src/loadext.c \ - sqlite/src/btmutex.c sqlite/src/fault.c sqlite/src/journal.c \ - sqlite/src/malloc.c sqlite/src/mem1.c sqlite/src/mutex.c sqlite/src/mutex_unix.c \ - sqlite/src/mutex_w32.c sqlite/src/vdbeblob.c +pdo_sqlite_sources=libsqlite/sqlite3.c if test $enable_maintainer_zts = yes; then threadsafe_flag=-DTHREADSAFE=1 @@ -94,33 +81,11 @@ PHP_NEW_EXTENSION(pdo_sqlite, $php_pdo_sqlite_sources_core $pdo_sqlite_sources, -$ext_shared,,-I$ext_srcdir/sqlite/src -DPDO_SQLITE_BUNDLED=1 -DSQLITE_OMIT_CURSOR $threadsafe_flag -I$pdo_inc_path) +$ext_shared,,-I$ext_srcdir/libsqlite -DPDO_SQLITE_BUNDLED=1 -DSQLITE_OMIT_CURSOR $threadsafe_flag -I$pdo_inc_path) PHP_SUBST(PDO_SQLITE_SHARED_LIBADD) - PHP_ADD_BUILD_DIR($ext_builddir/sqlite/src, 1) - AC_CHECK_SIZEOF(char *,4) - AC_DEFINE(SQLITE_PTR_SZ, SIZEOF_CHAR_P, [Size of a pointer]) - PDO_SQLITE_VERSION=`cat $ext_srcdir/sqlite/VERSION | sed 's/[^0-9.]//g'` - PDO_SQLITE_VERSION_NUMBER=`echo $PDO_SQLITE_VERSION | $AWK -F. '{printf(%d%03d%03d, $1, $2, $3)}'` - sed -e s/--VERS--/$PDO_SQLITE_VERSION/ -e s/--VERSION-NUMBER--/$PDO_SQLITE_VERSION_NUMBER/ $ext_srcdir/sqlite/src/sqlite.h.in $ext_srcdir/sqlite/src/sqlite3.h + PHP_ADD_BUILD_DIR($ext_builddir/libsqlite, 1) - touch $ext_srcdir/sqlite/src/parse.c $ext_srcdir/sqlite/src/parse.h - - if test $ext_shared = no || test $ext_srcdir != $abs_srcdir; then -echo '#include php_config.h' $ext_srcdir/sqlite/src/config.h - else -echo #include \$abs_builddir/config.h\ $ext_srcdir/sqlite/src/config.h - fi - cat $ext_srcdir/sqlite/src/config.h EOF -#if ZTS -# define THREADSAFE 1 -#endif -#if !ZEND_DEBUG -# define NDEBUG -#endif -/* discourage foolishness */ -#define sqlite3_temp_directory sqlite3_temp_directory_unsafe_except_in_minit -EOF AC_CHECK_FUNCS(usleep nanosleep) AC_CHECK_HEADERS(time.h) fi http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/pdo_sqlite.c?r1=1.10.2.6.2.2.2.2r2=1.10.2.6.2.2.2.3diff_format=u Index: php-src/ext/pdo_sqlite/pdo_sqlite.c diff -u php-src/ext/pdo_sqlite/pdo_sqlite.c:1.10.2.6.2.2.2.2 php-src/ext/pdo_sqlite/pdo_sqlite.c:1.10.2.6.2.2.2.3 --- php-src/ext/pdo_sqlite/pdo_sqlite.c:1.10.2.6.2.2.2.2Mon Dec 31 07:17:12 2007 +++ php-src/ext/pdo_sqlite/pdo_sqlite.c Thu Jul 24 00:24:03 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pdo_sqlite.c,v 1.10.2.6.2.2.2.2 2007/12/31 07:17:12 sebastian Exp $ */ +/* $Id: pdo_sqlite.c,v 1.10.2.6.2.2.2.3 2008/07/24 00:24:03 scottmac Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@
[PHP-CVS] cvs: php-src /ext/standard array.c
felipe Thu Jul 24 03:06:17 2008 UTC Modified files: /php-src/ext/standard array.c Log: - Improved parameter handling http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.456r2=1.457diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.456 php-src/ext/standard/array.c:1.457 --- php-src/ext/standard/array.c:1.456 Wed Jul 23 16:27:16 2008 +++ php-src/ext/standard/array.cThu Jul 24 03:06:16 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.456 2008/07/23 16:27:16 felipe Exp $ */ +/* $Id: array.c,v 1.457 2008/07/24 03:06:16 felipe Exp $ */ #include php.h #include php_ini.h @@ -3057,28 +3057,35 @@ int (*intersect_data_compare_func)(zval **, zval ** TSRMLS_DC) = NULL; zend_bool ok; zval **data; + int req_args; + char *param_spec; /* Get the argument count */ argc = ZEND_NUM_ARGS(); if (data_compare_type == INTERSECT_COMP_DATA_USER) { - if (argc 3) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, at least 3 parameters are required, %d given, ZEND_NUM_ARGS()); - return; - } - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +f, args, argc, BG(user_compare_fci), BG(user_compare_fci_cache)) == FAILURE) { - return; - } + /* INTERSECT_COMP_DATA_USER - array_uintersect_assoc() */ + req_args = 3; + param_spec = +f; intersect_data_compare_func = zval_user_compare; } else { - if (argc 2 || zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +, args, argc) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, at least 2 parameters are required, %d given, ZEND_NUM_ARGS()); - return; - } + /* INTERSECT_COMP_DATA_NONE - array_intersect_key() + INTERSECT_COMP_DATA_INTERNAL - array_intersect_assoc() */ + req_args = 2; + param_spec = +; + if (data_compare_type == INTERSECT_COMP_DATA_INTERNAL) { intersect_data_compare_func = zval_compare; } } + + if (argc req_args) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, at least %d parameters are required, %d given, req_args, argc); + return; + } + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, param_spec, args, argc, BG(user_compare_fci), BG(user_compare_fci_cache)) == FAILURE) { + return; + } for (i = 0; i argc; i++) { if (Z_TYPE_PP(args[i]) != IS_ARRAY) { -- 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 array.c
felipe Thu Jul 24 03:07:23 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard array.c Log: - MFH: Improved parameter handling http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.37.2.36r2=1.308.2.21.2.37.2.37diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.21.2.37.2.36 php-src/ext/standard/array.c:1.308.2.21.2.37.2.37 --- php-src/ext/standard/array.c:1.308.2.21.2.37.2.36 Wed Jul 23 16:28:46 2008 +++ php-src/ext/standard/array.cThu Jul 24 03:07:22 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.308.2.21.2.37.2.36 2008/07/23 16:28:46 felipe Exp $ */ +/* $Id: array.c,v 1.308.2.21.2.37.2.37 2008/07/24 03:07:22 felipe Exp $ */ #include php.h #include php_ini.h @@ -2833,28 +2833,35 @@ int (*intersect_data_compare_func)(zval **, zval ** TSRMLS_DC) = NULL; zend_bool ok; zval **data; + int req_args; + char *param_spec; /* Get the argument count */ argc = ZEND_NUM_ARGS(); if (data_compare_type == INTERSECT_COMP_DATA_USER) { - if (argc 3) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, at least 3 parameters are required, %d given, ZEND_NUM_ARGS()); - return; - } - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +f, args, argc, BG(user_compare_fci), BG(user_compare_fci_cache)) == FAILURE) { - return; - } + /* INTERSECT_COMP_DATA_USER - array_uintersect_assoc() */ + req_args = 3; + param_spec = +f; intersect_data_compare_func = zval_user_compare; } else { - if (argc 2 || zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +, args, argc) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, at least 2 parameters are required, %d given, ZEND_NUM_ARGS()); - return; - } + /* INTERSECT_COMP_DATA_NONE - array_intersect_key() + INTERSECT_COMP_DATA_INTERNAL - array_intersect_assoc() */ + req_args = 2; + param_spec = +; + if (data_compare_type == INTERSECT_COMP_DATA_INTERNAL) { intersect_data_compare_func = zval_compare; } } + + if (argc req_args) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, at least %d parameters are required, %d given, req_args, argc); + return; + } + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, param_spec, args, argc, BG(user_compare_fci), BG(user_compare_fci_cache)) == FAILURE) { + return; + } for (i = 0; i argc; i++) { if (Z_TYPE_PP(args[i]) != IS_ARRAY) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/array each.phpt each_error.phpt
felipe Thu Jul 24 03:30:02 2008 UTC Modified files: /php-src/ext/standard/tests/array each.phpt each_error.phpt Log: - Fixed tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/each.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/standard/tests/array/each.phpt diff -u php-src/ext/standard/tests/array/each.phpt:1.4 php-src/ext/standard/tests/array/each.phpt:1.5 --- php-src/ext/standard/tests/array/each.phpt:1.4 Mon May 26 23:35:48 2008 +++ php-src/ext/standard/tests/array/each.phpt Thu Jul 24 03:30:02 2008 @@ -692,10 +692,10 @@ *** Testing error conditions *** -Warning: Wrong parameter count for each() in %s on line %d +Warning: each() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for each() in %s on line %d +Warning: each() expects exactly 1 parameter, 2 given in %s on line %d NULL Warning: Variable passed to each() is not an array or object in %s on line %d http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/each_error.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/standard/tests/array/each_error.phpt diff -u php-src/ext/standard/tests/array/each_error.phpt:1.3 php-src/ext/standard/tests/array/each_error.phpt:1.4 --- php-src/ext/standard/tests/array/each_error.phpt:1.3Mon May 26 23:35:48 2008 +++ php-src/ext/standard/tests/array/each_error.phptThu Jul 24 03:30:02 2008 @@ -32,11 +32,11 @@ -- Testing each() function with Zero arguments -- -Warning: Wrong parameter count for each() in %s on line %d +Warning: each() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Testing each() function with more than expected no. of arguments -- -Warning: Wrong parameter count for each() in %s on line %d +Warning: each() expects exactly 1 parameter, 2 given in %s on line %d NULL Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php