[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Thu Oct 4 01:31:19 2007 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2827r2=1.2828diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2827 php-src/ChangeLog:1.2828 --- php-src/ChangeLog:1.2827Wed Oct 3 01:31:28 2007 +++ php-src/ChangeLog Thu Oct 4 01:31:18 2007 @@ -1,3 +1,173 @@ +2007-10-03 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_5_2) + NEWS + ext/pgsql/pgsql.c + ext/pgsql/pgsql.c + ext/pgsql/tests/80_bug42783.phpt: + + MFB: Fixed bug #42783 (pg_insert() does not accept an empty list for + insertion) + +* ext/pgsql/tests/80_bug42783.phpt + ext/pgsql/tests/80_bug42783.phpt: + + + MFB: Fixed bug #42783 (pg_insert() does not accept an empty list for + insertion) + +* (PHP_5_3) + ext/pgsql/pgsql.c + ext/pgsql/tests/80_bug42783.phpt + ext/pgsql/tests/80_bug42783.phpt: + + Fixed bug #42783 (pg_insert() does not accept an empty list for insertion) + +2007-10-03 Michael Wallner [EMAIL PROTECTED] + +* ext/curl/interface.c: + - fix CURLOPT_TIMEOUT_MS support (available since 7.16.2) + +2007-10-03 Antony Dovgal [EMAIL PROTECTED] + +* README.UNICODE + ZendEngine2/zend_language_scanner.l: + remove \u, \U and \C support in single quotes, as they are meant to contain + binary data only and no escape sequences except \' + fixes bug #42746 + +2007-10-03 Jani Taskinen [EMAIL PROTECTED] + +* (PHP_5_3) + ZendEngine2/zend_ini_parser.y: + MFH:- Removed the %destructor declaration (requires bison 1.875 or above) + +* ZendEngine2/zend_ini_parser.y: + - Removed the %destructor declaration (requires bison 1.875 or above) + +2007-10-03 David Soria Parra [EMAIL PROTECTED] + +* (PHP_5_3) + NEWS + ext/spl/spl_directory.c + ext/spl/spl_directory.h + ext/standard/file.c + ext/standard/file.h + ext/standard/tests/file/bug40501.csv + ext/standard/tests/file/bug40501.phpt + ext/standard/tests/file/fgetcsv_error.phpt: + MFH: Add an escape parameter to fgetcsv to satisfy rfc4180 and bug #40501. + [DOC] 5th parameter available since PHP 5.3+ + +2007-10-03 Dmitry Stogov [EMAIL PROTECTED] + +* ZendEngine2/tests/bug42820.phpt + ZendEngine2/tests/bug42820.phpt: + + file bug42820.phpt was initially added on branch PHP_5_3. + +* (PHP_5_3) + NEWS + ZendEngine2/zend_builtin_functions.c + ZendEngine2/zend_builtin_functions.c + ZendEngine2/zend_compile.h + ZendEngine2/zend_compile.h + ZendEngine2/zend_constants.c + ZendEngine2/zend_constants.c + ZendEngine2/zend_execute_API.c + ZendEngine2/zend_execute_API.c + ZendEngine2/tests/bug42820.phpt: + Fixed bug #42820 (defined() on constant with namespace prefixes tries to + load class). + +2007-10-03 David Soria Parra [EMAIL PROTECTED] + +* ext/standard/tests/file/bug40501.csv + ext/standard/tests/file/bug40501.csv + ext/standard/tests/file/bug40501.phpt + ext/standard/tests/file/bug40501.phpt + ext/standard/tests/file/fgetcsv_error.phpt: + + - Add an escape parameter to fgetcsv to satisfy rfc4180 and bug #40501. + +* ext/spl/spl_directory.c + ext/spl/spl_directory.h + ext/standard/file.c + ext/standard/file.h: + - Add an escape parameter to fgetcsv to satisfy rfc4180 and bug #40501. + +2007-10-03 Dmitry Stogov [EMAIL PROTECTED] + +* ZendEngine2/tests/bug42818.phpt + ZendEngine2/tests/bug42818.phpt + ZendEngine2/tests/bug42818.phpt: +1.1.4; + file bug42818.phpt was initially added on branch PHP_5_2. + +* (PHP_5_2) + NEWS + ZendEngine2/zend_vm_def.h + ZendEngine2/zend_vm_def.h + ZendEngine2/zend_vm_def.h + ZendEngine2/zend_vm_execute.h + ZendEngine2/zend_vm_execute.h + ZendEngine2/zend_vm_execute.h + ZendEngine2/tests/bug42818.phpt + ZendEngine2/tests/bug42818.phpt: + Fixed bug #42818 ($foo = clone(array()); leaks memory) + +* ZendEngine2/tests/bug42772.phpt + ZendEngine2/tests/bug42772.phpt + ZendEngine2/tests/bug42772.phpt: +1.1.4; + file bug42772.phpt was initially added on branch PHP_5_2. + +* (PHP_5_2) + NEWS + ZendEngine2/zend_vm_def.h + ZendEngine2/zend_vm_def.h + ZendEngine2/zend_vm_def.h + ZendEngine2/zend_vm_execute.h + ZendEngine2/zend_vm_execute.h + ZendEngine2/zend_vm_execute.h + ZendEngine2/tests/bug42772.phpt + ZendEngine2/tests/bug42772.phpt: + Fixed bug #42772 (Storing $this in a static var fails while handling a cast + to string) + +* ZendEngine2/zend_vm_def.h + ZendEngine2/zend_vm_def.h + ZendEngine2/zend_vm_execute.h + ZendEngine2/zend_vm_execute.h: + ws + +2007-10-03 Stanislav
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Thu Oct 4 01:31:22 2007 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1179r2=1.1180diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.1179 ZendEngine2/ChangeLog:1.1180 --- ZendEngine2/ChangeLog:1.1179Wed Oct 3 01:31:32 2007 +++ ZendEngine2/ChangeLog Thu Oct 4 01:31:22 2007 @@ -1,3 +1,77 @@ +2007-10-03 Antony Dovgal [EMAIL PROTECTED] + +* zend_language_scanner.l: + remove \u, \U and \C support in single quotes, as they are meant to contain + binary data only and no escape sequences except \' + fixes bug #42746 + +2007-10-03 Jani Taskinen [EMAIL PROTECTED] + +* (PHP_5_3) + zend_ini_parser.y: + MFH:- Removed the %destructor declaration (requires bison 1.875 or above) + +* zend_ini_parser.y: + - Removed the %destructor declaration (requires bison 1.875 or above) + +2007-10-03 Dmitry Stogov [EMAIL PROTECTED] + +* zend_builtin_functions.c + zend_builtin_functions.c + zend_compile.h + zend_compile.h + zend_constants.c + zend_constants.c + zend_execute_API.c + zend_execute_API.c + tests/bug42820.phpt: + Fixed bug #42820 (defined() on constant with namespace prefixes tries to + load class). + +* tests/bug42820.phpt + tests/bug42820.phpt: + + file bug42820.phpt was initially added on branch PHP_5_3. + +* zend_vm_def.h + zend_vm_def.h + zend_vm_def.h + zend_vm_execute.h + zend_vm_execute.h + zend_vm_execute.h + tests/bug42818.phpt + tests/bug42818.phpt: + Fixed bug #42818 ($foo = clone(array()); leaks memory) + +* tests/bug42818.phpt + tests/bug42818.phpt + tests/bug42818.phpt: +1.1.4; + file bug42818.phpt was initially added on branch PHP_5_2. + +* zend_vm_def.h + zend_vm_def.h + zend_vm_def.h + zend_vm_execute.h + zend_vm_execute.h + zend_vm_execute.h + tests/bug42772.phpt + tests/bug42772.phpt: + Fixed bug #42772 (Storing $this in a static var fails while handling a cast + to string) + +* tests/bug42772.phpt + tests/bug42772.phpt + tests/bug42772.phpt: +1.1.4; + file bug42772.phpt was initially added on branch PHP_5_2. + +* zend_vm_def.h + zend_vm_def.h + zend_vm_execute.h + zend_vm_execute.h: + ws + 2007-10-02 Jani Taskinen [EMAIL PROTECTED] * zend_ini_scanner.l: @@ -19466,7 +19540,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.1179 2007/10/03 01:31:32 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.1180 2007/10/04 01:31:22 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -21190,7 +21264,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.1179 2007/10/03 01:31:32 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.1180 2007/10/04 01:31:22 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php-src /ext/standard/tests/strings strcspn_basic.phpt
On 03.10.2007 08:00, Raghubansh wrote: Hi Antony, Please send me details of the failure. PHP version, test generated temp files(.out, .diff, etc ). It's already fixed, but I had to split the test into lots of small tests to be able to locate the one that fails. -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
pajoye Wed Oct 3 09:24:16 2007 UTC Modified files: /CVSROOTavail Log: - php-src karma for dsp http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1307r2=1.1308diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1307 CVSROOT/avail:1.1308 --- CVSROOT/avail:1.1307Sun Sep 30 15:37:08 2007 +++ CVSROOT/avail Wed Oct 3 09:24:16 2007 @@ -17,7 +17,7 @@ # The PHP Developers have full access to the full source trees for # PHP, as well as the documentation. -avail|mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs,skoduru,nrathna,jesus,gopalv,bjori,nlopess,wrowe,shire,zoe,scottmac,t2man|phpfi,php3! ,php-src,pecl,non-pecl,spl,phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no +avail|mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs,skoduru,nrathna,jesus,gopalv,bjori,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp|phpfi,! php3,php-src,pecl,non-pecl,spl,phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no # fastcgi implementation for IIS avail|shane,wez,edink|fastcgi-isapi -- 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/spl spl_directory.c spl_directory.h /ext/standard file.c file.h /ext/standard/tests/file bug40501.csv bug40501.phpt fgetcsv_error.phpt
dsp Wed Oct 3 10:44:32 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filebug40501.csv bug40501.phpt Modified files: /php-srcNEWS /php-src/ext/splspl_directory.c spl_directory.h /php-src/ext/standard file.c file.h /php-src/ext/standard/tests/filefgetcsv_error.phpt Log: MFH: Add an escape parameter to fgetcsv to satisfy rfc4180 and bug #40501. [DOC] 5th parameter available since PHP 5.3+ http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.20r2=1.2027.2.547.2.965.2.21diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.20 php-src/NEWS:1.2027.2.547.2.965.2.21 --- php-src/NEWS:1.2027.2.547.2.965.2.20Wed Oct 3 10:33:01 2007 +++ php-src/NEWSWed Oct 3 10:44:32 2007 @@ -1,6 +1,7 @@ PHPNEWS ||| ?? ??? 20??, PHP 5.3.0 +- Added optional escape character parameter to fgetcsv. (David Soria Parra) - Added xsl-setProfiling() for profiling stylesheets. (Christian) - Added long-option feature to getopt() and made getopt() available also on win32 systems by adding a common getopt implementation into core. http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.23.2.1r2=1.45.2.27.2.23.2.2diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.1 php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.2 --- php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.1 Thu Sep 27 18:00:44 2007 +++ php-src/ext/spl/spl_directory.c Wed Oct 3 10:44:32 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.1 2007/09/27 18:00:44 dmitry Exp $ */ +/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.2 2007/10/03 10:44:32 dsp Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -1589,7 +1589,7 @@ spl_filesystem_file_call(intern, func_ptr, pass_num_args, return_value, arg2 TSRMLS_CC); \ } -static int spl_filesystem_file_read_csv(spl_filesystem_object *intern, char delimiter, char enclosure, zval *return_value TSRMLS_DC) /* {{{ */ +static int spl_filesystem_file_read_csv(spl_filesystem_object *intern, char delimiter, char enclosure, char escape, zval *return_value TSRMLS_DC) /* {{{ */ { int ret = SUCCESS; @@ -1606,7 +1606,7 @@ } ALLOC_INIT_ZVAL(intern-u.file.current_zval); - php_fgetcsv(intern-u.file.stream, delimiter, enclosure, buf_len, buf, intern-u.file.current_zval TSRMLS_CC); + php_fgetcsv(intern-u.file.stream, delimiter, enclosure, escape, buf_len, buf, intern-u.file.current_zval TSRMLS_CC); if (return_value) { if (Z_TYPE_P(return_value) != IS_NULL) { zval_dtor(return_value); @@ -1632,7 +1632,7 @@ return FAILURE; } if (intern-flags SPL_FILE_OBJECT_READ_CSV) { - return spl_filesystem_file_read_csv(intern, intern-u.file.delimiter, intern-u.file.enclosure, NULL TSRMLS_CC); + return spl_filesystem_file_read_csv(intern, intern-u.file.delimiter, intern-u.file.enclosure, intern-u.file.escape, NULL TSRMLS_CC); } else { zend_call_method_with_0_params(this_ptr, Z_OBJCE_P(getThis()), intern-u.file.func_getCurr, getCurrentLine, retval); } @@ -1943,18 +1943,25 @@ } /* }}} */ -/* {{{ proto array SplFileObject::fgetcsv([string delimiter [, string enclosure]]) +/* {{{ proto array SplFileObject::fgetcsv([string delimiter [, string enclosure [, escape = '\\']]]) Return current line as csv */ SPL_METHOD(SplFileObject, fgetcsv) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - char delimiter = intern-u.file.delimiter, enclosure = intern-u.file.enclosure; - char *delim, *enclo; - int d_len, e_len; + char delimiter = intern-u.file.delimiter, enclosure = intern-u.file.enclosure, escape = intern-u.file.escape; + char *delim, *enclo, *esc; + int d_len, e_len, esc_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |ss, delim, d_len, enclo, e_len) == SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |sss, delim, d_len, enclo, e_len, esc, esc_len) == SUCCESS) { switch(ZEND_NUM_ARGS()) { + case 3: + if (esc_len != 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, escape must be a character); + RETURN_FALSE; +
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/network ip_x86_64.phpt
Hello Jani, right. Copying the tests is dangerous as people will forget to change all versions simply because they don't see them failing because they don't execute them. - +1 on __EXPECT(F|REGEX)?(_(32|64))?__ marcus Tuesday, October 2, 2007, 1:53:44 PM, you wrote: On Tue, 2007-10-02 at 15:44 +0400, Antony Dovgal wrote: On 02.10.2007 15:29, Jani Taskinen wrote: Oh..there was one for 64bit too..of course I missed that one since I tested on 32bit only. Yet another reason to not separate tests.. ;) (EXPECT64 :) Well, I think of suffixes more and more (test_name_64bit.phpt, test_name32bit.phpt). It becomes a real issue since the number of tests constantly increases and we have to parse execute more and more SKIPIF sections. Well, as the platform shouldn't matter and same code should be used, just sometimes it gives different expected result, having separate 32/64 bit expected result in same script would be more useful than having multiple copies of tests.. --Jani -- Patches/Donations: http://pecl.php.net/~jani/ Best regards, Marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/spl spl_directory.c spl_directory.h /ext/standard file.c file.h /ext/standard/tests/file bug40501.csv bug40501.phpt fgetcsv_error.phpt
Hello David, can you MFH this to 5.3. marcus Wednesday, October 3, 2007, 12:31:04 PM, you wrote: http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.136r2=1.137diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.136 php-src/ext/spl/spl_directory.c:1.137 --- php-src/ext/spl/spl_directory.c:1.136 Thu Sep 27 18:28:42 2007 +++ php-src/ext/spl/spl_directory.c Wed Oct 3 10:31:03 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_directory.c,v 1.136 2007/09/27 18:28:42 dmitry Exp $ */ +/* $Id: spl_directory.c,v 1.137 2007/10/03 10:31:03 dsp Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -1771,7 +1771,7 @@ spl_filesystem_file_call(intern, func_ptr, pass_num_args, return_value, arg2 TSRMLS_CC); \ } -static int spl_filesystem_file_read_csv(spl_filesystem_object *intern, char delimiter, char enclosure, zval *return_value TSRMLS_DC) /* {{{ */ +static int spl_filesystem_file_read_csv(spl_filesystem_object *intern, char delimiter, char enclosure, char escape, zval *return_value TSRMLS_DC) /* {{{ */ { int ret = SUCCESS; @@ -1788,7 +1788,7 @@ } ALLOC_INIT_ZVAL(intern-u.file.current_zval); - php_fgetcsv(intern-u.file.stream, delimiter, enclosure, buf_len, buf, intern-u.file.current_zval TSRMLS_CC); + php_fgetcsv(intern-u.file.stream, delimiter, enclosure, escape, buf_len, buf, intern-u.file.current_zval TSRMLS_CC); if (return_value) { if (Z_TYPE_P(return_value) != IS_NULL) { zval_dtor(return_value); @@ -1814,7 +1814,7 @@ return FAILURE; } if (intern-flags SPL_FILE_OBJECT_READ_CSV) { - return spl_filesystem_file_read_csv(intern, intern-u.file.delimiter, intern-u.file.enclosure, NULL TSRMLS_CC); + return spl_filesystem_file_read_csv(intern, intern-u.file.delimiter, intern-u.file.enclosure, intern-u.file.escape, NULL TSRMLS_CC); } else { zend_call_method_with_0_params(this_ptr, Z_OBJCE_P(getThis()), intern-u.file.func_getCurr, getCurrentLine, retval); } @@ -2149,13 +2149,20 @@ SPL_METHOD(SplFileObject, fgetcsv) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - char delimiter = intern-u.file.delimiter, enclosure = intern-u.file.enclosure; - char *delim, *enclo; - int d_len, e_len; + char delimiter = intern-u.file.delimiter, enclosure = intern-u.file.enclosure, escape = intern-u.file.escape; + char *delim, *enclo, *esc; + int d_len, e_len, esc_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |ss, delim, d_len, enclo, e_len) == SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |sss, delim, d_len, enclo, e_len, esc, esc_len) == SUCCESS) { switch(ZEND_NUM_ARGS()) { + case 3: + if (esc_len != 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, escape must be a character); + RETURN_FALSE; + } + escape = esc[0]; + case 2: if (e_len != 1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, enclosure must be a character); @@ -2173,23 +2180,30 @@ case 0: break; } - spl_filesystem_file_read_csv(intern, delimiter, enclosure, return_value TSRMLS_CC); + spl_filesystem_file_read_csv(intern, delimiter, enclosure, escape, return_value TSRMLS_CC); } } /* }}} */ -/* {{{ proto void SplFileObject::setCsvControl([string delimiter = ',' [, string enclosure = '']]) +/* {{{ proto void SplFileObject::setCsvControl([string delimiter = ',' [, string enclosure = '' [, string escape = '\\']]]) Set the delimiter and enclosure character used in fgetcsv */ SPL_METHOD(SplFileObject, setCsvControl) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - char delimiter = ',', enclosure = ''; - char *delim, *enclo; - int d_len, e_len; + char delimiter = ',', enclosure = '', escape='\\'; + char *delim, *enclo, *esc; + int d_len, e_len, esc_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |ss, delim, d_len, enclo, e_len) == SUCCESS) { + if
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/curl interface.c
mikeWed Oct 3 20:34:48 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/curl interface.c Log: MFH: fix CURLOPT_TIMEOUT_MS support http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.27r2=1.62.2.14.2.28diff_format=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.62.2.14.2.27 php-src/ext/curl/interface.c:1.62.2.14.2.28 --- php-src/ext/curl/interface.c:1.62.2.14.2.27 Wed Jul 4 13:34:23 2007 +++ php-src/ext/curl/interface.cWed Oct 3 20:34:48 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: interface.c,v 1.62.2.14.2.27 2007/07/04 13:34:23 tony2001 Exp $ */ +/* $Id: interface.c,v 1.62.2.14.2.28 2007/10/03 20:34:48 mike Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -387,7 +387,7 @@ REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERPWD); REGISTER_CURL_CONSTANT(CURLOPT_RANGE); REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT); -#ifdef CURLOPT_TIMEOUT_MS +#if LIBCURL_VERSION_NUM 0x071002 REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT_MS); #endif REGISTER_CURL_CONSTANT(CURLOPT_POSTFIELDS); @@ -433,7 +433,7 @@ REGISTER_CURL_CONSTANT(CURLOPT_RANDOM_FILE); REGISTER_CURL_CONSTANT(CURLOPT_EGDSOCKET); REGISTER_CURL_CONSTANT(CURLOPT_CONNECTTIMEOUT); -#ifdef CURLOPT_CONNECTTIMEOUT_MS +#if LIBCURL_VERSION_NUM 0x071002 REGISTER_CURL_CONSTANT(CURLOPT_CONNECTTIMEOUT_MS); #endif REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYPEER); @@ -1233,7 +1233,7 @@ case CURLOPT_MUTE: #endif case CURLOPT_TIMEOUT: -#ifdef CURLOPT_TIMEOUT_MS +#if LIBCURL_VERSION_NUM 0x071002 case CURLOPT_TIMEOUT_MS: #endif case CURLOPT_FTP_USE_EPSV: @@ -1252,7 +1252,7 @@ case CURLOPT_FRESH_CONNECT: case CURLOPT_FORBID_REUSE: case CURLOPT_CONNECTTIMEOUT: -#ifdef CURLOPT_CONNECTTIMEOUT_MS +#if LIBCURL_VERSION_NUM 0x071002 case CURLOPT_CONNECTTIMEOUT_MS: #endif case CURLOPT_SSL_VERIFYHOST: -- 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/curl interface.c
mikeWed Oct 3 20:34:01 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/curl interface.c Log: MFH: fix CURLOPT_TIMEOUT_MS support http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.27.2.1r2=1.62.2.14.2.27.2.2diff_format=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.62.2.14.2.27.2.1 php-src/ext/curl/interface.c:1.62.2.14.2.27.2.2 --- php-src/ext/curl/interface.c:1.62.2.14.2.27.2.1 Thu Sep 27 18:00:38 2007 +++ php-src/ext/curl/interface.cWed Oct 3 20:34:01 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: interface.c,v 1.62.2.14.2.27.2.1 2007/09/27 18:00:38 dmitry Exp $ */ +/* $Id: interface.c,v 1.62.2.14.2.27.2.2 2007/10/03 20:34:01 mike Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -387,7 +387,7 @@ REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERPWD); REGISTER_CURL_CONSTANT(CURLOPT_RANGE); REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT); -#ifdef CURLOPT_TIMEOUT_MS +#if LIBCURL_VERSION_NUM 0x071002 REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT_MS); #endif REGISTER_CURL_CONSTANT(CURLOPT_POSTFIELDS); @@ -433,7 +433,7 @@ REGISTER_CURL_CONSTANT(CURLOPT_RANDOM_FILE); REGISTER_CURL_CONSTANT(CURLOPT_EGDSOCKET); REGISTER_CURL_CONSTANT(CURLOPT_CONNECTTIMEOUT); -#ifdef CURLOPT_CONNECTTIMEOUT_MS +#if LIBCURL_VERSION_NUM 0x071002 REGISTER_CURL_CONSTANT(CURLOPT_CONNECTTIMEOUT_MS); #endif REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYPEER); @@ -1233,7 +1233,7 @@ case CURLOPT_MUTE: #endif case CURLOPT_TIMEOUT: -#ifdef CURLOPT_TIMEOUT_MS +#if LIBCURL_VERSION_NUM 0x071002 case CURLOPT_TIMEOUT_MS: #endif case CURLOPT_FTP_USE_EPSV: @@ -1252,7 +1252,7 @@ case CURLOPT_FRESH_CONNECT: case CURLOPT_FORBID_REUSE: case CURLOPT_CONNECTTIMEOUT: -#ifdef CURLOPT_CONNECTTIMEOUT_MS +#if LIBCURL_VERSION_NUM 0x071002 case CURLOPT_CONNECTTIMEOUT_MS: #endif case CURLOPT_SSL_VERIFYHOST: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/curl interface.c
mikeWed Oct 3 20:32:52 2007 UTC Modified files: /php-src/ext/curl interface.c Log: - fix CURLOPT_TIMEOUT_MS support (available since 7.16.2) http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.117r2=1.118diff_format=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.117 php-src/ext/curl/interface.c:1.118 --- php-src/ext/curl/interface.c:1.117 Thu Sep 27 18:28:38 2007 +++ php-src/ext/curl/interface.cWed Oct 3 20:32:52 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: interface.c,v 1.117 2007/09/27 18:28:38 dmitry Exp $ */ +/* $Id: interface.c,v 1.118 2007/10/03 20:32:52 mike Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -385,7 +385,7 @@ REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERPWD); REGISTER_CURL_CONSTANT(CURLOPT_RANGE); REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT); -#ifdef CURLOPT_TIMEOUT_MS +#if LIBCURL_VERSION_NUM 0x071002 REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT_MS); #endif REGISTER_CURL_CONSTANT(CURLOPT_POSTFIELDS); @@ -431,7 +431,7 @@ REGISTER_CURL_CONSTANT(CURLOPT_RANDOM_FILE); REGISTER_CURL_CONSTANT(CURLOPT_EGDSOCKET); REGISTER_CURL_CONSTANT(CURLOPT_CONNECTTIMEOUT); -#ifdef CURLOPT_CONNECTTIMEOUT_MS +#if LIBCURL_VERSION_NUM 0x071002 REGISTER_CURL_CONSTANT(CURLOPT_CONNECTTIMEOUT_MS); #endif REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYPEER); @@ -1239,7 +1239,7 @@ case CURLOPT_MUTE: #endif case CURLOPT_TIMEOUT: -#ifdef CURLOPT_TIMEOUT_MS +#if LIBCURL_VERSION_NUM 0x071002 case CURLOPT_TIMEOUT_MS: #endif case CURLOPT_FTP_USE_EPSV: @@ -1258,7 +1258,7 @@ case CURLOPT_FRESH_CONNECT: case CURLOPT_FORBID_REUSE: case CURLOPT_CONNECTTIMEOUT: -#ifdef CURLOPT_CONNECTTIMEOUT_MS +#if LIBCURL_VERSION_NUM 0x071002 case CURLOPT_CONNECTTIMEOUT_MS: #endif case CURLOPT_SSL_VERIFYHOST: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pgsql pgsql.c /ext/pgsql/tests 80_bug42783.phpt
iliaa Wed Oct 3 23:30:46 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/pgsql/tests80_bug42783.phpt Modified files: /php-src/ext/pgsql pgsql.c Log: Fixed bug #42783 (pg_insert() does not accept an empty list for insertion) http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.331.2.13.2.24.2.1r2=1.331.2.13.2.24.2.2diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24.2.1 php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24.2.2 --- php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24.2.1 Thu Sep 27 18:00:42 2007 +++ php-src/ext/pgsql/pgsql.c Wed Oct 3 23:30:46 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.331.2.13.2.24.2.1 2007/09/27 18:00:42 dmitry Exp $ */ +/* $Id: pgsql.c,v 1.331.2.13.2.24.2.2 2007/10/03 23:30:46 iliaa Exp $ */ #include stdlib.h @@ -5366,7 +5366,11 @@ assert(Z_TYPE_P(var_array) == IS_ARRAY); if (zend_hash_num_elements(Z_ARRVAL_P(var_array)) == 0) { - return FAILURE; + smart_str_appends(querystr, INSERT INTO ); + smart_str_appends(querystr, table); + smart_str_appends(querystr, DEFAULT VALUES); + + goto no_values; } /* convert input array if needed */ @@ -5424,6 +5428,9 @@ /* Remove the trailing , */ querystr.len--; smart_str_appends(querystr, );); + +no_values: + smart_str_0(querystr); if ((opt (PGSQL_DML_EXEC|PGSQL_DML_ASYNC)) @@ -5435,7 +5442,7 @@ } cleanup: - if (!(opt PGSQL_DML_NO_CONV)) { + if (!(opt PGSQL_DML_NO_CONV) converted) { zval_dtor(converted); FREE_ZVAL(converted); } http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/tests/80_bug42783.phpt?view=markuprev=1.1 Index: php-src/ext/pgsql/tests/80_bug42783.phpt +++ php-src/ext/pgsql/tests/80_bug42783.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pgsql pgsql.c /ext/pgsql/tests 80_bug42783.phpt
iliaa Wed Oct 3 23:31:05 2007 UTC Modified files: /php-src/ext/pgsql/tests80_bug42783.phpt /php-src/ext/pgsql pgsql.c Log: MFB: Fixed bug #42783 (pg_insert() does not accept an empty list for insertion) http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/tests/80_bug42783.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/pgsql/tests/80_bug42783.phpt diff -u /dev/null php-src/ext/pgsql/tests/80_bug42783.phpt:1.2 --- /dev/null Wed Oct 3 23:31:04 2007 +++ php-src/ext/pgsql/tests/80_bug42783.phptWed Oct 3 23:31:04 2007 @@ -0,0 +1,34 @@ +--TEST-- +Bug #42783 (pg_insert() does not support an empty value array) +--SKIPIF-- +?php +require_once('skipif.inc'); +? +--FILE-- +?php + +require_once('config.inc'); + +$dbh = @pg_connect($conn_str); +if (!$dbh) { + die (Could not connect to the server); +} + +pg_query(CREATE TABLE php_test (id SERIAL PRIMARY KEY, time TIMESTAMP NOT NULL DEFAULT now())); + +pg_insert($dbh, 'php_test', array()); + +var_dump(pg_fetch_assoc(pg_query(SELECT * FROM php_test))); + +pg_query($dbh, DROP TABLE php_test); +pg_close($dbh); +? +===DONE=== +--EXPECTF-- +array(2) { + [id]= + string(%d) %d + [time]= + string(%d) %s +} +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.373r2=1.374diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.373 php-src/ext/pgsql/pgsql.c:1.374 --- php-src/ext/pgsql/pgsql.c:1.373 Thu Sep 27 18:28:41 2007 +++ php-src/ext/pgsql/pgsql.c Wed Oct 3 23:31:04 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.373 2007/09/27 18:28:41 dmitry Exp $ */ +/* $Id: pgsql.c,v 1.374 2007/10/03 23:31:04 iliaa Exp $ */ #include stdlib.h @@ -5344,7 +5344,11 @@ assert(Z_TYPE_P(var_array) == IS_ARRAY); if (zend_hash_num_elements(Z_ARRVAL_P(var_array)) == 0) { - return FAILURE; + smart_str_appends(querystr, INSERT INTO ); + smart_str_appends(querystr, table); + smart_str_appends(querystr, DEFAULT VALUES); + + goto no_values; } /* convert input array if needed */ @@ -5402,6 +5406,9 @@ /* Remove the trailing , */ querystr.len--; smart_str_appends(querystr, );); + +no_values: + smart_str_0(querystr); if ((opt (PGSQL_DML_EXEC|PGSQL_DML_ASYNC)) @@ -5413,7 +5420,7 @@ } cleanup: - if (!(opt PGSQL_DML_NO_CONV)) { + if (!(opt PGSQL_DML_NO_CONV) converted) { zval_dtor(converted); FREE_ZVAL(converted); } -- 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 pgsql.c /ext/pgsql/tests 80_bug42783.phpt
iliaa Wed Oct 3 23:31:58 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/pgsql/tests80_bug42783.phpt Modified files: /php-src/ext/pgsql pgsql.c /php-srcNEWS Log: MFB: Fixed bug #42783 (pg_insert() does not accept an empty list for insertion) http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.331.2.13.2.24r2=1.331.2.13.2.25diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24 php-src/ext/pgsql/pgsql.c:1.331.2.13.2.25 --- php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24 Wed Sep 5 13:03:59 2007 +++ php-src/ext/pgsql/pgsql.c Wed Oct 3 23:31:58 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.331.2.13.2.24 2007/09/05 13:03:59 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.331.2.13.2.25 2007/10/03 23:31:58 iliaa Exp $ */ #include stdlib.h @@ -5366,7 +5366,11 @@ assert(Z_TYPE_P(var_array) == IS_ARRAY); if (zend_hash_num_elements(Z_ARRVAL_P(var_array)) == 0) { - return FAILURE; + smart_str_appends(querystr, INSERT INTO ); + smart_str_appends(querystr, table); + smart_str_appends(querystr, DEFAULT VALUES); + + goto no_values; } /* convert input array if needed */ @@ -5424,6 +5428,9 @@ /* Remove the trailing , */ querystr.len--; smart_str_appends(querystr, );); + +no_values: + smart_str_0(querystr); if ((opt (PGSQL_DML_EXEC|PGSQL_DML_ASYNC)) @@ -5435,7 +5442,7 @@ } cleanup: - if (!(opt PGSQL_DML_NO_CONV)) { + if (!(opt PGSQL_DML_NO_CONV) converted) { zval_dtor(converted); FREE_ZVAL(converted); } http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.969r2=1.2027.2.547.2.970diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.969 php-src/NEWS:1.2027.2.547.2.970 --- php-src/NEWS:1.2027.2.547.2.969 Wed Oct 3 09:47:23 2007 +++ php-src/NEWSWed Oct 3 23:31:58 2007 @@ -35,6 +35,8 @@ - Fixed bug #42818 ($foo = clone(array()); leaks memory). (Dmitry) - Fixed bug #42785 (json_encode() formats doubles according to locale rather then following standard syntax). (Ilia) +- Fixed bug #42783 (pg_insert() does not accept an empty list for + insertion). (Ilia) - Fixed bug #42772 (Storing $this in a static var fails while handling a cast to string). (Dmitry) - Fixed bug #42767 (highlight_string() truncates trailing comment). (Ilia) http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/tests/80_bug42783.phpt?view=markuprev=1.1 Index: php-src/ext/pgsql/tests/80_bug42783.phpt +++ php-src/ext/pgsql/tests/80_bug42783.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php