[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Thu Oct 5 01:30:55 2006 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.994r2=1.995diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.994 ZendEngine2/ChangeLog:1.995 --- ZendEngine2/ChangeLog:1.994 Wed Oct 4 01:30:52 2006 +++ ZendEngine2/ChangeLog Thu Oct 5 01:30:55 2006 @@ -1,3 +1,15 @@ +2006-10-04 Antony Dovgal [EMAIL PROTECTED] + +* (PHP_5_2) + tests/bug39036.phpt: + add test + +* tests/bug39036.phpt + tests/bug39036.phpt: + + add test for #39036 (reproducible with 5.1.6, but works fine in 5.2 and + HEAD) + 2006-10-03 Antony Dovgal [EMAIL PROTECTED] * (PHP_5_2) @@ -15429,7 +15441,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.994 2006/10/04 01:30:52 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.995 2006/10/05 01:30:55 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -17153,7 +17165,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.994 2006/10/04 01:30:52 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.995 2006/10/05 01:30:55 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: php-src /ext/bz2/tests 004.phpt
bjori Wed Oct 4 08:45:21 2006 UTC Modified files: /php-src/ext/bz2/tests 004.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/tests/004.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/bz2/tests/004.phpt diff -u php-src/ext/bz2/tests/004.phpt:1.2 php-src/ext/bz2/tests/004.phpt:1.3 --- php-src/ext/bz2/tests/004.phpt:1.2 Mon Jun 26 22:20:55 2006 +++ php-src/ext/bz2/tests/004.phpt Wed Oct 4 08:45:21 2006 @@ -109,69 +109,3 @@ Warning: bzerrno(): %d is not a valid stream resource in %s on line %d bool(false) Done ---UEXPECTF-- -array(2) { - [uerrno]= - int(0) - [uerrstr]= - string(2) OK -} -string(2) OK -int(0) -array(2) { - [uerrno]= - int(0) - [uerrstr]= - string(2) OK -} -string(2) OK -int(0) -string(0) -array(2) { - [uerrno]= - int(-5) - [uerrstr]= - string(16) DATA_ERROR_MAGIC -} -string(16) DATA_ERROR_MAGIC -int(-5) -string(0) -array(2) { - [uerrno]= - int(-4) - [uerrstr]= - string(10) DATA_ERROR -} -string(10) DATA_ERROR -int(-4) -string(0) -array(2) { - [uerrno]= - int(-5) - [uerrstr]= - string(16) DATA_ERROR_MAGIC -} -string(16) DATA_ERROR_MAGIC -int(-5) -string(0) -array(2) { - [uerrno]= - int(-4) - [uerrstr]= - string(10) DATA_ERROR -} -string(10) DATA_ERROR -int(-4) - -Warning: bzread(): %d is not a valid stream resource in %s on line %d -bool(false) - -Warning: bzerror(): %d is not a valid stream resource in %s on line %d -bool(false) - -Warning: bzerrstr(): %d is not a valid stream resource in %s on line %d -bool(false) - -Warning: bzerrno(): %d is not a valid stream resource in %s on line %d -bool(false) -Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard string.c
tony2001Wed Oct 4 10:52:33 2006 UTC Modified files: /php-src/ext/standard string.c Log: return false on invalid mode and don't segfault http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.600r2=1.601diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.600 php-src/ext/standard/string.c:1.601 --- php-src/ext/standard/string.c:1.600 Tue Oct 3 18:13:36 2006 +++ php-src/ext/standard/string.c Wed Oct 4 10:52:32 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.600 2006/10/03 18:13:36 andrei Exp $ */ +/* $Id: string.c,v 1.601 2006/10/04 10:52:32 tony2001 Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -6465,6 +6465,7 @@ } if (UG(unicode) mode != 1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Only mode=1 is supported with Unicode strings); + RETURN_FALSE; } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard string.c /ext/standard/tests/strings bug39032.phpt
tony2001Wed Oct 4 11:14:32 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings bug39032.phpt Modified files: /php-srcNEWS /php-src/ext/standard string.c Log: MFH: fix #39032 (strcspn() stops on null character) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.280r2=1.2027.2.547.2.281diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.280 php-src/NEWS:1.2027.2.547.2.281 --- php-src/NEWS:1.2027.2.547.2.280 Tue Oct 3 11:10:32 2006 +++ php-src/NEWSWed Oct 4 11:14:32 2006 @@ -7,6 +7,7 @@ - Fixed mess with CGI/CLI -d option (now it works with cgi; constants are working exactly like in php.ini; with FastCGI -d affects all requests). (Dmitry) +- Fixed bug #39032 (strcspn() stops on null character). (Tony) - Fixed bug #39017 (foreach(($obj = new myClass) as $v); echo $obj; segfaults). (Dmitry) - Fixed bug #39004 (Fixed generation of config.nice with autoconf 2.60). http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.23r2=1.445.2.14.2.24diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.445.2.14.2.23 php-src/ext/standard/string.c:1.445.2.14.2.24 --- php-src/ext/standard/string.c:1.445.2.14.2.23 Tue Oct 3 17:41:47 2006 +++ php-src/ext/standard/string.c Wed Oct 4 11:14:32 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.445.2.14.2.23 2006/10/03 17:41:47 iliaa Exp $ */ +/* $Id: string.c,v 1.445.2.14.2.24 2006/10/04 11:14:32 tony2001 Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1500,7 +1500,7 @@ if (*spanp == c || p == s1_end) { return p - s1; } - } while (spanp++ s2_end); + } while (spanp++ (s2_end - 1)); c = *++p; } /* NOTREACHED */ http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/bug39032.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/bug39032.phpt +++ php-src/ext/standard/tests/strings/bug39032.phpt --TEST-- Bug #39032 (strcspn() stops on null character) --FILE-- ?php var_dump(strcspn(chr(0),x)); var_dump(strcspn(chr(0),)); var_dump(strcspn(chr(0),qweqwe)); var_dump(strcspn(chr(1),qweqwe)); echo Done\n; ? --EXPECTF-- int(1) int(0) int(1) int(1) Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS
tony2001Wed Oct 4 11:20:14 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: fix typo http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.281r2=1.2027.2.547.2.282diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.281 php-src/NEWS:1.2027.2.547.2.282 --- php-src/NEWS:1.2027.2.547.2.281 Wed Oct 4 11:14:32 2006 +++ php-src/NEWSWed Oct 4 11:20:14 2006 @@ -457,7 +457,7 @@ for SSL streams. (Wez). - Added PDO::PARAM_EVT_* family of constants. (Sara) - Fixed possible crash in highlight_string(). (Dmitry) -- Fixed bug #37291 (FastCGI now longer works with isapi_fcgi.dll). (Dmitry) +- Fixed bug #37291 (FastCGI no longer works with isapi_fcgi.dll). (Dmitry) - Fixed bug #37277 (cloning Dom Documents or Nodes does not work). (Rob) - Fixed bug #37276 (problems with $_POST array). (Dmitry) - Fixed bug #36632 (bad error reporting for pdo_odbc exec UPDATE). (Wez). -- 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/filter filter.c
pajoye Wed Oct 4 11:48:04 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/filter filter.c Log: - wrong definition http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.52.2.22r2=1.52.2.23diff_format=u Index: php-src/ext/filter/filter.c diff -u php-src/ext/filter/filter.c:1.52.2.22 php-src/ext/filter/filter.c:1.52.2.23 --- php-src/ext/filter/filter.c:1.52.2.22 Tue Oct 3 22:18:08 2006 +++ php-src/ext/filter/filter.c Wed Oct 4 11:48:04 2006 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: filter.c,v 1.52.2.22 2006/10/03 22:18:08 iliaa Exp $ */ +/* $Id: filter.c,v 1.52.2.23 2006/10/04 11:48:04 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -175,7 +175,7 @@ REGISTER_LONG_CONSTANT(INPUT_ENV, PARSE_ENV, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(INPUT_SERVER, PARSE_SERVER, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(INPUT_SESSION, PARSE_SESSION, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(INPUT_REQUEST, PARSE_SESSION, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(INPUT_REQUEST, PARSE_REQUEST, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(FILTER_FLAG_NONE, FILTER_FLAG_NONE, CONST_CS | CONST_PERSISTENT); @@ -274,7 +274,7 @@ { php_info_print_table_start(); php_info_print_table_header( 2, Input Validation and Filtering, enabled ); - php_info_print_table_row( 2, Revision, $Revision: 1.52.2.22 $); + php_info_print_table_row( 2, Revision, $Revision: 1.52.2.23 $); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); -- 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/filter package.xml
pajoye Wed Oct 4 12:02:46 2006 UTC Removed files: (Branch: PHP_5_2) /php-src/ext/filter package.xml Log: - used only in HEAD -- 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/dom php_dom.c
rrichards Wed Oct 4 12:02:49 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/domphp_dom.c Log: fix bug #39035 (Compatibilty issue between DOM and ze1_compatibility_mode http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.c?r1=1.73.2.12.2.7r2=1.73.2.12.2.8diff_format=u Index: php-src/ext/dom/php_dom.c diff -u php-src/ext/dom/php_dom.c:1.73.2.12.2.7 php-src/ext/dom/php_dom.c:1.73.2.12.2.8 --- php-src/ext/dom/php_dom.c:1.73.2.12.2.7 Mon Aug 14 11:29:15 2006 +++ php-src/ext/dom/php_dom.c Wed Oct 4 12:02:49 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_dom.c,v 1.73.2.12.2.7 2006/08/14 11:29:15 rrichards Exp $ */ +/* $Id: php_dom.c,v 1.73.2.12.2.8 2006/10/04 12:02:49 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -551,7 +551,7 @@ memcpy(dom_ze1_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); dom_ze1_object_handlers.read_property = dom_read_property; dom_ze1_object_handlers.write_property = dom_write_property; - dom_object_handlers.get_property_ptr_ptr = dom_get_property_ptr_ptr; + dom_ze1_object_handlers.get_property_ptr_ptr = dom_get_property_ptr_ptr; dom_ze1_object_handlers.clone_obj = dom_objects_ze1_clone_obj; dom_ze1_object_handlers.has_property = dom_property_exists; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS
rrichards Wed Oct 4 12:04:32 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: BFN http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.282r2=1.2027.2.547.2.283diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.282 php-src/NEWS:1.2027.2.547.2.283 --- php-src/NEWS:1.2027.2.547.2.282 Wed Oct 4 11:20:14 2006 +++ php-src/NEWSWed Oct 4 12:04:32 2006 @@ -7,6 +7,8 @@ - Fixed mess with CGI/CLI -d option (now it works with cgi; constants are working exactly like in php.ini; with FastCGI -d affects all requests). (Dmitry) +- Fixed bug #39035 (Compatibilty issue between DOM and + zend.ze1_compatibility_mode). (Rob) - Fixed bug #39032 (strcspn() stops on null character). (Tony) - Fixed bug #39017 (foreach(($obj = new myClass) as $v); echo $obj; segfaults). (Dmitry) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/filter CREDITS
pajoye Wed Oct 4 12:13:39 2006 UTC Modified files: /php-src/ext/filter CREDITS Log: - Add Ilia http://cvs.php.net/viewvc.cgi/php-src/ext/filter/CREDITS?r1=1.2r2=1.3diff_format=u Index: php-src/ext/filter/CREDITS diff -u php-src/ext/filter/CREDITS:1.2 php-src/ext/filter/CREDITS:1.3 --- php-src/ext/filter/CREDITS:1.2 Thu Aug 31 22:32:54 2006 +++ php-src/ext/filter/CREDITS Wed Oct 4 12:13:39 2006 @@ -1,2 +1,2 @@ Input Filter -Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye +Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye, Ilia Alshanetsky -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/calendar cal_unix.c
bjori Wed Oct 4 12:50:02 2006 UTC Modified files: /php-src/ext/calendar cal_unix.c Log: Update to the new parameter parsing API http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/cal_unix.c?r1=1.19r2=1.20diff_format=u Index: php-src/ext/calendar/cal_unix.c diff -u php-src/ext/calendar/cal_unix.c:1.19 php-src/ext/calendar/cal_unix.c:1.20 --- php-src/ext/calendar/cal_unix.c:1.19Sun Jan 1 13:09:48 2006 +++ php-src/ext/calendar/cal_unix.c Wed Oct 4 12:50:02 2006 @@ -28,28 +28,19 @@ Convert UNIX timestamp to Julian Day */ PHP_FUNCTION(unixtojd) { - zval *timestamp; + time_t timestamp = time(NULL); long jdate; - time_t t; struct tm *ta, tmbuf; - int myargc=ZEND_NUM_ARGS(); - if ((myargc 1) || (zend_get_parameters(ht, myargc, timestamp) != SUCCESS)) { -WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |l, timestamp) == FAILURE) { +return; } - if(myargc==1) { -convert_to_long(timestamp); -t = Z_LVAL_P(timestamp); - } else { -t = time(NULL); - } - - if(t 0) { + if(timestamp 0) { RETURN_FALSE; } - ta = php_localtime_r(t, tmbuf); + ta = php_localtime_r(timestamp, tmbuf); jdate = GregorianToSdn(ta-tm_year+1900, ta-tm_mon+1, ta-tm_mday); RETURN_LONG(jdate); @@ -60,17 +51,13 @@ Convert Julian Day to UNIX timestamp */ PHP_FUNCTION(jdtounix) { - zval *jday; - long uday; + long uday, jday; - if ((ZEND_NUM_ARGS()!= 1) || (zend_get_parameters(ht, 1, jday) != SUCCESS)) { -WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, jday) != SUCCESS) { +return; } - convert_to_long(jday); - - uday = Z_LVAL_P(jday) - 2440588 /* J.D. of 1.1.1970 */; - + uday = jday - 2440588; /* J.D. of 1.1.1970 */ if(uday0) RETURN_FALSE; /* before beginning of unix epoch */ if(uday24755) RETURN_FALSE; /* behind end of unix epoch */ -- 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 credits_ext.h
edink Wed Oct 4 12:51:33 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard credits_ext.h Log: Update credits http://cvs.php.net/viewvc.cgi/php-src/ext/standard/credits_ext.h?r1=1.30.2.6.2.3r2=1.30.2.6.2.4diff_format=u Index: php-src/ext/standard/credits_ext.h diff -u php-src/ext/standard/credits_ext.h:1.30.2.6.2.3 php-src/ext/standard/credits_ext.h:1.30.2.6.2.4 --- php-src/ext/standard/credits_ext.h:1.30.2.6.2.3 Thu Aug 31 22:52:54 2006 +++ php-src/ext/standard/credits_ext.h Wed Oct 4 12:51:33 2006 @@ -33,7 +33,7 @@ CREDIT_LINE(Iconv, Rui Hirokawa, Stig Bakken, Moriyoshi Koizumi ); CREDIT_LINE(IMAP, Rex Logan, Mark Musone, Brian Wang, Kaj-Michael Lang, Antoni Pamies Olive, Rasmus Lerdorf, Andrew Skalski, Chuck Hagenbuch, Daniel R Kalowsky); CREDIT_LINE(Informix, Danny Heijl, Christian Cartus, Corne' Cornelius); -CREDIT_LINE(Input Filter, Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye); +CREDIT_LINE(Input Filter, Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye, Ilia Alshanetsky); CREDIT_LINE(InterBase, Jouni Ahto, Andrew Avdeev, Ard Biesheuvel); CREDIT_LINE(JSON, Omar Kilani); CREDIT_LINE(LDAP, Amitay Isaacs, Eric Warnke, Rasmus Lerdorf, Gerrit Thomson, Stig Venaas); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard credits_ext.h
edink Wed Oct 4 12:53:03 2006 UTC Modified files: /php-src/ext/standard credits_ext.h Log: Update credits http://cvs.php.net/viewvc.cgi/php-src/ext/standard/credits_ext.h?r1=1.38r2=1.39diff_format=u Index: php-src/ext/standard/credits_ext.h diff -u php-src/ext/standard/credits_ext.h:1.38 php-src/ext/standard/credits_ext.h:1.39 --- php-src/ext/standard/credits_ext.h:1.38 Thu Aug 31 22:52:29 2006 +++ php-src/ext/standard/credits_ext.h Wed Oct 4 12:53:03 2006 @@ -33,7 +33,7 @@ CREDIT_LINE(Iconv, Rui Hirokawa, Stig Bakken, Moriyoshi Koizumi ); CREDIT_LINE(IMAP, Rex Logan, Mark Musone, Brian Wang, Kaj-Michael Lang, Antoni Pamies Olive, Rasmus Lerdorf, Andrew Skalski, Chuck Hagenbuch, Daniel R Kalowsky); CREDIT_LINE(Informix, Danny Heijl, Christian Cartus, Corne' Cornelius); -CREDIT_LINE(Input Filter, Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye); +CREDIT_LINE(Input Filter, Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye, Ilia Alshanetsky); CREDIT_LINE(InterBase, Jouni Ahto, Andrew Avdeev, Ard Biesheuvel); CREDIT_LINE(JSON, Omar Kilani); CREDIT_LINE(LDAP, Amitay Isaacs, Eric Warnke, Rasmus Lerdorf, Gerrit Thomson, Stig Venaas); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS
mikeWed Oct 4 12:58:02 2006 UTC Modified files: /php-srcNEWS Log: - output layer and ext/zlib news http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2126r2=1.2127diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2126 php-src/NEWS:1.2127 --- php-src/NEWS:1.2126 Tue Oct 3 19:37:01 2006 +++ php-src/NEWSWed Oct 4 12:58:02 2006 @@ -34,6 +34,8 @@ disabled. See sapi/cgi/CHANGES for more details. (Dmitry) - Improved cURL: (Ilia) . Added CURLINFO_HEADER_OUT constant to facilitate request retrieval. +- Improved ext/zlib; re-implemented non-file related functionality. (Mike) +- Improved output layer; see README.NEW-OUTPUT_API for internals. (Mike) - Added automatic module globals management. (Dmitry) - Added jump label operator (limited goto). (Dmitry, Sara) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo_sqlite/sqlite/src vdbeaux.c
tony2001Wed Oct 4 13:02:18 2006 UTC Modified files: /php-src/ext/pdo_sqlite/sqlite/src vdbeaux.c Log: add missing ifdef http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite/src/vdbeaux.c?r1=1.6r2=1.7diff_format=u Index: php-src/ext/pdo_sqlite/sqlite/src/vdbeaux.c diff -u php-src/ext/pdo_sqlite/sqlite/src/vdbeaux.c:1.6 php-src/ext/pdo_sqlite/sqlite/src/vdbeaux.c:1.7 --- php-src/ext/pdo_sqlite/sqlite/src/vdbeaux.c:1.6 Mon Aug 14 16:35:23 2006 +++ php-src/ext/pdo_sqlite/sqlite/src/vdbeaux.c Wed Oct 4 13:02:18 2006 @@ -1581,7 +1581,9 @@ int sqlite3VdbeCursorMoveto(Cursor *p){ if( p-deferredMoveto ){ int res, rc; +#ifdef SQLITE_TEST extern int sqlite3_search_count; +#endif assert( p-isTable ); if( p-isTable ){ rc = sqlite3BtreeMoveto(p-pCursor, 0, p-movetoTarget, res); -- 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/pdo_sqlite/sqlite/src vdbeaux.c
tony2001Wed Oct 4 13:02:36 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pdo_sqlite/sqlite/src vdbeaux.c Log: add missing ifdef http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite/src/vdbeaux.c?r1=1.3.2.2.2.1r2=1.3.2.2.2.2diff_format=u Index: php-src/ext/pdo_sqlite/sqlite/src/vdbeaux.c diff -u php-src/ext/pdo_sqlite/sqlite/src/vdbeaux.c:1.3.2.2.2.1 php-src/ext/pdo_sqlite/sqlite/src/vdbeaux.c:1.3.2.2.2.2 --- php-src/ext/pdo_sqlite/sqlite/src/vdbeaux.c:1.3.2.2.2.1 Mon Aug 14 16:15:29 2006 +++ php-src/ext/pdo_sqlite/sqlite/src/vdbeaux.c Wed Oct 4 13:02:36 2006 @@ -1581,7 +1581,9 @@ int sqlite3VdbeCursorMoveto(Cursor *p){ if( p-deferredMoveto ){ int res, rc; +#ifdef SQLITE_TEST extern int sqlite3_search_count; +#endif assert( p-isTable ); if( p-isTable ){ rc = sqlite3BtreeMoveto(p-pCursor, 0, p-movetoTarget, res); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/xmlreader php_xmlreader.c
tony2001Wed Oct 4 13:30:41 2006 UTC Modified files: /php-src/ext/xmlreader php_xmlreader.c Log: add missing ifdef http://cvs.php.net/viewvc.cgi/php-src/ext/xmlreader/php_xmlreader.c?r1=1.41r2=1.42diff_format=u Index: php-src/ext/xmlreader/php_xmlreader.c diff -u php-src/ext/xmlreader/php_xmlreader.c:1.41 php-src/ext/xmlreader/php_xmlreader.c:1.42 --- php-src/ext/xmlreader/php_xmlreader.c:1.41 Sat Sep 16 18:21:53 2006 +++ php-src/ext/xmlreader/php_xmlreader.c Wed Oct 4 13:30:41 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_xmlreader.c,v 1.41 2006/09/16 18:21:53 nlopess Exp $ */ +/* $Id: php_xmlreader.c,v 1.42 2006/10/04 13:30:41 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -469,6 +469,7 @@ } /* }}} */ +#if LIBXML_VERSION = 20620 /* {{{ php_xmlreader_no_arg_string */ static void php_xmlreader_no_arg_string(INTERNAL_FUNCTION_PARAMETERS, xmlreader_read_char_t internal_function) { zval *id; @@ -490,6 +491,7 @@ } } /* }}} */ +#endif /* {{{ php_xmlreader_set_relaxng_schema */ static void php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAMETERS, int type) { -- 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/xmlreader php_xmlreader.c
tony2001Wed Oct 4 13:30:53 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/xmlreader php_xmlreader.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/xmlreader/php_xmlreader.c?r1=1.13.2.14.2.4r2=1.13.2.14.2.5diff_format=u Index: php-src/ext/xmlreader/php_xmlreader.c diff -u php-src/ext/xmlreader/php_xmlreader.c:1.13.2.14.2.4 php-src/ext/xmlreader/php_xmlreader.c:1.13.2.14.2.5 --- php-src/ext/xmlreader/php_xmlreader.c:1.13.2.14.2.4 Sat Sep 16 18:18:55 2006 +++ php-src/ext/xmlreader/php_xmlreader.c Wed Oct 4 13:30:53 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_xmlreader.c,v 1.13.2.14.2.4 2006/09/16 18:18:55 nlopess Exp $ */ +/* $Id: php_xmlreader.c,v 1.13.2.14.2.5 2006/10/04 13:30:53 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -471,6 +471,7 @@ } /* }}} */ +#if LIBXML_VERSION = 20620 /* {{{ php_xmlreader_no_arg_string */ static void php_xmlreader_no_arg_string(INTERNAL_FUNCTION_PARAMETERS, xmlreader_read_char_t internal_function) { zval *id; @@ -492,6 +493,7 @@ } } /* }}} */ +#endif /* {{{ php_xmlreader_set_relaxng_schema */ static void php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAMETERS, int type) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/calendar cal_unix.c
Hannes, It's better to pass a real long to the zend_parse_parameters and then cast it to (time_t) to avoid portability issues. -Andrei On Oct 4, 2006, at 5:50 AM, Hannes Magnusson wrote: - zval *timestamp; + time_t timestamp = time(NULL); long jdate; - time_t t; struct tm *ta, tmbuf; - int myargc=ZEND_NUM_ARGS(); - if ((myargc 1) || (zend_get_parameters(ht, myargc, timestamp) != SUCCESS)) { -WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |l, timestamp) == FAILURE) { +return; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard string.c
andrei Wed Oct 4 17:38:09 2006 UTC Modified files: /php-src/ext/standard string.c Log: - Mark stristr() with U. - zpp support for ucwords() http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.603r2=1.604diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.603 php-src/ext/standard/string.c:1.604 --- php-src/ext/standard/string.c:1.603 Wed Oct 4 17:25:12 2006 +++ php-src/ext/standard/string.c Wed Oct 4 17:38:09 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.603 2006/10/04 17:25:12 andrei Exp $ */ +/* $Id: string.c,v 1.604 2006/10/04 17:38:09 andrei Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -107,7 +107,7 @@ /* }}} */ int php_tag_find(char *tag, int len, char *set); -static void php_ucwords(zval *str); +static void php_ucwords(char *str, int str_len); static UChar* php_u_strtr_array(UChar *str, int slen, HashTable *hash, int minlen, int maxlen, int *outlen TSRMLS_DC); /* this is read-only, so it's ok */ @@ -1681,7 +1681,7 @@ } } else { RETVAL_STRINGL(str.s, str_len, 1); - php_ucwords(return_value); + php_ucwords(Z_STRVAL_P(return_value), str_len); } } /* }}} */ @@ -2337,7 +2337,7 @@ } /* }}} */ -/* {{{ proto string stristr(string haystack, string needle[, bool part]) +/* {{{ proto string stristr(string haystack, string needle[, bool part]) U Finds first occurrence of a string within another, case insensitive */ PHP_FUNCTION(stristr) { @@ -3695,13 +3695,13 @@ /* {{{ php_ucwords() Uppercase the first character of every word in a native string */ -static void php_ucwords(zval *str) +static void php_ucwords(char *str, int str_len) { register char *r, *r_end; - r = Z_STRVAL_P(str); + r = str; *r = toupper((unsigned char) *r); - for (r_end = r + Z_STRLEN_P(str) - 1; r r_end; ) { + for (r_end = r + str_len - 1; r r_end; ) { if (isspace((int) *(unsigned char *)r++)) { *r = toupper((unsigned char) *r); } @@ -3711,7 +3711,7 @@ /* {{{ php_u_ucwords() U Uppercase the first character of every word in an Unicode string */ -static void php_u_ucwords(zval *ustr, zval *retval TSRMLS_DC) +static void php_u_ucwords(UChar *ustr, int ustr_len, zval *retval TSRMLS_DC) { UChar32 cp = 0; UChar *tmp; @@ -3726,19 +3726,19 @@ * more than half of the codepoints in the string can follow a whitespace * and that maximum expansion is 2 UChar's. */ - retval_len = ((3 * Z_USTRLEN_P(ustr)) 1) + 2; + retval_len = ((3 * ustr_len) 1) + 2; tmp = eumalloc(retval_len); - while (pos Z_USTRLEN_P(ustr)) { + while (pos ustr_len) { - U16_NEXT(Z_USTRVAL_P(ustr), pos, Z_USTRLEN_P(ustr), cp); + U16_NEXT(ustr, pos, ustr_len, cp); if (u_isWhitespace(cp) == TRUE) { tmp_len += zend_codepoint_to_uchar(cp, tmp + tmp_len); last_was_space = TRUE; } else { if (last_was_space) { - tmp_len += u_strToUpper(tmp + tmp_len, retval_len - tmp_len, Z_USTRVAL_P(ustr) + last_pos, 1, UG(default_locale), status); + tmp_len += u_strToUpper(tmp + tmp_len, retval_len - tmp_len, ustr + last_pos, 1, UG(default_locale), status); last_was_space = FALSE; } else { tmp_len += zend_codepoint_to_uchar(cp, tmp + tmp_len); @@ -3762,32 +3762,32 @@ } /* }}} */ -/* {{{ proto string ucwords(string str) +/* {{{ proto string ucwords(string str) U Uppercase the first character of every word in a string */ PHP_FUNCTION(ucwords) { - zval **str; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, str) == FAILURE) { - WRONG_PARAM_COUNT; - } + zstr str; + int str_len; + zend_uchar str_type; - if (Z_TYPE_PP(str) != IS_UNICODE Z_TYPE_PP(str) != IS_STRING) { - convert_to_text_ex(str); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, t, str, str_len, str_type) == FAILURE) { + return; } - if (Z_TYPE_PP(str) == IS_UNICODE !Z_USTRLEN_PP(str)) { - RETURN_EMPTY_UNICODE(); - } else if (!Z_STRLEN_PP(str)) { - RETURN_EMPTY_STRING(); + if (str_len == 0) { + if (str_type == IS_UNICODE) { + RETURN_EMPTY_UNICODE(); + } else { + RETURN_EMPTY_STRING(); + } } - if (Z_TYPE_PP(str) == IS_UNICODE) { + if (str_type == IS_UNICODE) {
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard dir.c
iliaa Wed Oct 4 23:19:25 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard dir.c /php-srcNEWS Log: Fixed missing open_basedir check inside chdir() function. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.147.2.3r2=1.147.2.3.2.1diff_format=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.147.2.3 php-src/ext/standard/dir.c:1.147.2.3.2.1 --- php-src/ext/standard/dir.c:1.147.2.3Sun Feb 26 10:49:50 2006 +++ php-src/ext/standard/dir.c Wed Oct 4 23:19:25 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.147.2.3 2006/02/26 10:49:50 helly Exp $ */ +/* $Id: dir.c,v 1.147.2.3.2.1 2006/10/04 23:19:25 iliaa Exp $ */ /* {{{ includes/startup/misc */ @@ -286,7 +286,7 @@ RETURN_FALSE; } - if (PG(safe_mode) !php_checkuid(str, NULL, CHECKUID_CHECK_FILE_AND_DIR)) { + if ((PG(safe_mode) !php_checkuid(str, NULL, CHECKUID_CHECK_FILE_AND_DIR)) || php_check_open_basedir(str TSRMLS_CC)) { RETURN_FALSE; } ret = VCWD_CHDIR(str); http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.283r2=1.2027.2.547.2.284diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.283 php-src/NEWS:1.2027.2.547.2.284 --- php-src/NEWS:1.2027.2.547.2.283 Wed Oct 4 12:04:32 2006 +++ php-src/NEWSWed Oct 4 23:19:25 2006 @@ -7,6 +7,7 @@ - Fixed mess with CGI/CLI -d option (now it works with cgi; constants are working exactly like in php.ini; with FastCGI -d affects all requests). (Dmitry) +- Fixed missing open_basedir check inside chdir() function. (Ilia) - Fixed bug #39035 (Compatibilty issue between DOM and zend.ze1_compatibility_mode). (Rob) - Fixed bug #39032 (strcspn() stops on null character). (Tony) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) / NEWS /ext/standard dir.c
iliaa Wed Oct 4 23:20:02 2006 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/standard dir.c /php-srcNEWS Log: MFB: Fixed missing open_basedir check inside chdir() function. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.109.2.18.2.2r2=1.109.2.18.2.3diff_format=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.109.2.18.2.2 php-src/ext/standard/dir.c:1.109.2.18.2.3 --- php-src/ext/standard/dir.c:1.109.2.18.2.2 Sun Jan 1 13:46:57 2006 +++ php-src/ext/standard/dir.c Wed Oct 4 23:20:02 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.109.2.18.2.2 2006/01/01 13:46:57 sniper Exp $ */ +/* $Id: dir.c,v 1.109.2.18.2.3 2006/10/04 23:20:02 iliaa Exp $ */ /* {{{ includes/startup/misc */ @@ -275,7 +275,7 @@ RETURN_FALSE; } - if (PG(safe_mode) !php_checkuid(str, NULL, CHECKUID_CHECK_FILE_AND_DIR)) { + if ((PG(safe_mode) !php_checkuid(str, NULL, CHECKUID_CHECK_FILE_AND_DIR)) || php_check_open_basedir(str TSRMLS_CC)) { RETURN_FALSE; } ret = VCWD_CHDIR(str); http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.1247.2.920.2.165r2=1.1247.2.920.2.166diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.920.2.165 php-src/NEWS:1.1247.2.920.2.166 --- php-src/NEWS:1.1247.2.920.2.165 Thu Sep 28 15:16:40 2006 +++ php-src/NEWSWed Oct 4 23:20:02 2006 @@ -2,6 +2,7 @@ ||| ?? ??? 2006, Version 4.4.5 - Updated PCRE to version 6.7. (Ilia) +- Fixed missing open_basedir check inside chdir() function. (Ilia) - Fixed bug #38963 (Fixed a possible open_basedir bypass in tempnam()). (Ilia) - Fixed bug #38859 (parse_url() fails if passing '@' in passwd). (Tony,Ilia) - Fixed bug #38534 (segfault when calling setlocale() in userspace session -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard dir.c
iliaa Wed Oct 4 23:20:54 2006 UTC Modified files: /php-src/ext/standard dir.c Log: MFB: Fixed missing open_basedir check inside chdir() function. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.157r2=1.158diff_format=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.157 php-src/ext/standard/dir.c:1.158 --- php-src/ext/standard/dir.c:1.157Mon Oct 2 18:14:42 2006 +++ php-src/ext/standard/dir.c Wed Oct 4 23:20:54 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.157 2006/10/02 18:14:42 pollita Exp $ */ +/* $Id: dir.c,v 1.158 2006/10/04 23:20:54 iliaa Exp $ */ /* {{{ includes/startup/misc */ @@ -310,7 +310,9 @@ php_stream_path_param_encode(ppstr, str, str_len, REPORT_ERRORS, FG(default_context)) == FAILURE) { return; } - + if (php_check_open_basedir(str TSRMLS_CC)) { + RETURN_FALSE; + } ret = VCWD_CHDIR(str); if (ret != 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, %s (errno %d), strerror(errno), errno); -- 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/pgsql config.m4 pgsql.c
iliaa Wed Oct 4 23:27:03 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pgsql pgsql.c config.m4 /php-srcNEWS Log: Added support for character sets in pg_escape_string() for PostgreSQL 8.1.4 and higher. http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.331.2.13.2.6r2=1.331.2.13.2.7diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.331.2.13.2.6 php-src/ext/pgsql/pgsql.c:1.331.2.13.2.7 --- php-src/ext/pgsql/pgsql.c:1.331.2.13.2.6Tue Oct 3 15:21:47 2006 +++ php-src/ext/pgsql/pgsql.c Wed Oct 4 23:27:03 2006 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.331.2.13.2.6 2006/10/03 15:21:47 bjori Exp $ */ +/* $Id: pgsql.c,v 1.331.2.13.2.7 2006/10/04 23:27:03 iliaa Exp $ */ #include stdlib.h @@ -3547,20 +3547,36 @@ /* }}} */ #ifdef HAVE_PQESCAPE -/* {{{ proto string pg_escape_string(string data) +/* {{{ proto string pg_escape_string([resource connection,] string data) Escape string for text/char type */ PHP_FUNCTION(pg_escape_string) { char *from = NULL, *to = NULL; + zval *pgsql_link; + PGconn *pgsql; int to_len; int from_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, - from, from_len) == FAILURE) { - return; + int id; + + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, rs, pgsql_link, from, from_len) == SUCCESS) { + id = -1; + } else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, from, from_len) == SUCCESS) { + pgsql_link = NULL; + id = PGG(default_link); + } else { + WRONG_PARAM_COUNT; } - to = (char *)safe_emalloc(from_len, 2, 1); - to_len = (int)PQescapeString(to, from, from_len); + to = (char *) safe_emalloc(from_len, 2, 1); + +#ifdef HAVE_PQESCAPE_CONN + if (pgsql_link != NULL || id != -1) { + ZEND_FETCH_RESOURCE2(pgsql, PGconn *, pgsql_link, id, PostgreSQL link, le_link, le_plink); + to_len = (int) PQescapeStringConn(pgsql, to, from, (size_t)from_len, NULL); + } else +#endif + to_len = (int) PQescapeString(to, from, (size_t)from_len); + RETURN_STRINGL(to, to_len, 0); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/config.m4?r1=1.46.2.1.2.1r2=1.46.2.1.2.2diff_format=u Index: php-src/ext/pgsql/config.m4 diff -u php-src/ext/pgsql/config.m4:1.46.2.1.2.1 php-src/ext/pgsql/config.m4:1.46.2.1.2.2 --- php-src/ext/pgsql/config.m4:1.46.2.1.2.1Fri Sep 15 19:47:50 2006 +++ php-src/ext/pgsql/config.m4 Wed Oct 4 23:27:03 2006 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.46.2.1.2.1 2006/09/15 19:47:50 iliaa Exp $ +dnl $Id: config.m4,v 1.46.2.1.2.2 2006/10/04 23:27:03 iliaa Exp $ dnl AC_DEFUN([PHP_PGSQL_CHECK_FUNCTIONS],[ @@ -91,6 +91,7 @@ AC_CHECK_LIB(pq, PQgetCopyData,AC_DEFINE(HAVE_PQGETCOPYDATA,1,[PostgreSQL 7.4 or later])) AC_CHECK_LIB(pq, PQsetErrorVerbosity,AC_DEFINE(HAVE_PQSETERRORVERBOSITY,1,[PostgreSQL 7.4 or later])) AC_CHECK_LIB(pq, PQftable,AC_DEFINE(HAVE_PQFTABLE,1,[PostgreSQL 7.4 or later])) + AC_CHECK_LIB(pq, PQescapeStringConn, AC_DEFINE(HAVE_PQESCAPE_CONN,1,[PostgreSQL 8.1 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])) LIBS=$old_LIBS LDFLAGS=$old_LDFLAGS http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.284r2=1.2027.2.547.2.285diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.284 php-src/NEWS:1.2027.2.547.2.285 --- php-src/NEWS:1.2027.2.547.2.284 Wed Oct 4 23:19:25 2006 +++ php-src/NEWSWed Oct 4 23:27:03 2006 @@ -3,6 +3,8 @@ ?? Sep 2006, PHP 5.2.0 - Speedup array/HashTable copying. (Matt W, Dmitry) - Added ability to make SOAP call userspace PHP-XML converters. (Dmitry) +- Added support for character sets in pg_escape_string() for PostgreSQL + 8.1.4 and higher. (Ilia) - Fixed infinite loop when a wrong color index is given to imagefill (Pierre) - Fixed mess with CGI/CLI -d option (now it works with cgi; constants are working exactly like in php.ini; with FastCGI -d affects all requests). -- 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
iliaa Wed Oct 4 23:27:17 2006 UTC Modified files: /php-src/ext/pgsql pgsql.c config.m4 Log: MFB: Added support for character sets in pg_escape_string() for PostgreSQL 8.1.4 and higher. http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.355r2=1.356diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.355 php-src/ext/pgsql/pgsql.c:1.356 --- php-src/ext/pgsql/pgsql.c:1.355 Tue Oct 3 15:22:54 2006 +++ php-src/ext/pgsql/pgsql.c Wed Oct 4 23:27:17 2006 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.355 2006/10/03 15:22:54 bjori Exp $ */ +/* $Id: pgsql.c,v 1.356 2006/10/04 23:27:17 iliaa Exp $ */ #include stdlib.h @@ -3534,20 +3534,36 @@ /* }}} */ #ifdef HAVE_PQESCAPE -/* {{{ proto string pg_escape_string(string data) +/* {{{ proto string pg_escape_string([resource connection,] string data) Escape string for text/char type */ PHP_FUNCTION(pg_escape_string) { char *from = NULL, *to = NULL; + zval *pgsql_link; + PGconn *pgsql; int to_len; int from_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, - from, from_len) == FAILURE) { - return; + int id; + + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, rs, pgsql_link, from, from_len) == SUCCESS) { + id = -1; + } else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, from, from_len) == SUCCESS) { + pgsql_link = NULL; + id = PGG(default_link); + } else { + WRONG_PARAM_COUNT; } - to = (char *)safe_emalloc(from_len, 2, 1); - to_len = (int)PQescapeString(to, from, from_len); + to = (char *) safe_emalloc(from_len, 2, 1); + +#ifdef HAVE_PQESCAPE_CONN + if (pgsql_link != NULL || id != -1) { + ZEND_FETCH_RESOURCE2(pgsql, PGconn *, pgsql_link, id, PostgreSQL link, le_link, le_plink); + to_len = (int) PQescapeStringConn(pgsql, to, from, (size_t)from_len, NULL); + } else +#endif + to_len = (int) PQescapeString(to, from, (size_t)from_len); + RETURN_STRINGL(to, to_len, 0); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/config.m4?r1=1.48r2=1.49diff_format=u Index: php-src/ext/pgsql/config.m4 diff -u php-src/ext/pgsql/config.m4:1.48 php-src/ext/pgsql/config.m4:1.49 --- php-src/ext/pgsql/config.m4:1.48Fri Sep 15 19:48:55 2006 +++ php-src/ext/pgsql/config.m4 Wed Oct 4 23:27:17 2006 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.48 2006/09/15 19:48:55 iliaa Exp $ +dnl $Id: config.m4,v 1.49 2006/10/04 23:27:17 iliaa Exp $ dnl AC_DEFUN([PHP_PGSQL_CHECK_FUNCTIONS],[ @@ -91,6 +91,7 @@ AC_CHECK_LIB(pq, PQgetCopyData,AC_DEFINE(HAVE_PQGETCOPYDATA,1,[PostgreSQL 7.4 or later])) AC_CHECK_LIB(pq, PQsetErrorVerbosity,AC_DEFINE(HAVE_PQSETERRORVERBOSITY,1,[PostgreSQL 7.4 or later])) AC_CHECK_LIB(pq, PQftable,AC_DEFINE(HAVE_PQFTABLE,1,[PostgreSQL 7.4 or later])) + AC_CHECK_LIB(pq, PQescapeStringConn, AC_DEFINE(HAVE_PQESCAPE_CONN,1,[PostgreSQL 8.1 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])) LIBS=$old_LIBS LDFLAGS=$old_LDFLAGS -- 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/pdo_pgsql config.m4 pgsql_driver.c
iliaa Wed Oct 4 23:53:36 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pdo_pgsql config.m4 pgsql_driver.c /php-srcNEWS Log: Added support for character sets in PDO quote() method for PostgreSQL 8.1.4 and higher. http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/config.m4?r1=1.13r2=1.13.4.1diff_format=u Index: php-src/ext/pdo_pgsql/config.m4 diff -u php-src/ext/pdo_pgsql/config.m4:1.13 php-src/ext/pdo_pgsql/config.m4:1.13.4.1 --- php-src/ext/pdo_pgsql/config.m4:1.13Wed Jul 27 02:51:01 2005 +++ php-src/ext/pdo_pgsql/config.m4 Wed Oct 4 23:53:36 2006 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.13 2005/07/27 02:51:01 wez Exp $ +dnl $Id: config.m4,v 1.13.4.1 2006/10/04 23:53:36 iliaa Exp $ dnl if test $PHP_PDO != no; then @@ -82,6 +82,7 @@ old_LDFLAGS=$LDFLAGS LDFLAGS=$LDFLAGS -L$PGSQL_LIBDIR AC_CHECK_LIB(pq, PQescapeString,AC_DEFINE(HAVE_PQESCAPE,1,[PostgreSQL 7.2.0 or later])) + AC_CHECK_LIB(pq, PQescapeStringConn, AC_DEFINE(HAVE_PQESCAPE_CONN,1,[PostgreSQL 8.1.4 or later])) AC_CHECK_LIB(pq, PQsetnonblocking,AC_DEFINE(HAVE_PQSETNONBLOCKING,1,[PostgreSQL 7.0.x or later])) AC_CHECK_LIB(pq, PQcmdTuples,AC_DEFINE(HAVE_PQCMDTUPLES,1,[Broken libpq under windows])) AC_CHECK_LIB(pq, PQoidValue,AC_DEFINE(HAVE_PQOIDVALUE,1,[Older PostgreSQL])) http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/pgsql_driver.c?r1=1.53.2.14.2.2r2=1.53.2.14.2.3diff_format=u Index: php-src/ext/pdo_pgsql/pgsql_driver.c diff -u php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.2 php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.3 --- php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.2 Tue Sep 19 15:45:21 2006 +++ php-src/ext/pdo_pgsql/pgsql_driver.cWed Oct 4 23:53:36 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: pgsql_driver.c,v 1.53.2.14.2.2 2006/09/19 15:45:21 iliaa Exp $ */ +/* $Id: pgsql_driver.c,v 1.53.2.14.2.3 2006/10/04 23:53:36 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -322,13 +322,20 @@ (*quoted)[*quotedlen] = '\0'; free(escaped); break; - default: - *quoted = emalloc(2*unquotedlen + 3); + default: { + pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh-driver_data; + + *quoted = safe_emalloc(2, unquotedlen, 3); (*quoted)[0] = '\''; +#ifndef HAVE_PQESCAPE_CONN *quotedlen = PQescapeString(*quoted + 1, unquoted, unquotedlen); +#else + *quotedlen = PQescapeStringConn(H-server, *quoted + 1, unquoted, unquotedlen, NULL); +#endif (*quoted)[*quotedlen + 1] = '\''; (*quoted)[*quotedlen + 2] = '\0'; *quotedlen += 2; + } } return 1; } @@ -355,7 +362,11 @@ size_t l = strlen(name); name_escaped = safe_emalloc(l, 2, 1); +#ifndef HAVE_PQESCAPE_CONN PQescapeString(name_escaped, name, l); +#else + PQescapeStringConn(H-server, name_escaped, name, l, NULL); +#endif spprintf(q, 0, SELECT CURRVAL('%s'), name_escaped); res = PQexec(H-server, q); efree(name_escaped); http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.285r2=1.2027.2.547.2.286diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.285 php-src/NEWS:1.2027.2.547.2.286 --- php-src/NEWS:1.2027.2.547.2.285 Wed Oct 4 23:27:03 2006 +++ php-src/NEWSWed Oct 4 23:53:36 2006 @@ -5,6 +5,8 @@ - Added ability to make SOAP call userspace PHP-XML converters. (Dmitry) - Added support for character sets in pg_escape_string() for PostgreSQL 8.1.4 and higher. (Ilia) +- Added support for character sets in PDO quote() method for PostgreSQL + 8.1.4 and higher. (Ilia) - Fixed infinite loop when a wrong color index is given to imagefill (Pierre) - Fixed mess with CGI/CLI -d option (now it works with cgi; constants are working exactly like in php.ini; with FastCGI -d affects all requests). -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo_pgsql config.m4 pgsql_driver.c
iliaa Wed Oct 4 23:53:54 2006 UTC Modified files: /php-src/ext/pdo_pgsql config.m4 pgsql_driver.c Log: MFB: Added support for character sets in PDO quote() method for PostgreSQL 8.1.4 and higher. http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/config.m4?r1=1.13r2=1.14diff_format=u Index: php-src/ext/pdo_pgsql/config.m4 diff -u php-src/ext/pdo_pgsql/config.m4:1.13 php-src/ext/pdo_pgsql/config.m4:1.14 --- php-src/ext/pdo_pgsql/config.m4:1.13Wed Jul 27 02:51:01 2005 +++ php-src/ext/pdo_pgsql/config.m4 Wed Oct 4 23:53:54 2006 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.13 2005/07/27 02:51:01 wez Exp $ +dnl $Id: config.m4,v 1.14 2006/10/04 23:53:54 iliaa Exp $ dnl if test $PHP_PDO != no; then @@ -82,6 +82,7 @@ old_LDFLAGS=$LDFLAGS LDFLAGS=$LDFLAGS -L$PGSQL_LIBDIR AC_CHECK_LIB(pq, PQescapeString,AC_DEFINE(HAVE_PQESCAPE,1,[PostgreSQL 7.2.0 or later])) + AC_CHECK_LIB(pq, PQescapeStringConn, AC_DEFINE(HAVE_PQESCAPE_CONN,1,[PostgreSQL 8.1.4 or later])) AC_CHECK_LIB(pq, PQsetnonblocking,AC_DEFINE(HAVE_PQSETNONBLOCKING,1,[PostgreSQL 7.0.x or later])) AC_CHECK_LIB(pq, PQcmdTuples,AC_DEFINE(HAVE_PQCMDTUPLES,1,[Broken libpq under windows])) AC_CHECK_LIB(pq, PQoidValue,AC_DEFINE(HAVE_PQOIDVALUE,1,[Older PostgreSQL])) http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/pgsql_driver.c?r1=1.60r2=1.61diff_format=u Index: php-src/ext/pdo_pgsql/pgsql_driver.c diff -u php-src/ext/pdo_pgsql/pgsql_driver.c:1.60 php-src/ext/pdo_pgsql/pgsql_driver.c:1.61 --- php-src/ext/pdo_pgsql/pgsql_driver.c:1.60 Tue Sep 19 15:46:25 2006 +++ php-src/ext/pdo_pgsql/pgsql_driver.cWed Oct 4 23:53:54 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: pgsql_driver.c,v 1.60 2006/09/19 15:46:25 iliaa Exp $ */ +/* $Id: pgsql_driver.c,v 1.61 2006/10/04 23:53:54 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -264,13 +264,20 @@ (*quoted)[*quotedlen] = '\0'; free(escaped); break; - default: - *quoted = emalloc(2*unquotedlen + 3); + default: { + pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh-driver_data; + + *quoted = safe_emalloc(2, unquotedlen, 3); (*quoted)[0] = '\''; +#ifndef HAVE_PQESCAPE_CONN *quotedlen = PQescapeString(*quoted + 1, unquoted, unquotedlen); +#else + *quotedlen = PQescapeStringConn(H-server, *quoted + 1, unquoted, unquotedlen, NULL); +#endif (*quoted)[*quotedlen + 1] = '\''; (*quoted)[*quotedlen + 2] = '\0'; *quotedlen += 2; + } } return 1; } @@ -297,7 +304,11 @@ size_t l = strlen(name); name_escaped = safe_emalloc(l, 2, 1); +#ifndef HAVE_PQESCAPE_CONN PQescapeString(name_escaped, name, l); +#else + PQescapeStringConn(H-server, name_escaped, name, l, NULL); +#endif spprintf(q, 0, SELECT CURRVAL('%s'), name_escaped); res = PQexec(H-server, q); efree(name_escaped); -- 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/openssl xp_ssl.c
iliaa Thu Oct 5 00:38:01 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/opensslxp_ssl.c /php-srcNEWS Log: Fixed bug #39039 (SSL: fatal protocol error when fetching HTTPS from servers running Google web server). http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/xp_ssl.c?r1=1.22.2.3.2.1r2=1.22.2.3.2.2diff_format=u Index: php-src/ext/openssl/xp_ssl.c diff -u php-src/ext/openssl/xp_ssl.c:1.22.2.3.2.1 php-src/ext/openssl/xp_ssl.c:1.22.2.3.2.2 --- php-src/ext/openssl/xp_ssl.c:1.22.2.3.2.1 Fri May 26 00:32:07 2006 +++ php-src/ext/openssl/xp_ssl.cThu Oct 5 00:38:00 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: xp_ssl.c,v 1.22.2.3.2.1 2006/05/26 00:32:07 pajoye Exp $ */ +/* $Id: xp_ssl.c,v 1.22.2.3.2.2 2006/10/05 00:38:00 iliaa Exp $ */ #include php.h #include ext/standard/file.h @@ -57,17 +57,20 @@ * in an error condition arising from a network connection problem */ static int is_http_stream_talking_to_iis(php_stream *stream TSRMLS_DC) { - if (stream-wrapperdata stream-wrapper strcmp(stream-wrapper-wops-label, HTTP) == 0) { + if (stream-wrapperdata stream-wrapper strcasecmp(stream-wrapper-wops-label, HTTP) == 0) { /* the wrapperdata is an array zval containing the headers */ zval **tmp; #define SERVER_MICROSOFT_IIS Server: Microsoft-IIS +#define SERVER_GOOGLE Server: GFE/ zend_hash_internal_pointer_reset(Z_ARRVAL_P(stream-wrapperdata)); while (SUCCESS == zend_hash_get_current_data(Z_ARRVAL_P(stream-wrapperdata), (void**)tmp)) { if (strncasecmp(Z_STRVAL_PP(tmp), SERVER_MICROSOFT_IIS, sizeof(SERVER_MICROSOFT_IIS)-1) == 0) { return 1; + } else if (strncasecmp(Z_STRVAL_PP(tmp), SERVER_GOOGLE, sizeof(SERVER_GOOGLE)-1) == 0) { + return 1; } zend_hash_move_forward(Z_ARRVAL_P(stream-wrapperdata)); http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.286r2=1.2027.2.547.2.287diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.286 php-src/NEWS:1.2027.2.547.2.287 --- php-src/NEWS:1.2027.2.547.2.286 Wed Oct 4 23:53:36 2006 +++ php-src/NEWSThu Oct 5 00:38:01 2006 @@ -12,6 +12,8 @@ working exactly like in php.ini; with FastCGI -d affects all requests). (Dmitry) - Fixed missing open_basedir check inside chdir() function. (Ilia) +- Fixed bug #39039 (SSL: fatal protocol error when fetching HTTPS from + servers running Google web server). (Ilia) - Fixed bug #39035 (Compatibilty issue between DOM and zend.ze1_compatibility_mode). (Rob) - Fixed bug #39032 (strcspn() stops on null character). (Tony) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/openssl xp_ssl.c
iliaa Thu Oct 5 00:38:18 2006 UTC Modified files: /php-src/ext/opensslxp_ssl.c Log: MFB: Fixed bug #39039 (SSL: fatal protocol error when fetching HTTPS from servers running Google web server). http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/xp_ssl.c?r1=1.26r2=1.27diff_format=u Index: php-src/ext/openssl/xp_ssl.c diff -u php-src/ext/openssl/xp_ssl.c:1.26 php-src/ext/openssl/xp_ssl.c:1.27 --- php-src/ext/openssl/xp_ssl.c:1.26 Fri May 26 01:48:23 2006 +++ php-src/ext/openssl/xp_ssl.cThu Oct 5 00:38:18 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: xp_ssl.c,v 1.26 2006/05/26 01:48:23 pajoye Exp $ */ +/* $Id: xp_ssl.c,v 1.27 2006/10/05 00:38:18 iliaa Exp $ */ #include php.h #include ext/standard/file.h @@ -57,17 +57,20 @@ * in an error condition arising from a network connection problem */ static int is_http_stream_talking_to_iis(php_stream *stream TSRMLS_DC) { - if (stream-wrapperdata stream-wrapper strcmp(stream-wrapper-wops-label, HTTP) == 0) { + if (stream-wrapperdata stream-wrapper strcasecmp(stream-wrapper-wops-label, HTTP) == 0) { /* the wrapperdata is an array zval containing the headers */ zval **tmp; #define SERVER_MICROSOFT_IIS Server: Microsoft-IIS +#define SERVER_GOOGLE Server: GFE/ zend_hash_internal_pointer_reset(Z_ARRVAL_P(stream-wrapperdata)); while (SUCCESS == zend_hash_get_current_data(Z_ARRVAL_P(stream-wrapperdata), (void**)tmp)) { if (strncasecmp(Z_STRVAL_PP(tmp), SERVER_MICROSOFT_IIS, sizeof(SERVER_MICROSOFT_IIS)-1) == 0) { return 1; + } else if (strncasecmp(Z_STRVAL_PP(tmp), SERVER_GOOGLE, sizeof(SERVER_GOOGLE)-1) == 0) { + return 1; } zend_hash_move_forward(Z_ARRVAL_P(stream-wrapperdata)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / unicode-progress.txt
andrei Wed Oct 4 17:25:15 2006 UTC Modified files: /php-srcunicode-progress.txt Log: http://cvs.php.net/viewvc.cgi/php-src/unicode-progress.txt?r1=1.53r2=1.54diff_format=u Index: php-src/unicode-progress.txt diff -u php-src/unicode-progress.txt:1.53 php-src/unicode-progress.txt:1.54 --- php-src/unicode-progress.txt:1.53 Tue Oct 3 18:13:36 2006 +++ php-src/unicode-progress.txtWed Oct 4 17:25:15 2006 @@ -28,7 +28,6 @@ str_replace() stri_replace() -substr_compare() These are the problematic ones. There are a few approaches: 1. Case-fold both need and haystack and then do simple search. @@ -169,6 +168,7 @@ strtolower() strtoupper() substr() +substr_compare() substr_count() substr_replace() trim() -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard string.c /ext/standard/tests/strings bug39032.phpt
tony2001Wed Oct 4 11:12:21 2006 UTC Added files: /php-src/ext/standard/tests/strings bug39032.phpt Modified files: /php-src/ext/standard string.c Log: fix #39032 (strcspn() stops on null character) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.601r2=1.602diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.601 php-src/ext/standard/string.c:1.602 --- php-src/ext/standard/string.c:1.601 Wed Oct 4 10:52:32 2006 +++ php-src/ext/standard/string.c Wed Oct 4 11:12:21 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.601 2006/10/04 10:52:32 tony2001 Exp $ */ +/* $Id: string.c,v 1.602 2006/10/04 11:12:21 tony2001 Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -2306,11 +2306,12 @@ int codepts; UChar32 ch; - for (i = 0, codepts = 0 ; i len1 ; codepts++) { + for (i = 0, codepts = 0 ; i len1 ; ) { U16_NEXT(s1, i, len1, ch); - if (u_memchr32(s2, ch, len2)) { + if (!len2 || u_memchr32(s2, ch, len2)) { break; } + codepts++; } return codepts; } @@ -2329,7 +2330,7 @@ if (*spanp == c || p == s1_end) { return p - s1; } - } while (spanp++ s2_end); + } while (spanp++ (s2_end - 1)); c = *++p; } /* NOTREACHED */ http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/bug39032.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/bug39032.phpt +++ php-src/ext/standard/tests/strings/bug39032.phpt --TEST-- Bug #39032 (strcspn() stops on null character) --FILE-- ?php var_dump(strcspn(chr(0),x)); var_dump(strcspn(chr(0),)); var_dump(strcspn(chr(0),qweqwe)); var_dump(strcspn(chr(1),qweqwe)); echo Done\n; ? --EXPECTF-- int(1) int(0) int(1) int(1) Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php