[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Sat Dec 13 01:34:03 2008 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3256r2=1.3257diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.3256 php-src/ChangeLog:1.3257 --- php-src/ChangeLog:1.3256Fri Dec 12 01:32:51 2008 +++ php-src/ChangeLog Sat Dec 13 01:34:02 2008 @@ -1,3 +1,135 @@ +2008-12-12 Andrei Zmievski and...@gravitonic.com + +* (PHP_5_3) + NEWS + ext/standard/tests/array/array_unique_error.phpt + ext/standard/tests/array/array_unique_variation2.phpt + ext/standard/tests/array/array_unique_variation6.phpt + ext/standard/tests/array/array_unique_variation8.phpt: + Fix tests, add NEWS entry. + +2008-12-12 Nuno Lopes nunoplo...@sapo.pt + +* configure.in + main/spprintf.c: + MFB + +* (PHP_5_3) + ext/pdo/pdo_stmt.c: + we do not need the strndup() now that php_stream_printf() handles non-null + terminated strings correctly + +* (PHP_5_3) + configure.in + main/spprintf.c: + make *printf() functions do not read strings past their specified length + (if any) + +2008-12-12 Scott MacVicar sc...@macvicar.net + +* (PHP_5_3) + NEWS: + BFN + +* (PHP_5_3) + ext/json/json.c + ext/json/tests/001.phpt + ext/json/tests/bug42090.phpt: + MFH Fix bug #45989 - json_decode() doesn't return NULL on certain invalid + strings + +* ext/json/json.c + ext/json/tests/001.phpt + ext/json/tests/bug41504.phpt + ext/json/tests/bug42090.phpt + ext/json/tests/fail001.phpt: + Fix bug #45989 - json_decode() doesn't return NULL on certain invalid + strings + +2008-12-12 Johannes Schlüter johan...@schlueters.de + +* tests/strings/001.phpt: + Fix tests + +2008-12-12 Andrei Zmievski and...@gravitonic.com + +* ext/standard/array.c: + Add sort flags parameter to array_unique(). + +2008-12-12 Hannes Magnusson hannes.magnus...@gmail.com + +* (PHP_5_3) + NEWS + ext/bcmath/bcmath.c + ext/bcmath/bcmath.c + ext/dba/dba.c + ext/dba/dba.c + ext/exif/exif.c + ext/exif/exif.c + ext/gd/gd.c + ext/gd/gd.c + ext/ldap/ldap.c + ext/ldap/ldap.c: + Fixed bug#46847 (phpinfo() is missing some settings.) + +* (PHP_5_3) + NEWS: + BFN + +* (PHP_5_3) + ext/standard/file.c + ext/standard/tests/file/mkdir_rmdir_variation2.phpt + ext/standard/tests/file/mkdir_variation1-win32.phpt + ext/standard/tests/file/mkdir_variation1.phpt + ext/standard/tests/file/mkdir_variation5.phpt: + MFH: Fixed bug#46681 (mkdir() fails silently on PHP 5.3) + +* ext/standard/file.c + ext/standard/tests/file/mkdir_rmdir_variation2.phpt + ext/standard/tests/file/mkdir_variation1-win32.phpt + ext/standard/tests/file/mkdir_variation1.phpt + ext/standard/tests/file/mkdir_variation5.phpt: + Fixed bug#46681 (mkdir() fails silently on PHP 5.3) + +2008-12-12 Antony Dovgal t...@daylessday.org + +* (PHP_5_3) + ZendEngine2/tests/unset_cv06.phpt: + fix test + +2008-12-12 Pierre-Alain Joye pierre@gmail.com + +* ext/standard/info.c + ext/standard/winver.h: + - late MFB (sry): fix VC6 build + +2008-12-12 Rob Richards rricha...@ctindustries.net + +* (PHP_5_2) + NEWS: + fix entry + +* (PHP_5_2) + NEWS: + BFN + +* (PHP_5_2) + ext/xml/compat.c + ext/xml/compat.c + ext/xml/tests/bug46699.phpt + ext/xml/tests/bug46699.phpt: + MFH: fix bug #46699: (xml_parse crash when parser is namespace aware) + fix a couple warnings + add test + +* ext/xml/compat.c + ext/xml/tests/bug46699.phpt + ext/xml/tests/bug46699.phpt + ext/xml/tests/bug46699.phpt: + fix bug #46699: (xml_parse crash when parser is namespace aware) + fix a couple warnings + add test + 2008-12-11 Pierre-Alain Joye pierre@gmail.com * ext/mssql/php_mssql.c @@ -19485,7 +19617,7 @@ * sapi/litespeed/lsapi_main.c sapi/litespeed/lsapilib.c: - - Added missing $Id: ChangeLog,v 1.3256 2008/12/12 01:32:51 changelog Exp $ tags and nuked c++ comments + - Added missing $Id: ChangeLog,v 1.3257 2008/12/13 01:34:02 changelog Exp $ tags and nuked c++ comments * (PHP_5_3) ext/intl/locale/locale.c
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Sat Dec 13 01:34:10 2008 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1411r2=1.1412diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.1411 ZendEngine2/ChangeLog:1.1412 --- ZendEngine2/ChangeLog:1.1411Fri Dec 12 01:32:56 2008 +++ ZendEngine2/ChangeLog Sat Dec 13 01:34:10 2008 @@ -1,3 +1,9 @@ +2008-12-12 Antony Dovgal t...@daylessday.org + +* (PHP_5_3) + tests/unset_cv06.phpt: + fix test + 2008-12-11 Antony Dovgal t...@daylessday.org * tests/bug46665.phpt @@ -27025,7 +27031,7 @@ 2003-06-10 Jani Taskinen sni...@iki.fi * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.1411 2008/12/12 01:32:56 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.1412 2008/12/13 01:34:10 changelog Exp $ tag 2003-06-10 James Cox ja...@imajes.info @@ -28749,7 +28755,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.1411 2008/12/12 01:32:56 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.1412 2008/12/13 01:34:10 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky i...@prohost.org
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard file.c /ext/standard/tests/file mkdir_rmdir_variation2.phpt mkdir_variation1-win32.phpt mkdir_variation1.phpt mkdir_variation5.phpt
bjori Fri Dec 12 12:44:49 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard file.c /php-src/ext/standard/tests/filemkdir_variation1.phpt mkdir_variation1-win32.phpt mkdir_variation5.phpt mkdir_rmdir_variation2.phpt Log: MFH: Fixed bug#46681 (mkdir() fails silently on PHP 5.3) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.28.2.25r2=1.409.2.6.2.28.2.26diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6.2.28.2.25 php-src/ext/standard/file.c:1.409.2.6.2.28.2.26 --- php-src/ext/standard/file.c:1.409.2.6.2.28.2.25 Wed Nov 26 04:19:20 2008 +++ php-src/ext/standard/file.c Fri Dec 12 12:44:48 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.409.2.6.2.28.2.25 2008/11/26 04:19:20 lbarnaud Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.28.2.26 2008/12/12 12:44:48 bjori Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1355,7 +1355,7 @@ return -1; } - if ((ret = VCWD_MKDIR(dir, (mode_t)mode)) 0 (options REPORT_ERRORS) == 1) { + if ((ret = VCWD_MKDIR(dir, (mode_t)mode)) 0 (options REPORT_ERRORS)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, strerror(errno)); } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir_variation1.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/file/mkdir_variation1.phpt diff -u php-src/ext/standard/tests/file/mkdir_variation1.phpt:1.1.4.2 php-src/ext/standard/tests/file/mkdir_variation1.phpt:1.1.4.3 --- php-src/ext/standard/tests/file/mkdir_variation1.phpt:1.1.4.2 Wed Nov 26 10:10:17 2008 +++ php-src/ext/standard/tests/file/mkdir_variation1.phpt Fri Dec 12 12:44:48 2008 @@ -2,7 +2,6 @@ Test mkdir() function : usage variation: try invalid pathname --CREDITS-- Dave Kelsey d_kel...@uk.ibm.com ---XFAIL-- --SKIPIF-- ?php if(substr(PHP_OS, 0, 3) == WIN) @@ -119,4 +118,4 @@ --single space-- directory created -===DONE=== \ No newline at end of file +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir_variation1-win32.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/file/mkdir_variation1-win32.phpt diff -u php-src/ext/standard/tests/file/mkdir_variation1-win32.phpt:1.1.4.2 php-src/ext/standard/tests/file/mkdir_variation1-win32.phpt:1.1.4.3 --- php-src/ext/standard/tests/file/mkdir_variation1-win32.phpt:1.1.4.2 Wed Nov 26 10:10:17 2008 +++ php-src/ext/standard/tests/file/mkdir_variation1-win32.phpt Fri Dec 12 12:44:48 2008 @@ -2,7 +2,6 @@ Test mkdir() function : usage variation: try invalid pathname --CREDITS-- Dave Kelsey d_kel...@uk.ibm.com ---XFAIL-- --SKIPIF-- ?php if(substr(PHP_OS, 0, 3) != WIN) @@ -120,4 +119,4 @@ --single space-- Error: 2 - mkdir(): %s, %s(%d) -===DONE=== \ No newline at end of file +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir_variation5.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/file/mkdir_variation5.phpt diff -u php-src/ext/standard/tests/file/mkdir_variation5.phpt:1.1.4.2 php-src/ext/standard/tests/file/mkdir_variation5.phpt:1.1.4.3 --- php-src/ext/standard/tests/file/mkdir_variation5.phpt:1.1.4.2 Wed Nov 26 10:10:17 2008 +++ php-src/ext/standard/tests/file/mkdir_variation5.phpt Fri Dec 12 12:44:48 2008 @@ -2,7 +2,6 @@ Test mkdir() function : variation: various valid and invalid paths --CREDITS-- Dave Kelsey d_kel...@uk.ibm.com ---XFAIL-- --SKIPIF-- ?php if(substr(PHP_OS, 0, 3) == WIN) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u Index: php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt diff -u php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt:1.1.2.2.2.1 php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt:1.1.2.2.2.2 --- php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt:1.1.2.2.2.1 Mon Nov 5 17:43:21 2007 +++ php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt Fri Dec 12 12:44:48 2008 @@ -70,6 +70,8 @@ *** Testing mkdir() with miscelleneous input *** bool(true) + +Warning: mkdir(): Permission denied in %sfile/mkdir_rmdir_variation2.php on line %d bool(false) bool(true) Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS
bjori Fri Dec 12 12:46:24 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: BFN http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.410r2=1.2027.2.547.2.965.2.411diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.410 php-src/NEWS:1.2027.2.547.2.965.2.411 --- php-src/NEWS:1.2027.2.547.2.965.2.410 Thu Dec 11 02:58:22 2008 +++ php-src/NEWSFri Dec 12 12:46:24 2008 @@ -11,6 +11,7 @@ - Fixed bug #46746 (xmlrpc_decode_request outputs non-suppressable error when given bad data). (Ilia) - Fixed bug #46738 (Segfault when mb_detect_encoding() fails). (Scott) +- Fixed bug #46681 (mkdir() fails silently on PHP 5.3). (Hannes) 04 Dec 2008, PHP 5.3.0 Alpha 3 - Upgraded bundled PCRE to version 7.8. (Nuno) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard info.c winver.h
pajoye Fri Dec 12 10:33:05 2008 UTC Modified files: /php-src/ext/standard info.c winver.h Log: - late MFB (sry): fix VC6 build http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.295r2=1.296diff_format=u Index: php-src/ext/standard/info.c diff -u php-src/ext/standard/info.c:1.295 php-src/ext/standard/info.c:1.296 --- php-src/ext/standard/info.c:1.295 Mon Dec 8 07:33:41 2008 +++ php-src/ext/standard/info.c Fri Dec 12 10:33:05 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: info.c,v 1.295 2008/12/08 07:33:41 stas Exp $ */ +/* $Id: info.c,v 1.296 2008/12/12 10:33:05 pajoye Exp $ */ #include php.h #include php_ini.h @@ -38,6 +38,17 @@ #include sys/utsname.h #endif + +#ifdef PHP_WIN32 +typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO); +typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD); +# include winver.h + +# if _MSC_VER 1300 +# define OSVERSIONINFOEX php_win_OSVERSIONINFOEX +# endif +#endif + #if HAVE_MBSTRING #include ext/mbstring/mbstring.h ZEND_EXTERN_MODULE_GLOBALS(mbstring) @@ -341,14 +352,6 @@ #ifdef PHP_WIN32 /* {{{ */ -typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO); -typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD); - -#include winver.h - -#if _MSC_VER 1300 -#define OSVERSIONINFOEX php_win_OSVERSIONINFOEX -#endif char* php_get_windows_name() { http://cvs.php.net/viewvc.cgi/php-src/ext/standard/winver.h?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/winver.h diff -u php-src/ext/standard/winver.h:1.2 php-src/ext/standard/winver.h:1.3 --- php-src/ext/standard/winver.h:1.2 Mon Dec 8 07:33:41 2008 +++ php-src/ext/standard/winver.h Fri Dec 12 10:33:05 2008 @@ -57,8 +57,14 @@ #define VER_SUITE_BLADE 0x0400 #define VER_SUITE_EMBEDDED_RESTRICTED 0x0800 #define VER_SUITE_SECURITY_APPLIANCE0x1000 -#define VER_SUITE_STORAGE_SERVER0x2000 -#define VER_SUITE_COMPUTE_SERVER0x4000 +#endif + +#ifndef VER_SUITE_STORAGE_SERVER +# define VER_SUITE_STORAGE_SERVER0x2000 +#endif + +#ifndef VER_SUITE_COMPUTE_SERVER +# define VER_SUITE_COMPUTE_SERVER0x4000 #endif #ifndef PROCESSOR_ARCHITECTURE_AMD64 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/bcmath bcmath.c /ext/dba dba.c /ext/exif exif.c /ext/gd gd.c /ext/ldap ldap.c
bjori Fri Dec 12 13:05:59 2008 UTC Modified files: /php-src/ext/exif exif.c /php-src/ext/bcmath bcmath.c /php-src/ext/dbadba.c /php-src/ext/gd gd.c /php-src/ext/ldap ldap.c Log: Fixed bug#46847 (phpinfo() is missing some settings.) http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.208r2=1.209diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.208 php-src/ext/exif/exif.c:1.209 --- php-src/ext/exif/exif.c:1.208 Mon Nov 17 11:26:20 2008 +++ php-src/ext/exif/exif.c Fri Dec 12 13:05:58 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.208 2008/11/17 11:26:20 felipe Exp $ */ +/* $Id: exif.c,v 1.209 2008/12/12 13:05:58 bjori Exp $ */ /* ToDos * @@ -138,7 +138,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.208 2008/11/17 11:26:20 felipe Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.209 2008/12/12 13:05:58 bjori Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -150,6 +150,7 @@ php_info_print_table_row(2, Supported EXIF Version, 0220); php_info_print_table_row(2, Supported filetypes, JPEG,TIFF); php_info_print_table_end(); + DISPLAY_INI_ENTRIES(); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/bcmath/bcmath.c?r1=1.77r2=1.78diff_format=u Index: php-src/ext/bcmath/bcmath.c diff -u php-src/ext/bcmath/bcmath.c:1.77 php-src/ext/bcmath/bcmath.c:1.78 --- php-src/ext/bcmath/bcmath.c:1.77Mon Nov 17 11:26:19 2008 +++ php-src/ext/bcmath/bcmath.c Fri Dec 12 13:05:58 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: bcmath.c,v 1.77 2008/11/17 11:26:19 felipe Exp $ */ +/* $Id: bcmath.c,v 1.78 2008/12/12 13:05:58 bjori Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -182,6 +182,7 @@ php_info_print_table_start(); php_info_print_table_row(2, BCMath support, enabled); php_info_print_table_end(); + DISPLAY_INI_ENTRIES(); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/dba/dba.c?r1=1.130r2=1.131diff_format=u Index: php-src/ext/dba/dba.c diff -u php-src/ext/dba/dba.c:1.130 php-src/ext/dba/dba.c:1.131 --- php-src/ext/dba/dba.c:1.130 Mon Nov 17 11:26:19 2008 +++ php-src/ext/dba/dba.c Fri Dec 12 13:05:58 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dba.c,v 1.130 2008/11/17 11:26:19 felipe Exp $ */ +/* $Id: dba.c,v 1.131 2008/12/12 13:05:58 bjori Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -524,6 +524,7 @@ php_info_print_table_row(2, Supported handlers, none); } php_info_print_table_end(); + DISPLAY_INI_ENTRIES(); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.401r2=1.402diff_format=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.401 php-src/ext/gd/gd.c:1.402 --- php-src/ext/gd/gd.c:1.401 Mon Nov 17 11:26:20 2008 +++ php-src/ext/gd/gd.c Fri Dec 12 13:05:58 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.401 2008/11/17 11:26:20 felipe Exp $ */ +/* $Id: gd.c,v 1.402 2008/12/12 13:05:58 bjori Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1054,6 +1054,7 @@ #if HAVE_GD_FONTMUTEX HAVE_LIBFREETYPE gdFontCacheMutexShutdown(); #endif + UNREGISTER_INI_ENTRIES(); return SUCCESS; } #endif @@ -1246,6 +1247,7 @@ php_info_print_table_row(2, JIS-mapped Japanese Font Support, enabled); #endif php_info_print_table_end(); + DISPLAY_INI_ENTRIES(); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/ldap.c?r1=1.192r2=1.193diff_format=u Index: php-src/ext/ldap/ldap.c diff -u php-src/ext/ldap/ldap.c:1.192 php-src/ext/ldap/ldap.c:1.193 --- php-src/ext/ldap/ldap.c:1.192 Mon Nov 17 11:26:21 2008 +++ php-src/ext/ldap/ldap.c Fri Dec 12 13:05:58 2008 @@ -23,7 +23,7 @@ +--+ */ -/* $Id: ldap.c,v 1.192 2008/11/17 11:26:21 felipe Exp $ */ +/* $Id: ldap.c,v 1.193 2008/12/12 13:05:58 bjori Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -224,7 +224,7 @@ php_info_print_table_start(); php_info_print_table_row(2, LDAP Support, enabled); - php_info_print_table_row(2, RCS Version, $Id: ldap.c,v 1.192 2008/11/17 11:26:21 felipe Exp $); + php_info_print_table_row(2, RCS Version, $Id: ldap.c,v 1.193 2008/12/12 13:05:58 bjori Exp $); if (LDAPG(max_links) == -1) { snprintf(tmp, 31, %ld/unlimited, LDAPG(num_links)); @@ -271,6 +271,7 @@ #endif php_info_print_table_end(); + DISPLAY_INI_ENTRIES(); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit:
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/bcmath bcmath.c /ext/dba dba.c /ext/exif exif.c /ext/gd gd.c /ext/ldap ldap.c
bjori Fri Dec 12 13:07:29 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/exif exif.c /php-src/ext/bcmath bcmath.c /php-src/ext/dbadba.c /php-src/ext/gd gd.c /php-src/ext/ldap ldap.c Log: Fixed bug#46847 (phpinfo() is missing some settings.) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.411r2=1.2027.2.547.2.965.2.412diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.411 php-src/NEWS:1.2027.2.547.2.965.2.412 --- php-src/NEWS:1.2027.2.547.2.965.2.411 Fri Dec 12 12:46:24 2008 +++ php-src/NEWSFri Dec 12 13:07:28 2008 @@ -7,6 +7,7 @@ - Deprecated session_register(), session_unregister() and session_is_registered(). (Hannes) +- Fixed bug #46847 (phpinfo() is missing some settings). (Hannes) - Fixed bug #46811 (ini_set() doesn't return false on failure). (Hannes) - Fixed bug #46746 (xmlrpc_decode_request outputs non-suppressable error when given bad data). (Ilia) http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.173.2.5.2.20.2.12r2=1.173.2.5.2.20.2.13diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.173.2.5.2.20.2.12 php-src/ext/exif/exif.c:1.173.2.5.2.20.2.13 --- php-src/ext/exif/exif.c:1.173.2.5.2.20.2.12 Mon Nov 17 11:27:54 2008 +++ php-src/ext/exif/exif.c Fri Dec 12 13:07:28 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.173.2.5.2.20.2.12 2008/11/17 11:27:54 felipe Exp $ */ +/* $Id: exif.c,v 1.173.2.5.2.20.2.13 2008/12/12 13:07:28 bjori Exp $ */ /* ToDos * @@ -138,7 +138,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.173.2.5.2.20.2.12 2008/11/17 11:27:54 felipe Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.173.2.5.2.20.2.13 2008/12/12 13:07:28 bjori Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -150,6 +150,7 @@ php_info_print_table_row(2, Supported EXIF Version, 0220); php_info_print_table_row(2, Supported filetypes, JPEG,TIFF); php_info_print_table_end(); + DISPLAY_INI_ENTRIES(); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/bcmath/bcmath.c?r1=1.62.2.2.2.8.2.7r2=1.62.2.2.2.8.2.8diff_format=u Index: php-src/ext/bcmath/bcmath.c diff -u php-src/ext/bcmath/bcmath.c:1.62.2.2.2.8.2.7 php-src/ext/bcmath/bcmath.c:1.62.2.2.2.8.2.8 --- php-src/ext/bcmath/bcmath.c:1.62.2.2.2.8.2.7Mon Nov 17 11:27:53 2008 +++ php-src/ext/bcmath/bcmath.c Fri Dec 12 13:07:28 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: bcmath.c,v 1.62.2.2.2.8.2.7 2008/11/17 11:27:53 felipe Exp $ */ +/* $Id: bcmath.c,v 1.62.2.2.2.8.2.8 2008/12/12 13:07:28 bjori Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -182,6 +182,7 @@ php_info_print_table_start(); php_info_print_table_row(2, BCMath support, enabled); php_info_print_table_end(); + DISPLAY_INI_ENTRIES(); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/dba/dba.c?r1=1.111.2.4.2.5.2.8r2=1.111.2.4.2.5.2.9diff_format=u Index: php-src/ext/dba/dba.c diff -u php-src/ext/dba/dba.c:1.111.2.4.2.5.2.8 php-src/ext/dba/dba.c:1.111.2.4.2.5.2.9 --- php-src/ext/dba/dba.c:1.111.2.4.2.5.2.8 Mon Nov 17 11:27:54 2008 +++ php-src/ext/dba/dba.c Fri Dec 12 13:07:28 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dba.c,v 1.111.2.4.2.5.2.8 2008/11/17 11:27:54 felipe Exp $ */ +/* $Id: dba.c,v 1.111.2.4.2.5.2.9 2008/12/12 13:07:28 bjori Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -524,6 +524,7 @@ php_info_print_table_row(2, Supported handlers, none); } php_info_print_table_end(); + DISPLAY_INI_ENTRIES(); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.32.2.25r2=1.312.2.20.2.32.2.26diff_format=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.312.2.20.2.32.2.25 php-src/ext/gd/gd.c:1.312.2.20.2.32.2.26 --- php-src/ext/gd/gd.c:1.312.2.20.2.32.2.25Mon Nov 17 11:27:55 2008 +++ php-src/ext/gd/gd.c Fri Dec 12 13:07:28 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.312.2.20.2.32.2.25 2008/11/17 11:27:55 felipe Exp $ */ +/* $Id: gd.c,v 1.312.2.20.2.32.2.26 2008/12/12 13:07:28 bjori Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1114,6 +1114,7 @@ #if HAVE_GD_FONTMUTEX HAVE_LIBFREETYPE gdFontCacheMutexShutdown(); #endif + UNREGISTER_INI_ENTRIES(); return SUCCESS; } #endif @@ -1312,6 +1313,7 @@ php_info_print_table_row(2, JIS-mapped Japanese Font Support, enabled); #endif php_info_print_table_end(); + DISPLAY_INI_ENTRIES(); } /* }}} */
[PHP-CVS] cvs: php-src /ext/standard file.c /ext/standard/tests/file mkdir_rmdir_variation2.phpt mkdir_variation1-win32.phpt mkdir_variation1.phpt mkdir_variation5.phpt
bjori Fri Dec 12 12:40:59 2008 UTC Modified files: /php-src/ext/standard file.c /php-src/ext/standard/tests/filemkdir_variation1.phpt mkdir_variation1-win32.phpt mkdir_variation5.phpt mkdir_rmdir_variation2.phpt Log: Fixed bug#46681 (mkdir() fails silently on PHP 5.3) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.532r2=1.533diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.532 php-src/ext/standard/file.c:1.533 --- php-src/ext/standard/file.c:1.532 Wed Nov 26 04:18:24 2008 +++ php-src/ext/standard/file.c Fri Dec 12 12:40:58 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.532 2008/11/26 04:18:24 lbarnaud Exp $ */ +/* $Id: file.c,v 1.533 2008/12/12 12:40:58 bjori Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1498,7 +1498,7 @@ return -1; } - if ((ret = VCWD_MKDIR(dir, (mode_t)mode)) 0 (options REPORT_ERRORS) == 1) { + if ((ret = VCWD_MKDIR(dir, (mode_t)mode)) 0 (options REPORT_ERRORS)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, strerror(errno)); } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir_variation1.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/file/mkdir_variation1.phpt diff -u php-src/ext/standard/tests/file/mkdir_variation1.phpt:1.2 php-src/ext/standard/tests/file/mkdir_variation1.phpt:1.3 --- php-src/ext/standard/tests/file/mkdir_variation1.phpt:1.2 Wed Nov 26 17:48:41 2008 +++ php-src/ext/standard/tests/file/mkdir_variation1.phpt Fri Dec 12 12:40:58 2008 @@ -2,7 +2,6 @@ Test mkdir() function : usage variation: try invalid pathname --CREDITS-- Dave Kelsey d_kel...@uk.ibm.com ---XFAIL-- --SKIPIF-- ?php if(substr(PHP_OS, 0, 3) == WIN) @@ -119,4 +118,4 @@ --single space-- directory created -===DONE=== \ No newline at end of file +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir_variation1-win32.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/file/mkdir_variation1-win32.phpt diff -u php-src/ext/standard/tests/file/mkdir_variation1-win32.phpt:1.2 php-src/ext/standard/tests/file/mkdir_variation1-win32.phpt:1.3 --- php-src/ext/standard/tests/file/mkdir_variation1-win32.phpt:1.2 Wed Nov 26 17:48:41 2008 +++ php-src/ext/standard/tests/file/mkdir_variation1-win32.phpt Fri Dec 12 12:40:58 2008 @@ -2,7 +2,6 @@ Test mkdir() function : usage variation: try invalid pathname --CREDITS-- Dave Kelsey d_kel...@uk.ibm.com ---XFAIL-- --SKIPIF-- ?php if(substr(PHP_OS, 0, 3) != WIN) @@ -120,4 +119,4 @@ --single space-- Error: 2 - mkdir(): %s, %s(%d) -===DONE=== \ No newline at end of file +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir_variation5.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/file/mkdir_variation5.phpt diff -u php-src/ext/standard/tests/file/mkdir_variation5.phpt:1.2 php-src/ext/standard/tests/file/mkdir_variation5.phpt:1.3 --- php-src/ext/standard/tests/file/mkdir_variation5.phpt:1.2 Wed Nov 26 17:48:40 2008 +++ php-src/ext/standard/tests/file/mkdir_variation5.phpt Fri Dec 12 12:40:58 2008 @@ -2,7 +2,6 @@ Test mkdir() function : variation: various valid and invalid paths --CREDITS-- Dave Kelsey d_kel...@uk.ibm.com ---XFAIL-- --SKIPIF-- ?php if(substr(PHP_OS, 0, 3) == WIN) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt diff -u php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt:1.4 php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt:1.5 --- php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt:1.4 Tue May 27 09:34:54 2008 +++ php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt Fri Dec 12 12:40:58 2008 @@ -70,6 +70,8 @@ *** Testing mkdir() with miscelleneous input *** bool(true) + +Warning: mkdir(): Permission denied in %sfile/mkdir_rmdir_variation2.php on line %d bool(false) bool(true) Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
philip Fri Dec 12 16:46:35 2008 UTC Modified files: /CVSROOTavail Log: - Chinese phpdoc karma for Hao Chen (haohappy) http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1476r2=1.1477diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1476 CVSROOT/avail:1.1477 --- CVSROOT/avail:1.1476Tue Dec 9 18:46:11 2008 +++ CVSROOT/avail Fri Dec 12 16:46:34 2008 @@ -66,7 +66,7 @@ avail|ianasa,gustavo,soywiz,ladderalice,ideados,fcaroberga|phpdoc-es avail|parstic|phpdoc-fa avail|magidev|phpdoc-fr -avail|xdanger,jiania|phpdoc-zh,phpdoc-hk,phpdoc-tw +avail|xdanger,jiania,haohappy|phpdoc-zh,phpdoc-hk,phpdoc-tw avail|chappy,ayame|phpdoc-hu avail|adezm|phpdoc-id avail|elf,shimooka,masugata|phpdoc-ja -- 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
andrei Fri Dec 12 19:20:49 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard array.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.37.2.47r2=1.308.2.21.2.37.2.48diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.21.2.37.2.47 php-src/ext/standard/array.c:1.308.2.21.2.37.2.48 --- php-src/ext/standard/array.c:1.308.2.21.2.37.2.47 Wed Nov 26 00:59:41 2008 +++ php-src/ext/standard/array.cFri Dec 12 19:20:49 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.308.2.21.2.37.2.47 2008/11/26 00:59:41 lbarnaud Exp $ */ +/* $Id: array.c,v 1.308.2.21.2.37.2.48 2008/12/12 19:20:49 andrei Exp $ */ #include php.h #include php_ini.h @@ -2668,7 +2668,7 @@ } /* }}} */ -/* {{{ proto array array_unique(array input) +/* {{{ proto array array_unique(array input [, int sort_flags]) Removes duplicate values from array */ PHP_FUNCTION(array_unique) { @@ -2680,11 +2680,14 @@ }; struct bucketindex *arTmp, *cmpdata, *lastkept; unsigned int i; + long sort_type = PHP_SORT_REGULAR; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a, array) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a|l, array, sort_type) == FAILURE) { return; } + php_set_compare_func(sort_type TSRMLS_CC); + array_init_size(return_value, zend_hash_num_elements(Z_ARRVAL_P(array))); zend_hash_copy(Z_ARRVAL_P(return_value), Z_ARRVAL_P(array), (copy_ctor_func_t) zval_add_ref, (void *)tmp, sizeof(zval*)); @@ -2703,7 +2706,6 @@ arTmp[i].i = i; } arTmp[i].b = NULL; - php_set_compare_func(PHP_SORT_STRING TSRMLS_CC); zend_qsort((void *) arTmp, i, sizeof(struct bucketindex), php_array_data_compare TSRMLS_CC); /* go through the sorted array and delete duplicates from the copy */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /tests/strings 001.phpt
johannesFri Dec 12 21:20:44 2008 UTC Modified files: /php-src/tests/strings 001.phpt Log: Fix tests http://cvs.php.net/viewvc.cgi/php-src/tests/strings/001.phpt?r1=1.7r2=1.8diff_format=u Index: php-src/tests/strings/001.phpt diff -u php-src/tests/strings/001.phpt:1.7 php-src/tests/strings/001.phpt:1.8 --- php-src/tests/strings/001.phpt:1.7 Thu Jun 5 08:29:09 2008 +++ php-src/tests/strings/001.phpt Fri Dec 12 21:20:44 2008 @@ -92,7 +92,7 @@ . \0; echo Testing rawurlencode: ; -$encoded = rawurlencode($raw); +$encoded = rawurlencode((binary)$raw); $correct = '%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F' . '%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_' . '%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~' @@ -104,7 +104,7 @@ } echo Testing rawurldecode: ; -$decoded = rawurldecode($correct); +$decoded = rawurldecode((binary)$correct); if ($decoded == $raw) { echo(passed\n); } else { @@ -112,7 +112,7 @@ } echo Testing urlencode: ; -$encoded = urlencode($raw); +$encoded = urlencode((binary)$raw); $correct = '+%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F' . '%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_' . '%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7E' @@ -124,7 +124,7 @@ } echo Testing urldecode: ; -$decoded = urldecode($correct); +$decoded = urldecode((binary)$correct); if ($decoded == $raw) { echo(passed\n); } else { -- 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 array.c
Could you maybe fix the at-least-four-tests that broke, and maybe add a new test for this feature? :) And NEWS entry, [DOC], update the wiki... -Hannes On Fri, Dec 12, 2008 at 20:20, Andrei Zmievski and...@php.net wrote: andrei Fri Dec 12 19:20:49 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard array.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.37.2.47r2=1.308.2.21.2.37.2.48diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.21.2.37.2.47 php-src/ext/standard/array.c:1.308.2.21.2.37.2.48 --- php-src/ext/standard/array.c:1.308.2.21.2.37.2.47 Wed Nov 26 00:59:41 2008 +++ php-src/ext/standard/array.cFri Dec 12 19:20:49 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.308.2.21.2.37.2.47 2008/11/26 00:59:41 lbarnaud Exp $ */ +/* $Id: array.c,v 1.308.2.21.2.37.2.48 2008/12/12 19:20:49 andrei Exp $ */ #include php.h #include php_ini.h @@ -2668,7 +2668,7 @@ } /* }}} */ -/* {{{ proto array array_unique(array input) +/* {{{ proto array array_unique(array input [, int sort_flags]) Removes duplicate values from array */ PHP_FUNCTION(array_unique) { @@ -2680,11 +2680,14 @@ }; struct bucketindex *arTmp, *cmpdata, *lastkept; unsigned int i; + long sort_type = PHP_SORT_REGULAR; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a, array) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a|l, array, sort_type) == FAILURE) { return; } + php_set_compare_func(sort_type TSRMLS_CC); + array_init_size(return_value, zend_hash_num_elements(Z_ARRVAL_P(array))); zend_hash_copy(Z_ARRVAL_P(return_value), Z_ARRVAL_P(array), (copy_ctor_func_t) zval_add_ref, (void *)tmp, sizeof(zval*)); @@ -2703,7 +2706,6 @@ arTmp[i].i = i; } arTmp[i].b = NULL; - php_set_compare_func(PHP_SORT_STRING TSRMLS_CC); zend_qsort((void *) arTmp, i, sizeof(struct bucketindex), php_array_data_compare TSRMLS_CC); /* go through the sorted array and delete duplicates from the copy */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/json json.c /ext/json/tests 001.phpt bug41504.phpt bug42090.phpt fail001.phpt
scottmacFri Dec 12 23:17:44 2008 UTC Modified files: /php-src/ext/json json.c /php-src/ext/json/tests 001.phpt bug41504.phpt bug42090.phpt fail001.phpt Log: Fix bug #45989 - json_decode() doesn't return NULL on certain invalid strings http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.42r2=1.43diff_format=u Index: php-src/ext/json/json.c diff -u php-src/ext/json/json.c:1.42 php-src/ext/json/json.c:1.43 --- php-src/ext/json/json.c:1.42Mon Nov 17 11:26:21 2008 +++ php-src/ext/json/json.c Fri Dec 12 23:17:44 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: json.c,v 1.42 2008/11/17 11:26:21 felipe Exp $ */ +/* $Id: json.c,v 1.43 2008/12/12 23:17:44 scottmac Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -544,13 +544,7 @@ RETURN_DOUBLE(d); } } - if (str_len 1 *str.s == '' str.s[str_len-1] == '') { - RETURN_STRINGL(str.s+1, str_len-2, 1); - } else if (*str.s == '{' || *str.s == '[') { /* invalid JSON string */ - RETURN_NULL(); - } else { - RETURN_STRINGL(str.s, str_len, 1); - } + RETURN_NULL(); } else { @@ -577,13 +571,7 @@ RETURN_DOUBLE(d); } } - if (str_len 1 *str.u == 0x22 /*''*/ str.u[str_len-1] == 0x22 /*''*/) { - RETURN_UNICODEL(str.u+1, str_len-2, 1); - } else if (*str.u == 0x7b /*'{'*/ || *str.u == 0x5b /*'['*/ ) { /* invalid JSON string */ - RETURN_NULL(); - } else { - RETURN_UNICODEL(str.u, str_len, 1); - } + RETURN_NULL(); } } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/001.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/json/tests/001.phpt diff -u php-src/ext/json/tests/001.phpt:1.5 php-src/ext/json/tests/001.phpt:1.6 --- php-src/ext/json/tests/001.phpt:1.5 Tue May 27 18:16:03 2008 +++ php-src/ext/json/tests/001.phpt Fri Dec 12 23:17:44 2008 @@ -31,12 +31,12 @@ NULL NULL NULL -unicode(1) . -unicode(1) . -unicode(3) ? -unicode(1) ; -unicode(6) ÑÑÑÑÐ¸Ñ -unicode(4) blah +NULL +NULL +NULL +NULL +NULL +NULL NULL object(stdClass)#%d (1) { [utest]= @@ -66,6 +66,6 @@ unicode(0) } } -unicode(16) { : { : } -unicode(16) { : : } } +NULL +NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/bug41504.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/json/tests/bug41504.phpt diff -u php-src/ext/json/tests/bug41504.phpt:1.2 php-src/ext/json/tests/bug41504.phpt:1.3 --- php-src/ext/json/tests/bug41504.phpt:1.2Tue Jul 22 14:14:31 2008 +++ php-src/ext/json/tests/bug41504.phptFri Dec 12 23:17:44 2008 @@ -13,19 +13,19 @@ ? --EXPECT-- array(1) { - []= - string(5) value + [u]= + unicode(5) value } array(2) { - []= - string(5) value - [key]= - string(5) value + [u]= + unicode(5) value + [ukey]= + unicode(5) value } array(2) { - [key]= - string(5) value - []= - string(5) value + [ukey]= + unicode(5) value + [u]= + unicode(5) value } Done http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/bug42090.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/json/tests/bug42090.phpt diff -u php-src/ext/json/tests/bug42090.phpt:1.3 php-src/ext/json/tests/bug42090.phpt:1.4 --- php-src/ext/json/tests/bug42090.phpt:1.3Tue May 27 18:16:03 2008 +++ php-src/ext/json/tests/bug42090.phptFri Dec 12 23:17:44 2008 @@ -16,10 +16,9 @@ ? --EXPECT-- unicode(0) -unicode(5) ... -unicode(1) -unicode(2) +NULL +NULL +NULL string(4) \ unicode(1) unicode(2) - http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/fail001.phpt?r1=1.7r2=1.8diff_format=u Index: php-src/ext/json/tests/fail001.phpt diff -u php-src/ext/json/tests/fail001.phpt:1.7 php-src/ext/json/tests/fail001.phpt:1.8 --- php-src/ext/json/tests/fail001.phpt:1.7 Thu Jul 31 11:49:19 2008 +++ php-src/ext/json/tests/fail001.phpt Fri Dec 12 23:17:44 2008 @@ -50,116 +50,116 @@ unicode(58) A JSON payload should be an object or array, not a string. Testing: [Unclosed array AS OBJECT -unicode(17) [Unclosed array +NULL AS ARRAY -unicode(17) [Unclosed array +NULL Testing: {unquoted_key: keys must be quoted} AS OBJECT -unicode(36) {unquoted_key: keys must be quoted} +NULL AS ARRAY -unicode(36) {unquoted_key: keys must be quoted} +NULL Testing: [extra comma,] AS OBJECT -unicode(16) [extra comma,] +NULL AS ARRAY -unicode(16) [extra comma,] +NULL Testing: [double extra comma,,] AS OBJECT -unicode(24) [double extra comma,,] +NULL AS ARRAY -unicode(24) [double extra comma,,] +NULL Testing: [ , -- missing value] AS OBJECT
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/json json.c /ext/json/tests 001.phpt bug42090.phpt
scottmacFri Dec 12 23:19:47 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/json json.c /php-src/ext/json/tests 001.phpt bug42090.phpt Log: MFH Fix bug #45989 - json_decode() doesn't return NULL on certain invalid strings http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.9.2.19.2.12r2=1.9.2.19.2.13diff_format=u Index: php-src/ext/json/json.c diff -u php-src/ext/json/json.c:1.9.2.19.2.12 php-src/ext/json/json.c:1.9.2.19.2.13 --- php-src/ext/json/json.c:1.9.2.19.2.12 Mon Nov 17 11:27:56 2008 +++ php-src/ext/json/json.c Fri Dec 12 23:19:47 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: json.c,v 1.9.2.19.2.12 2008/11/17 11:27:56 felipe Exp $ */ +/* $Id: json.c,v 1.9.2.19.2.13 2008/12/12 23:19:47 scottmac Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -523,13 +523,7 @@ RETURN_DOUBLE(d); } } - if (str_len 1 *str == '' str[str_len-1] == '') { - RETURN_STRINGL(str+1, str_len-2, 1); - } else if (*str == '{' || *str == '[') { /* invalid JSON string */ - RETURN_NULL(); - } else { - RETURN_STRINGL(str, str_len, 1); - } + RETURN_NULL(); } } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/001.phpt?r1=1.1.2.4r2=1.1.2.4.2.1diff_format=u Index: php-src/ext/json/tests/001.phpt diff -u php-src/ext/json/tests/001.phpt:1.1.2.4 php-src/ext/json/tests/001.phpt:1.1.2.4.2.1 --- php-src/ext/json/tests/001.phpt:1.1.2.4 Fri Nov 3 13:16:33 2006 +++ php-src/ext/json/tests/001.phpt Fri Dec 12 23:19:47 2008 @@ -31,12 +31,12 @@ NULL NULL NULL -string(1) . -string(1) . -string(3) ? -string(1) ; -string(12) ÑÑÑÑÐ¸Ñ -string(4) blah +NULL +NULL +NULL +NULL +NULL +NULL NULL object(stdClass)#1 (1) { [test]= http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/bug42090.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u Index: php-src/ext/json/tests/bug42090.phpt diff -u php-src/ext/json/tests/bug42090.phpt:1.1.2.2.2.1 php-src/ext/json/tests/bug42090.phpt:1.1.2.2.2.2 --- php-src/ext/json/tests/bug42090.phpt:1.1.2.2.2.1Fri Feb 15 09:20:25 2008 +++ php-src/ext/json/tests/bug42090.phptFri Dec 12 23:19:47 2008 @@ -16,10 +16,9 @@ ? --EXPECT-- string(0) -string(5) ... -string(1) -string(2) +NULL +NULL +NULL string(4) \ string(1) string(2) - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS
scottmacFri Dec 12 23:21:22 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: BFN http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.412r2=1.2027.2.547.2.965.2.413diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.412 php-src/NEWS:1.2027.2.547.2.965.2.413 --- php-src/NEWS:1.2027.2.547.2.965.2.412 Fri Dec 12 13:07:28 2008 +++ php-src/NEWSFri Dec 12 23:21:22 2008 @@ -13,6 +13,8 @@ given bad data). (Ilia) - Fixed bug #46738 (Segfault when mb_detect_encoding() fails). (Scott) - Fixed bug #46681 (mkdir() fails silently on PHP 5.3). (Hannes) +- Fixed bug #45989 (json_decode() doesn't return NULL on certain + invalid strings). (magicaltux, Scott) 04 Dec 2008, PHP 5.3.0 Alpha 3 - Upgraded bundled PCRE to version 7.8. (Nuno) -- 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 array.c
Easy, there. I realized that there were 4 tests that broke after committing it. The issue is that I made SORT_REGULAR to be the default, which is not what the tests were expecting. The easiest way to fix the tests is to make them pass SORT_STRING to array_unique(), I guess. The rest is coming. -Andrei Hannes Magnusson wrote: Could you maybe fix the at-least-four-tests that broke, and maybe add a new test for this feature? :) And NEWS entry, [DOC], update the wiki... -- 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) / configure.in /main spprintf.c
nlopess Fri Dec 12 23:43:18 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcconfigure.in /php-src/main spprintf.c Log: make *printf() functions do not read strings past their specified length (if any) http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.77.2.37r2=1.579.2.52.2.77.2.38diff_format=u Index: php-src/configure.in diff -u php-src/configure.in:1.579.2.52.2.77.2.37 php-src/configure.in:1.579.2.52.2.77.2.38 --- php-src/configure.in:1.579.2.52.2.77.2.37 Wed Dec 3 21:01:51 2008 +++ php-src/configure.inFri Dec 12 23:43:17 2008 @@ -1,4 +1,4 @@ -## $Id: configure.in,v 1.579.2.52.2.77.2.37 2008/12/03 21:01:51 johannes Exp $ -*- autoconf -*- +## $Id: configure.in,v 1.579.2.52.2.77.2.38 2008/12/12 23:43:17 nlopess Exp $ -*- autoconf -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -625,6 +625,7 @@ strdup \ strerror \ strftime \ +strnlen \ strptime \ strstr \ strtok_r \ http://cvs.php.net/viewvc.cgi/php-src/main/spprintf.c?r1=1.25.2.2.2.10.2.4r2=1.25.2.2.2.10.2.5diff_format=u Index: php-src/main/spprintf.c diff -u php-src/main/spprintf.c:1.25.2.2.2.10.2.4 php-src/main/spprintf.c:1.25.2.2.2.10.2.5 --- php-src/main/spprintf.c:1.25.2.2.2.10.2.4 Thu Feb 7 18:41:35 2008 +++ php-src/main/spprintf.c Fri Dec 12 23:43:18 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spprintf.c,v 1.25.2.2.2.10.2.4 2008/02/07 18:41:35 helly Exp $ */ +/* $Id: spprintf.c,v 1.25.2.2.2.10.2.5 2008/12/12 23:43:18 nlopess Exp $ */ /* This is the spprintf implementation. * It has emerged from apache snprintf. See original header: @@ -76,6 +76,7 @@ * SIO stdio-replacement strx_* functions by Panos Tsirigotis * pa...@alumni.cs.colorado.edu for xinetd. */ +#define _GNU_SOURCE #include php.h #include stddef.h @@ -180,6 +181,14 @@ /* }}} */ + +#if !HAVE_STRNLEN +static size_t strnlen(const char *s, size_t maxlen) { + char *r = memchr(s, '\0', maxlen); + return r ? r-s : maxlen; +} +#endif + /* * Do format conversion placing the output in buffer */ @@ -561,9 +570,11 @@ case 'v': s = va_arg(ap, char *); if (s != NULL) { - s_len = strlen(s); - if (adjust_precision precision s_len) - s_len = precision; + if (!adjust_precision) { + s_len = strlen(s); + } else { + s_len = strnlen(s, precision); + } } else { s = S_NULL; s_len = S_NULL_LEN; -- 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 pdo_stmt.c
nlopess Fri Dec 12 23:46:05 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pdopdo_stmt.c Log: we do not need the strndup() now that php_stream_printf() handles non-null terminated strings correctly http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.24.2.40r2=1.118.2.38.2.24.2.41diff_format=u Index: php-src/ext/pdo/pdo_stmt.c diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.40 php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.41 --- php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.40 Thu Dec 11 15:32:24 2008 +++ php-src/ext/pdo/pdo_stmt.c Fri Dec 12 23:46:05 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: pdo_stmt.c,v 1.118.2.38.2.24.2.40 2008/12/11 15:32:24 iliaa Exp $ */ +/* $Id: pdo_stmt.c,v 1.118.2.38.2.24.2.41 2008/12/12 23:46:05 nlopess Exp $ */ /* The PDO Statement Handle Class */ @@ -2209,9 +2209,7 @@ if (res == HASH_KEY_IS_LONG) { php_stream_printf(out TSRMLS_CC, Key: Position #%ld:\n, num); } else if (res == HASH_KEY_IS_STRING) { - char *s = estrndup(str, len); - php_stream_printf(out TSRMLS_CC, Key: Name: [%d] %.*s\n, len, len, s); - efree(s); + php_stream_printf(out TSRMLS_CC, Key: Name: [%d] %.*s\n, len, len, str); } php_stream_printf(out TSRMLS_CC, paramno=%d\nname=[%d] \%.*s\\nis_param=%d\nparam_type=%d\n, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / configure.in /main spprintf.c
nlopess Fri Dec 12 23:55:49 2008 UTC Modified files: /php-srcconfigure.in /php-src/main spprintf.c Log: MFB http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.668r2=1.669diff_format=u Index: php-src/configure.in diff -u php-src/configure.in:1.668 php-src/configure.in:1.669 --- php-src/configure.in:1.668 Thu Dec 4 00:41:17 2008 +++ php-src/configure.inFri Dec 12 23:55:48 2008 @@ -1,4 +1,4 @@ -## $Id: configure.in,v 1.668 2008/12/04 00:41:17 dsp Exp $ -*- autoconf -*- +## $Id: configure.in,v 1.669 2008/12/12 23:55:48 nlopess Exp $ -*- autoconf -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -625,6 +625,7 @@ strdup \ strerror \ strftime \ +strnlen \ strptime \ strstr \ strtok_r \ http://cvs.php.net/viewvc.cgi/php-src/main/spprintf.c?r1=1.53r2=1.54diff_format=u Index: php-src/main/spprintf.c diff -u php-src/main/spprintf.c:1.53 php-src/main/spprintf.c:1.54 --- php-src/main/spprintf.c:1.53Thu Feb 7 18:40:29 2008 +++ php-src/main/spprintf.c Fri Dec 12 23:55:48 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spprintf.c,v 1.53 2008/02/07 18:40:29 helly Exp $ */ +/* $Id: spprintf.c,v 1.54 2008/12/12 23:55:48 nlopess Exp $ */ /* This is the spprintf implementation. * It has emerged from apache snprintf. See original header: @@ -77,6 +77,7 @@ * pa...@alumni.cs.colorado.edu for xinetd. */ +#define _GNU_SOURCE #include php.h #include stddef.h @@ -209,6 +210,14 @@ /* }}} */ + +#if !HAVE_STRNLEN +static size_t strnlen(const char *s, size_t maxlen) { + char *r = memchr(s, '\0', maxlen); + return r ? r-s : maxlen; +} +#endif + /* * Do format conversion placing the output in buffer */ @@ -656,9 +665,11 @@ fmt_string: s = va_arg(ap, char *); if (s != NULL) { - s_len = strlen(s); - if (adjust_precision precision s_len) - s_len = precision; + if (!adjust_precision) { + s_len = strlen(s); + } else { + s_len = strnlen(s, precision); + } } else { s = S_NULL; s_len = S_NULL_LEN; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard/tests/array array_unique_error.phpt array_unique_variation2.phpt array_unique_variation6.phpt array_unique_variation8.phpt
andrei Fri Dec 12 23:59:48 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/standard/tests/array array_unique_error.phpt array_unique_variation2.phpt array_unique_variation6.phpt array_unique_variation8.phpt Log: Fix tests, add NEWS entry. http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.413r2=1.2027.2.547.2.965.2.414diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.413 php-src/NEWS:1.2027.2.547.2.965.2.414 --- php-src/NEWS:1.2027.2.547.2.965.2.413 Fri Dec 12 23:21:22 2008 +++ php-src/NEWSFri Dec 12 23:59:47 2008 @@ -1,6 +1,8 @@ PHPNEWS ||| ?? ??? 200?, PHP 5.3.0 Alpha 4 +- Added optional sorting type flag parameter to array_unique(), default is + SORT_REGULAR. (Andrei) - Changed opendir(), dir() and scandir() to use default context when no context argument is passed. (Sara) - Changed open_basedir to allow tightening in runtime contexts. (Sara) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unique_error.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/array/array_unique_error.phpt diff -u php-src/ext/standard/tests/array/array_unique_error.phpt:1.1.2.2 php-src/ext/standard/tests/array/array_unique_error.phpt:1.1.2.3 --- php-src/ext/standard/tests/array/array_unique_error.phpt:1.1.2.2Sun Dec 9 14:41:10 2007 +++ php-src/ext/standard/tests/array/array_unique_error.phptFri Dec 12 23:59:48 2008 @@ -17,7 +17,7 @@ echo \n-- Testing array_unique() function with more than expected no. of arguments --\n; $input = array(1, 2); $extra_arg = 10; -var_dump( array_unique($input, $extra_arg) ); +var_dump( array_unique($input, SORT_NUMERIC, $extra_arg) ); echo Done; ? @@ -26,11 +26,11 @@ -- Testing array_unique() function with zero arguments -- -Warning: array_unique() expects exactly 1 parameter, 0 given in %s on line %d +Warning: array_unique() expects at least 1 parameter, 0 given in %s on line %d NULL -- Testing array_unique() function with more than expected no. of arguments -- -Warning: array_unique() expects exactly 1 parameter, 2 given in %s on line %d +Warning: array_unique() expects at most 2 parameters, 3 given in %s on line %d NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unique_variation2.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/array/array_unique_variation2.phpt diff -u php-src/ext/standard/tests/array/array_unique_variation2.phpt:1.1.2.2 php-src/ext/standard/tests/array/array_unique_variation2.phpt:1.1.2.3 --- php-src/ext/standard/tests/array/array_unique_variation2.phpt:1.1.2.2 Sun Dec 9 14:41:10 2007 +++ php-src/ext/standard/tests/array/array_unique_variation2.phpt Fri Dec 12 23:59:48 2008 @@ -74,7 +74,7 @@ $iterator = 1; foreach($inputs as $input) { echo -- Iteration $iterator --\n; - var_dump( array_unique($input) ); + var_dump( array_unique($input, SORT_STRING) ); $iterator++; } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unique_variation6.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/array/array_unique_variation6.phpt diff -u php-src/ext/standard/tests/array/array_unique_variation6.phpt:1.1.2.2 php-src/ext/standard/tests/array/array_unique_variation6.phpt:1.1.2.3 --- php-src/ext/standard/tests/array/array_unique_variation6.phpt:1.1.2.2 Sun Dec 9 14:41:10 2007 +++ php-src/ext/standard/tests/array/array_unique_variation6.phpt Fri Dec 12 23:59:48 2008 @@ -29,7 +29,7 @@ 5 = $value4 ); -var_dump( array_unique($input) ); +var_dump( array_unique($input, SORT_STRING) ); echo Done; ? http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unique_variation8.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/array/array_unique_variation8.phpt diff -u php-src/ext/standard/tests/array/array_unique_variation8.phpt:1.1.2.2 php-src/ext/standard/tests/array/array_unique_variation8.phpt:1.1.2.3 --- php-src/ext/standard/tests/array/array_unique_variation8.phpt:1.1.2.2 Sun Dec 9 14:41:10 2007 +++ php-src/ext/standard/tests/array/array_unique_variation8.phpt Fri Dec 12 23:59:48 2008 @@ -22,7 +22,7 @@ array(1, 2, 3, 1) ); -var_dump( array_unique($input) ); +var_dump( array_unique($input, SORT_STRING) ); echo 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/pdo pdo_stmt.c
I've commited a little fix to *printf() functions, so that they won't read past the specified length. Nuno - Original Message - It does not really read past it, but internally it does a strlen() on the %s argument, which is where the valgrind shows the message. Technically that code needs to be reviewed, but just from general use case I think its safer not to pass non-terminated char pointers around. On 11-Dec-08, at 11:50 AM, Nuno Lopes wrote: Weird.. Isn't that a bug in php_stream_printf() then? I would say it shouldn't read past the specified length.. otherwise the same bug may appear in other places. What do you think? Nuno - Original Message - The patch was already n 5.2, the issue is that the str (key) is not guaranteed to be NULL terminated (nor does it need to be), so when strlen() is attempted on top of it you could end up reading more data then necessary. On 11-Dec-08, at 10:43 AM, Nuno Lopes wrote: Modified files: (Branch: PHP_5_3) /php-src/ext/pdo pdo_stmt.c Log: Fixed a possible corruption inside PDOStatement::debugDumpParams() http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.24.2.39r2=1.118.2.38.2.24.2.40diff_format=u Index: php-src/ext/pdo/pdo_stmt.c diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.39 php-src/ ext/ pdo/pdo_stmt.c:1.118.2.38.2.24.2.40 @@ -2209,7 +2209,9 @@ if (res == HASH_KEY_IS_LONG) { php_stream_printf(out TSRMLS_CC, Key: Position #%ld:\n, num); } else if (res == HASH_KEY_IS_STRING) { - php_stream_printf(out TSRMLS_CC, Key: Name: [%d] %.*s\n, len, len, str); + char *s = estrndup(str, len); + php_stream_printf(out TSRMLS_CC, Key: Name: [%d] %.*s\n, len, len, s); + efree(s); } Sorry for my ignorance, but isn't the new code exactly equivalent to the old one, albeit a bit slower? I can't really see how a strndup() can fix a corruption there.. If there's some problem, probably it's deeper than this.. Nuno Ilia Alshanetsky -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard array.c /ext/standard/tests/array array_unique_error.phpt array_unique_variation1.phpt array_unique_variation2.phpt array_unique_variation6.phpt
andrei Sat Dec 13 00:38:31 2008 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/standard array.c /php-src/ext/standard/tests/array array_unique_error.phpt array_unique_variation1.phpt array_unique_variation2.phpt array_unique_variation6.phpt array_unique_variation8.phpt Log: MFH http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1359r2=1.2027.2.547.2.1360diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1359 php-src/NEWS:1.2027.2.547.2.1360 --- php-src/NEWS:1.2027.2.547.2.1359Fri Dec 12 04:21:01 2008 +++ php-src/NEWSSat Dec 13 00:38:28 2008 @@ -1,6 +1,8 @@ PHPNEWS ||| ?? ??? 2009, PHP 5.2.9 +- Added optional sorting type flag parameter to array_unique(), default is + SORT_REGULAR. (Andrei) - Fixed security issue in imagerotate(), background colour isn't validated correctly with a non truecolour image. (Scott) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.59r2=1.308.2.21.2.60diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.21.2.59 php-src/ext/standard/array.c:1.308.2.21.2.60 --- php-src/ext/standard/array.c:1.308.2.21.2.59Wed Nov 26 01:00:36 2008 +++ php-src/ext/standard/array.cSat Dec 13 00:38:29 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.308.2.21.2.59 2008/11/26 01:00:36 lbarnaud Exp $ */ +/* $Id: array.c,v 1.308.2.21.2.60 2008/12/13 00:38:29 andrei Exp $ */ #include php.h #include php_ini.h @@ -2813,12 +2813,11 @@ } /* }}} */ -/* {{{ proto array array_unique(array input) +/* {{{ proto array array_unique(array input [, int sort_flags]) Removes duplicate values from array */ PHP_FUNCTION(array_unique) { - zval **array, *tmp; - HashTable *target_hash; + zval *array, *tmp; Bucket *p; struct bucketindex { Bucket *b; @@ -2826,34 +2825,31 @@ }; struct bucketindex *arTmp, *cmpdata, *lastkept; unsigned int i; + long sort_type = SORT_REGULAR; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, array) == FAILURE) { - WRONG_PARAM_COUNT; - } - target_hash = HASH_OF(*array); - if (!target_hash) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, The argument should be an array); - RETURN_FALSE; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a|l, array, sort_type) == FAILURE) { + return; } + set_compare_func(sort_type TSRMLS_CC); + array_init(return_value); - zend_hash_copy(Z_ARRVAL_P(return_value), target_hash, (copy_ctor_func_t) zval_add_ref, (void *)tmp, sizeof(zval*)); + zend_hash_copy(Z_ARRVAL_P(return_value), Z_ARRVAL_P(array), (copy_ctor_func_t) zval_add_ref, (void *)tmp, sizeof(zval*)); - if (target_hash-nNumOfElements = 1) { /* nothing to do */ + if (Z_ARRVAL_P(array)-nNumOfElements = 1) { /* nothing to do */ return; } /* create and sort array with pointers to the target_hash buckets */ - arTmp = (struct bucketindex *) pemalloc((target_hash-nNumOfElements + 1) * sizeof(struct bucketindex), target_hash-persistent); + arTmp = (struct bucketindex *) pemalloc((Z_ARRVAL_P(array)-nNumOfElements + 1) * sizeof(struct bucketindex), Z_ARRVAL_P(array)-persistent); if (!arTmp) { RETURN_FALSE; } - for (i = 0, p = target_hash-pListHead; p; i++, p = p-pListNext) { + for (i = 0, p = Z_ARRVAL_P(array)-pListHead; p; i++, p = p-pListNext) { arTmp[i].b = p; arTmp[i].i = i; } arTmp[i].b = NULL; - set_compare_func(SORT_STRING TSRMLS_CC); zend_qsort((void *) arTmp, i, sizeof(struct bucketindex), array_data_compare TSRMLS_CC); /* go through the sorted array and delete duplicates from the copy */ @@ -2879,7 +2875,7 @@ } } } - pefree(arTmp, target_hash-persistent); + pefree(arTmp, Z_ARRVAL_P(array)-persistent); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unique_error.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/array/array_unique_error.phpt diff -u php-src/ext/standard/tests/array/array_unique_error.phpt:1.1.4.2 php-src/ext/standard/tests/array/array_unique_error.phpt:1.1.4.3 --- php-src/ext/standard/tests/array/array_unique_error.phpt:1.1.4.2Sun Dec 9 14:44:18 2007 +++
[PHP-CVS] cvs: CVSROOT / avail
philip Sat Dec 13 02:01:32 2008 UTC Modified files: /CVSROOTavail Log: - Chinese phpdoc karma for Gang Chen (eniac2008) http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1477r2=1.1478diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1477 CVSROOT/avail:1.1478 --- CVSROOT/avail:1.1477Fri Dec 12 16:46:34 2008 +++ CVSROOT/avail Sat Dec 13 02:01:31 2008 @@ -66,7 +66,7 @@ avail|ianasa,gustavo,soywiz,ladderalice,ideados,fcaroberga|phpdoc-es avail|parstic|phpdoc-fa avail|magidev|phpdoc-fr -avail|xdanger,jiania,haohappy|phpdoc-zh,phpdoc-hk,phpdoc-tw +avail|xdanger,jiania,haohappy,eniac2008|phpdoc-zh,phpdoc-hk,phpdoc-tw avail|chappy,ayame|phpdoc-hu avail|adezm|phpdoc-id avail|elf,shimooka,masugata|phpdoc-ja -- 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
2008/12/12 Andrei Zmievski and...@php.net: andrei Fri Dec 12 19:19:04 2008 UTC Modified files: /php-src/ext/standard array.c Log: Add sort flags parameter to array_unique(). http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.467r2=1.468diff_format=u Guess it should have [DOC], cc'ed to phpdoc@ =) -- Kalle Sommer Nielsen -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS
kalle Sat Dec 13 05:31:16 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: Already in 5.2 NEWS http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.414r2=1.2027.2.547.2.965.2.415diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.414 php-src/NEWS:1.2027.2.547.2.965.2.415 --- php-src/NEWS:1.2027.2.547.2.965.2.414 Fri Dec 12 23:59:47 2008 +++ php-src/NEWSSat Dec 13 05:31:15 2008 @@ -1,8 +1,6 @@ PHPNEWS ||| ?? ??? 200?, PHP 5.3.0 Alpha 4 -- Added optional sorting type flag parameter to array_unique(), default is - SORT_REGULAR. (Andrei) - Changed opendir(), dir() and scandir() to use default context when no context argument is passed. (Sara) - Changed open_basedir to allow tightening in runtime contexts. (Sara) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php