[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c branches/PHP_5_3/ext/mysqli/tests/bug53503.phpt trunk/ext/mysqli/mysqli_nonapi.c trunk/ext/mysqli/tests/b
kalleSun, 12 Dec 2010 16:17:50 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306266 Log: Fixed bug #53503 (mysqli::query returns false after successful LOAD DATA query) Bug: http://bugs.php.net/53503 (error getting bug information) Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c A php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug53503.phpt U php/php-src/trunk/ext/mysqli/mysqli_nonapi.c A php/php-src/trunk/ext/mysqli/tests/bug53503.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-12 16:06:41 UTC (rev 306265) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-12 16:17:50 UTC (rev 306266) @@ -11,6 +11,10 @@ . Fixed bug #53512 (NumberFormatter::setSymbol crash on bogus $attr values). (Felipe) +- MySQL Improved extension: + . Fixed bug #53503 (mysqli::query returns false after successful LOAD DATA +query). (Kalle) + - PDO Oracle driver: . Fixed bug #39199 (Cannot load Lob data with more than 4000 bytes on ORACLE 10). (spatar at mail dot nnov dot ru) Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c === --- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c 2010-12-12 16:06:41 UTC (rev 306265) +++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c 2010-12-12 16:17:50 UTC (rev 306266) @@ -538,7 +538,7 @@ result = mysql_use_result(mysql-mysql); break; } - if (!result) { + if (!result mysql_errno(mysql-mysql)) { php_mysqli_throw_sql_exception((char *)mysql_sqlstate(mysql-mysql), mysql_errno(mysql-mysql) TSRMLS_CC, %s, mysql_error(mysql-mysql)); RETURN_FALSE; Added: php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug53503.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug53503.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug53503.phpt 2010-12-12 16:17:50 UTC (rev 306266) @@ -0,0 +1,50 @@ +--TEST-- +Bug #53503 (mysqli::query returns false after successful LOAD DATA query) +--SKIPIF-- +?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +? +--FILE-- +?php + require_once(connect.inc); + + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf([001] Connect failed, [%d] %s\n, mysqli_connect_errno(), mysqli_connect_error()); + } + + if (!$link-query(DROP TABLE IF EXISTS tlocaldata)) { + printf([002] [%d] %s\n, $link-errno, $link-error); + } + + if (!$link-query(CREATE TABLE tlocaldata (dump1 INT UNSIGNED NOT NULL PRIMARY KEY) ENGINE= . $engine)) { + printf([003] [%d] %s\n, $link-errno, $link-error); + } + + file_put_contents('bug53503.data', 'jokijoki'); + + if (!$link-query(LOAD DATA LOCAL INFILE 'bug53503.data' REPLACE INTO TABLE tlocaldata (dump1))) { + echo bug; + } else { + echo done; + } +? +--CLEAN-- +?php +require_once('connect.inc'); + +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf([clean] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n, + $host, $user, $db, $port, $socket); +} + +if (!mysqli_query($link, 'DROP TABLE IF EXISTS tlocaldata')) { + printf([clean] Failed to drop old test table: [%d] %s\n, mysqli_errno($link), mysqli_error($link)); +} + +mysqli_close($link); + +unlink('bug53503.data'); +? +--EXPECT-- +done \ No newline at end of file Modified: php/php-src/trunk/ext/mysqli/mysqli_nonapi.c === --- php/php-src/trunk/ext/mysqli/mysqli_nonapi.c2010-12-12 16:06:41 UTC (rev 306265) +++ php/php-src/trunk/ext/mysqli/mysqli_nonapi.c2010-12-12 16:17:50 UTC (rev 306266) @@ -526,7 +526,7 @@ result = mysql_use_result(mysql-mysql); break; } - if (!result) { + if (!result mysql_errno(mysql-mysql)) { php_mysqli_throw_sql_exception((char *)mysql_sqlstate(mysql-mysql), mysql_errno(mysql-mysql) TSRMLS_CC, %s, mysql_error(mysql-mysql)); RETURN_FALSE; Added: php/php-src/trunk/ext/mysqli/tests/bug53503.phpt === --- php/php-src/trunk/ext/mysqli/tests/bug53503.phpt (rev 0) +++
[PHP-CVS] svn: /php/php-src/trunk/Zend/ tests/traits/bugs/case-sensitive.phpt tests/traits/conflict001.phpt tests/traits/conflict003.phpt tests/traits/error_011.phpt tests/traits/error_015.phpt tests/
gron Sun, 12 Dec 2010 16:48:02 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306267 Log: Changed collision warning for Traits to fatal error. #This change is made to have all possible cases of collisions consistently handled as fatal errors. #The reason to have it fatal is that most likely something changed unexpectedly and needs urgent attention by the developer, since it will fail eventually anyway for instance because the expected method is missing in the class. #Discussed in this thread: http://marc.info/?l=php-internalsm=129155790226876 Changed paths: U php/php-src/trunk/Zend/tests/traits/bugs/case-sensitive.phpt U php/php-src/trunk/Zend/tests/traits/conflict001.phpt U php/php-src/trunk/Zend/tests/traits/conflict003.phpt U php/php-src/trunk/Zend/tests/traits/error_011.phpt U php/php-src/trunk/Zend/tests/traits/error_015.phpt U php/php-src/trunk/Zend/tests/traits/language011.phpt U php/php-src/trunk/Zend/tests/traits/methods_002.phpt U php/php-src/trunk/Zend/zend_compile.c Modified: php/php-src/trunk/Zend/tests/traits/bugs/case-sensitive.phpt === --- php/php-src/trunk/Zend/tests/traits/bugs/case-sensitive.phpt 2010-12-12 16:17:50 UTC (rev 306266) +++ php/php-src/trunk/Zend/tests/traits/bugs/case-sensitive.phpt 2010-12-12 16:48:02 UTC (rev 306267) @@ -20,6 +20,4 @@ } ? --EXPECTF-- -Warning: Trait method M1 has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d - -Warning: Trait method M2 has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d \ No newline at end of file +Fatal error: Trait method M1 has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d Modified: php/php-src/trunk/Zend/tests/traits/conflict001.phpt === --- php/php-src/trunk/Zend/tests/traits/conflict001.phpt2010-12-12 16:17:50 UTC (rev 306266) +++ php/php-src/trunk/Zend/tests/traits/conflict001.phpt2010-12-12 16:48:02 UTC (rev 306267) @@ -22,4 +22,4 @@ } ? --EXPECTF-- -Warning: Trait method hello has not been applied, because there are collisions with other trait methods on TraitsTest in %s on line %d \ No newline at end of file +Fatal error: Trait method hello has not been applied, because there are collisions with other trait methods on TraitsTest in %s on line %d \ No newline at end of file Modified: php/php-src/trunk/Zend/tests/traits/conflict003.phpt === --- php/php-src/trunk/Zend/tests/traits/conflict003.phpt2010-12-12 16:17:50 UTC (rev 306266) +++ php/php-src/trunk/Zend/tests/traits/conflict003.phpt2010-12-12 16:48:02 UTC (rev 306267) @@ -28,6 +28,4 @@ ? --EXPECTF-- -Warning: Trait method smallTalk has not been applied, because there are collisions with other trait methods on Talker in %s on line %d - -Warning: Trait method bigTalk has not been applied, because there are collisions with other trait methods on Talker in %s on line %d \ No newline at end of file +Fatal error: Trait method smallTalk has not been applied, because there are collisions with other trait methods on Talker in %s on line %d \ No newline at end of file Modified: php/php-src/trunk/Zend/tests/traits/error_011.phpt === --- php/php-src/trunk/Zend/tests/traits/error_011.phpt 2010-12-12 16:17:50 UTC (rev 306266) +++ php/php-src/trunk/Zend/tests/traits/error_011.phpt 2010-12-12 16:48:02 UTC (rev 306267) @@ -23,6 +23,4 @@ ? --EXPECTF-- -Warning: Trait method test has not been applied, because there are collisions with other trait methods on bar in %s on line %d - -Fatal error: Call to undefined method bar::test() in %s on line %d +Fatal error: Trait method test has not been applied, because there are collisions with other trait methods on bar in %s on line %d Modified: php/php-src/trunk/Zend/tests/traits/error_015.phpt === --- php/php-src/trunk/Zend/tests/traits/error_015.phpt 2010-12-12 16:17:50 UTC (rev 306266) +++ php/php-src/trunk/Zend/tests/traits/error_015.phpt 2010-12-12 16:48:02 UTC (rev 306267) @@ -23,6 +23,4 @@ ? --EXPECTF-- -Warning: Trait method test has not been applied, because there are collisions with other trait methods on bar in %s on line %d - -Fatal error: Call to undefined method bar::test() in %s on line %d +Fatal error: Trait method test has not been applied, because there are collisions with other trait methods on bar in %s on line %d Modified: php/php-src/trunk/Zend/tests/traits/language011.phpt === ---
Re: [PHP-CVS] svn: /php/php-src/trunk/Zend/ tests/traits/bugs/case-sensitive.phpt tests/traits/conflict001.phpt tests/traits/conflict003.phpt tests/traits/error_011.phpt tests/traits/error_015.phpt te
Hi Stefan 2010/12/12 Stefan Marr g...@php.net: Modified: php/php-src/trunk/Zend/zend_compile.c === --- php/php-src/trunk/Zend/zend_compile.c 2010-12-12 16:17:50 UTC (rev 306266) +++ php/php-src/trunk/Zend/zend_compile.c 2010-12-12 16:48:02 UTC (rev 306267) @@ -3459,7 +3459,7 @@ if (zend_hash_quick_find(ce-function_table, hash_key-arKey, hash_key-nKeyLength, hash_key-h, (void **)class_fn) == FAILURE || class_fn-common.scope != ce) { - zend_error(E_WARNING, Trait method %s has not been applied, because there are collisions with other trait methods on %s, fn-common.function_name, ce-name); + zend_error(E_ERROR, Trait method %s has not been applied, because there are collisions with other trait methods on %s, fn-common.function_name, ce-name); } Wouldn't it make more sense to mark this as E_COMPILE_ERROR as it happens at compilation stage? -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ NEWS
derick Sun, 12 Dec 2010 17:07:40 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306270 Log: - Keep extension order alphabetically #- I guess that's what was intended? Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-12-12 17:07:36 UTC (rev 306269) +++ php/php-src/trunk/NEWS 2010-12-12 17:07:40 UTC (rev 306270) @@ -125,14 +125,6 @@ . Added Tokyo Cabinet abstract DB support. (Michael Maclean) . Added Berkeley DB 5 support. (Johannes, Chris Jones) -- Improved MySQL extensions: - . MySQL: Deprecated mysql_list_dbs(). FR #50667. (Andrey) - . mysqlnd: Added named pipes support. FR #48082. (Andrey) - . MySQLi: Added iterator support in MySQLi. mysqli_result implements -Traversable. (Andrey, Johannes) - . PDO_mysql: Removed support for linking with MySQL client libraries older -than 4.1. (Johannes) - - Improved filesystem functions: . scandir() now accepts SCANDIR_SORT_NONE as a possible sorting_order value. FR #53407. (Adam) @@ -155,6 +147,14 @@ . Added paged results support. FR #42060. (a...@openldap.org, iaren...@eteo.mondragon.edu, jean...@au-fil-du.net, remy.sai...@gmail.com) +- Improved MySQL extensions: + . MySQL: Deprecated mysql_list_dbs(). FR #50667. (Andrey) + . mysqlnd: Added named pipes support. FR #48082. (Andrey) + . MySQLi: Added iterator support in MySQLi. mysqli_result implements +Traversable. (Andrey, Johannes) + . PDO_mysql: Removed support for linking with MySQL client libraries older +than 4.1. (Johannes) + - Improved OpenSSL extension: . Added AES support. FR #48632. (yonas dot y at gmail dot com, Pierre) . Added a no_ticket SSL context option to disable the SessionTicket TLS -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/Zend/ zend_compile.c
gron Sun, 12 Dec 2010 17:12:29 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306272 Log: Changed E_ERROR to E_COMPILE_ERROR for Trait compilation errors. #Thanks for catching this Kalle. Changed paths: U php/php-src/trunk/Zend/zend_compile.c Modified: php/php-src/trunk/Zend/zend_compile.c === --- php/php-src/trunk/Zend/zend_compile.c 2010-12-12 17:09:20 UTC (rev 306271) +++ php/php-src/trunk/Zend/zend_compile.c 2010-12-12 17:12:29 UTC (rev 306272) @@ -3459,7 +3459,7 @@ if (zend_hash_quick_find(ce-function_table, hash_key-arKey, hash_key-nKeyLength, hash_key-h, (void **)class_fn) == FAILURE || class_fn-common.scope != ce) { - zend_error(E_ERROR, Trait method %s has not been applied, because there are collisions with other trait methods on %s, fn-common.function_name, ce-name); + zend_error(E_COMPILE_ERROR, Trait method %s has not been applied, because there are collisions with other trait methods on %s, fn-common.function_name, ce-name); } zend_function_dtor(fn); @@ -3468,7 +3468,7 @@ } else { /* Add it to result function table */ if (zend_hash_quick_add(resulting_table, hash_key-arKey, hash_key-nKeyLength, hash_key-h, fn, sizeof(zend_function), NULL)==FAILURE) { - zend_error(E_ERROR, Trait method %s has not been applied, because failure occured during updating resulting trait method table, fn-common.function_name); + zend_error(E_COMPILE_ERROR, Trait method %s has not been applied, because failure occured during updating resulting trait method table, fn-common.function_name); } } @@ -3632,7 +3632,7 @@ zend_traits_duplicate_function(fn_copy, estrdup(fn-common.function_name) TSRMLS_CC); if (zend_hash_quick_update(ce-function_table, hash_key-arKey, hash_key-nKeyLength, hash_key-h, fn_copy, sizeof(zend_function), (void**)fn_copy_p)==FAILURE) { - zend_error(E_ERROR, Trait method %s has not been applied, because failure occured during updating class method table, hash_key-arKey); + zend_error(E_COMPILE_ERROR, Trait method %s has not been applied, because failure occured during updating class method table, hash_key-arKey); } _ADD_MAGIC_METHOD(ce, hash_key-arKey, hash_key-nKeyLength, fn_copy_p); @@ -3687,7 +3687,7 @@ lcname = zend_str_tolower_dup(aliases[i]-alias, lcname_len); if (zend_hash_add(target, lcname, lcname_len+1, fn_copy, sizeof(zend_function), NULL)==FAILURE) { - zend_error(E_ERROR, Failed to add aliased trait method (%s) to the trait table. There is probably already a trait method with the same name, fn_copy.common.function_name); + zend_error(E_COMPILE_ERROR, Failed to add aliased trait method (%s) to the trait table. There is probably already a trait method with the same name, fn_copy.common.function_name); } /* aliases[i]-function = fn_copy; */ efree(lcname); @@ -3725,7 +3725,7 @@ } if (zend_hash_add(target, lcname, fnname_len+1, fn_copy, sizeof(zend_function), NULL)==FAILURE) { - zend_error(E_ERROR, Failed to add trait method (%s) to the trait table. There is probably already a trait method with the same name, fn_copy.common.function_name); + zend_error(E_COMPILE_ERROR, Failed to add trait method (%s) to the trait table. There is probably already a trait method with the same name, fn_copy.common.function_name); } } @@ -3799,7 +3799,7 @@ char* lcname = zend_str_tolower_dup(precedences[i]-trait_method-method_name, lcname_len); if (zend_hash_add(exclude_table, lcname, lcname_len, NULL, 0, NULL)==FAILURE) { - zend_error(E_ERROR, Failed to evaluate a trait precedence (%s). Method of trait %s was defined to be excluded multiple times, precedences[i]-trait_method-method_name, trait-name); + zend_error(E_COMPILE_ERROR, Failed to evaluate a trait precedence (%s). Method of trait %s was defined to be excluded multiple times, precedences[i]-trait_method-method_name, trait-name); }
[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/date/lib/parse_date.c ext/date/lib/parse_date.re ext/date/tests/bug51866.phpt
derick Sun, 12 Dec 2010 17:17:16 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306273 Log: - Added the + modifier to parseFromFormat to allow trailing text in the string to parse without throwing an error. #- Patch by Stas, test case by me. Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/ext/date/lib/parse_date.c U php/php-src/trunk/ext/date/lib/parse_date.re A php/php-src/trunk/ext/date/tests/bug51866.phpt Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-12-12 17:12:29 UTC (rev 306272) +++ php/php-src/trunk/NEWS 2010-12-12 17:17:16 UTC (rev 306273) @@ -121,6 +121,10 @@ . Added support for CURLOPT_MAX_RECV_SPEED_LARGE and CURLOPT_MAX_SEND_SPEED_LARGE. FR #51815. (Pierrick) +- Improved Date extension: + . Added the + modifier to parseFromFormat to allow trailing text in the +string to parse without throwing an error. (Stas, Derick) + - Improved DBA extension: . Added Tokyo Cabinet abstract DB support. (Michael Maclean) . Added Berkeley DB 5 support. (Johannes, Chris Jones) Modified: php/php-src/trunk/ext/date/lib/parse_date.c === --- php/php-src/trunk/ext/date/lib/parse_date.c 2010-12-12 17:12:29 UTC (rev 306272) +++ php/php-src/trunk/ext/date/lib/parse_date.c 2010-12-12 17:17:16 UTC (rev 306273) @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Sat Nov 13 14:56:03 2010 */ +/* Generated by re2c 0.13.5 on Sun Dec 12 16:09:49 2010 */ #line 1 ext/date/lib/parse_date.re /* +--+ @@ -24824,6 +24824,7 @@ timelib_sll tmp; Scanner in; Scanner *s = in; + int allow_extra = 0; memset(in, 0, sizeof(in)); in.errors = malloc(sizeof(struct timelib_error_container)); @@ -25049,6 +25050,10 @@ timelib_eat_until_separator((char **) ptr); break; + case '+': /* allow extra chars in the format */ + allow_extra = 1; + break; + default: if (*fptr != *ptr) { add_pbf_error(s, The format separator does not match, string, begin); @@ -25058,8 +25063,16 @@ fptr++; } if (*ptr) { - add_pbf_error(s, Trailing data, string, ptr); + if (allow_extra) { + add_pbf_warning(s, Trailing data, string, ptr); + } else { + add_pbf_error(s, Trailing data, string, ptr); + } } + /* ignore trailing +'s */ + while (*fptr == '+') { + fptr++; + } if (*fptr) { add_pbf_error(s, Data missing, string, ptr); } Modified: php/php-src/trunk/ext/date/lib/parse_date.re === --- php/php-src/trunk/ext/date/lib/parse_date.re2010-12-12 17:12:29 UTC (rev 306272) +++ php/php-src/trunk/ext/date/lib/parse_date.re2010-12-12 17:17:16 UTC (rev 306273) @@ -1831,6 +1831,7 @@ timelib_sll tmp; Scanner in; Scanner *s = in; + int allow_extra = 0; memset(in, 0, sizeof(in)); in.errors = malloc(sizeof(struct timelib_error_container)); @@ -2056,6 +2057,10 @@ timelib_eat_until_separator((char **) ptr); break; + case '+': /* allow extra chars in the format */ + allow_extra = 1; + break; + default: if (*fptr != *ptr) { add_pbf_error(s, The format separator does not match, string, begin); @@ -2065,8 +2070,16 @@ fptr++; } if (*ptr) { - add_pbf_error(s, Trailing data, string, ptr); + if (allow_extra) { + add_pbf_warning(s, Trailing data, string, ptr); + } else { + add_pbf_error(s, Trailing data, string, ptr); + } } + /* ignore trailing +'s */ + while (*fptr == '+') { + fptr++; + } if (*fptr) { add_pbf_error(s, Data missing, string, ptr); } Added: php/php-src/trunk/ext/date/tests/bug51866.phpt === --- php/php-src/trunk/ext/date/tests/bug51866.phpt (rev 0) +++ php/php-src/trunk/ext/date/tests/bug51866.phpt 2010-12-12 17:17:16 UTC (rev 306273) @@ -0,0 +1,159 @@ +--TEST-- +Bug #51866 (Lenient parsing with
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c trunk/ext/mysqli/mysqli_nonapi.c
kalleSun, 12 Dec 2010 18:00:25 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306278 Log: Fixed bug #53425 (mysqli_real_connect() ignores client flags when built to call libmysql) # Based on patch by tre-php-net at crushedhat dot com Bug: http://bugs.php.net/53425 (Assigned) mysqli_real_connect() ignores client flags when built to call libmysql Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c U php/php-src/trunk/ext/mysqli/mysqli_nonapi.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-12 18:00:19 UTC (rev 306277) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-12 18:00:25 UTC (rev 306278) @@ -14,6 +14,8 @@ - MySQL Improved extension: . Fixed bug #53503 (mysqli::query returns false after successful LOAD DATA query). (Kalle) + . Fixed bug #53425 (mysqli_real_connect() ignores client flags when built to +call libmysql). (Kalle, tre-php-net at crushedhat dot com) - PDO Oracle driver: . Fixed bug #39199 (Cannot load Lob data with more than 4000 bytes on Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c === --- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c 2010-12-12 18:00:19 UTC (rev 306277) +++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c 2010-12-12 18:00:25 UTC (rev 306278) @@ -231,7 +231,10 @@ #endif #if !defined(MYSQLI_USE_MYSQLND) - if (mysql_real_connect(mysql-mysql, hostname, username, passwd, dbname, port, socket, CLIENT_MULTI_RESULTS) == NULL) + /* BC for prior to bug fix #53425 */ + flags |= CLIENT_MULTI_RESULTS; + + if (mysql_real_connect(mysql-mysql, hostname, username, passwd, dbname, port, socket, flags) == NULL) #else if (mysqlnd_connect(mysql-mysql, hostname, username, passwd, passwd_len, dbname, dbname_len, port, socket, flags TSRMLS_CC) == NULL) Modified: php/php-src/trunk/ext/mysqli/mysqli_nonapi.c === --- php/php-src/trunk/ext/mysqli/mysqli_nonapi.c2010-12-12 18:00:19 UTC (rev 306277) +++ php/php-src/trunk/ext/mysqli/mysqli_nonapi.c2010-12-12 18:00:25 UTC (rev 306278) @@ -231,7 +231,10 @@ #endif #if !defined(MYSQLI_USE_MYSQLND) - if (mysql_real_connect(mysql-mysql, hostname, username, passwd, dbname, port, socket, CLIENT_MULTI_RESULTS) == NULL) + /* BC for prior to bug fix #53425 */ + flags |= CLIENT_MULTI_RESULTS; + + if (mysql_real_connect(mysql-mysql, hostname, username, passwd, dbname, port, socket, flags) == NULL) #else if (mysqlnd_connect(mysql-mysql, hostname, username, passwd, passwd_len, dbname, dbname_len, port, socket, flags TSRMLS_CC) == NULL) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ NEWS
iliaaSun, 12 Dec 2010 18:01:46 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306279 Log: sqlite3 lib news Changed paths: U php/php-src/trunk/NEWS Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2010-12-12 18:00:25 UTC (rev 306278) +++ php/php-src/trunk/NEWS 2010-12-12 18:01:46 UTC (rev 306279) @@ -1,7 +1,7 @@ PHPNEWS ||| ?? ??? 201?, PHP 5.3.99 -- Upgraded bundled Sqlite3 to version 3.7.3. (Ilia) +- Upgraded bundled Sqlite3 to version 3.7.4. (Ilia) - Upgraded bundled PCRE to version 8.10. (Ilia) - Removed legacy features: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/logical_filters.c branches/PHP_5_3/ext/filter/tests/018.phpt branches/PHP_5_3/ext/filter/tests/bug53150.phpt trunk/ext/fi
iliaaSun, 12 Dec 2010 18:36:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306282 Log: Fixed bug #53150 (FILTER_FLAG_NO_RES_RANGE is missing some IP ranges) Bug: http://bugs.php.net/53150 (Open) 127.0.0.1 is valid with FILTER_FLAG_NO_PRIV_RANGE/FILTER_FLAG_NO_RES_RANGE Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c U php/php-src/branches/PHP_5_3/ext/filter/tests/018.phpt A php/php-src/branches/PHP_5_3/ext/filter/tests/bug53150.phpt U php/php-src/trunk/ext/filter/logical_filters.c U php/php-src/trunk/ext/filter/tests/018.phpt A php/php-src/trunk/ext/filter/tests/bug53150.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-12 18:27:59 UTC (rev 306281) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-12 18:36:21 UTC (rev 306282) @@ -6,6 +6,10 @@ - Zend Engine: . Indirect reference to $this fails to resolve if direct $this is never used in method. (Scott) + +- Filter extension: + . Fixed bug #53150 (FILTER_FLAG_NO_RES_RANGE is missing some IP ranges). +(Ilia) - Intl extension: . Fixed bug #53512 (NumberFormatter::setSymbol crash on bogus $attr values). Modified: php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c === --- php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c 2010-12-12 18:27:59 UTC (rev 306281) +++ php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c 2010-12-12 18:36:21 UTC (rev 306282) @@ -710,8 +710,11 @@ if (flags FILTER_FLAG_NO_RES_RANGE) { if ( (ip[0] == 0) || + (ip[0] == 128 ip[1] == 0) || + (ip[0] == 191 ip[1] == 255) || (ip[0] == 169 ip[1] == 254) || (ip[0] == 192 ip[1] == 0 ip[2] == 2) || + (ip[0] == 127 ip[1] == 0 ip[2] == 0 ip[3] == 1) || (ip[0] = 224 ip[0] = 255) ) { RETURN_VALIDATION_FAILED @@ -732,6 +735,9 @@ RETURN_VALIDATION_FAILED } } + if (flags FILTER_FLAG_NO_RES_RANGE Z_STRLEN_P(value) == 3 !strcmp(::1, Z_STRVAL_P(value))) { + RETURN_VALIDATION_FAILED + } } break; } Modified: php/php-src/branches/PHP_5_3/ext/filter/tests/018.phpt === --- php/php-src/branches/PHP_5_3/ext/filter/tests/018.phpt 2010-12-12 18:27:59 UTC (rev 306281) +++ php/php-src/branches/PHP_5_3/ext/filter/tests/018.phpt 2010-12-12 18:36:21 UTC (rev 306282) @@ -37,7 +37,7 @@ string(9) 127.0.0.1 bool(false) string(12) 192.0.34.166 -string(9) 127.0.0.1 +bool(false) string(9) 192.0.0.1 string(12) 192.0.34.166 bool(false) Added: php/php-src/branches/PHP_5_3/ext/filter/tests/bug53150.phpt === --- php/php-src/branches/PHP_5_3/ext/filter/tests/bug53150.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/filter/tests/bug53150.phpt 2010-12-12 18:36:21 UTC (rev 306282) @@ -0,0 +1,28 @@ +--TEST-- +Bug #53150 (FILTER_FLAG_NO_RES_RANGE is missing some IP ranges) +--SKIPIF-- +?php if (!extension_loaded(filter)) die(skip); ? +--FILE-- +?php +var_dump(filter_var('127.0.0.1', FILTER_VALIDATE_IP)); +var_dump(filter_var(::1, FILTER_VALIDATE_IP)); + +var_dump(filter_var('127.0.0.1', FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); +var_dump(filter_var('::1', FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); + +var_dump(filter_var('128.0.0.1', FILTER_VALIDATE_IP)); +var_dump(filter_var('128.0.0.1', FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); + +var_dump(filter_var('191.255.0.0', FILTER_VALIDATE_IP)); +var_dump(filter_var('191.255.0.0', FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); + +? +--EXPECT-- +string(9) 127.0.0.1 +string(3) ::1 +bool(false) +bool(false) +string(9) 128.0.0.1 +bool(false) +string(11) 191.255.0.0 +bool(false) Modified: php/php-src/trunk/ext/filter/logical_filters.c === --- php/php-src/trunk/ext/filter/logical_filters.c 2010-12-12 18:27:59 UTC (rev 306281) +++ php/php-src/trunk/ext/filter/logical_filters.c 2010-12-12 18:36:21 UTC (rev 306282) @@ -710,8 +710,11 @@ if (flags
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/array.c branches/PHP_5_3/ext/standard/tests/array/bug35014.phpt branches/PHP_5_3/ext/standard/tests/array/bug35014_64bi
iliaaSun, 12 Dec 2010 19:27:04 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306288 Log: Fixed bug 48484 (array_product() always returns 0 for an empty array). Bug: http://bugs.php.net/48484 (Verified) array_product(array()) returns 0 instead of 1 Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/array.c U php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug35014.phpt U php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug35014_64bit.phpt A php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug48484.phpt U php/php-src/trunk/ext/standard/array.c U php/php-src/trunk/ext/standard/tests/array/bug35014.phpt U php/php-src/trunk/ext/standard/tests/array/bug35014_64bit.phpt A php/php-src/trunk/ext/standard/tests/array/bug48484.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-12 19:06:27 UTC (rev 306287) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-12 19:27:04 UTC (rev 306288) @@ -7,6 +7,9 @@ . Indirect reference to $this fails to resolve if direct $this is never used in method. (Scott) +- Core: + . Bug 48484 (array_product() always returns 0 for an empty array). (Ilia) + - Filter extension: . Fixed bug #53150 (FILTER_FLAG_NO_RES_RANGE is missing some IP ranges). (Ilia) Modified: php/php-src/branches/PHP_5_3/ext/standard/array.c === --- php/php-src/branches/PHP_5_3/ext/standard/array.c 2010-12-12 19:06:27 UTC (rev 306287) +++ php/php-src/branches/PHP_5_3/ext/standard/array.c 2010-12-12 19:27:04 UTC (rev 306288) @@ -4048,10 +4048,10 @@ return; } + ZVAL_LONG(return_value, 1); if (!zend_hash_num_elements(Z_ARRVAL_P(input))) { - RETURN_LONG(0); + return; } - ZVAL_LONG(return_value, 1); for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(input), pos); zend_hash_get_current_data_ex(Z_ARRVAL_P(input), (void **)entry, pos) == SUCCESS; Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug35014.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug35014.phpt 2010-12-12 19:06:27 UTC (rev 306287) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug35014.phpt 2010-12-12 19:27:04 UTC (rev 306288) @@ -25,8 +25,8 @@ --EXPECTF-- Warning: array_product() expects parameter 1 to be array, string given in %s on line %d NULL +int(1) int(0) -int(0) int(3) int(9) float(1) Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug35014_64bit.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug35014_64bit.phpt 2010-12-12 19:06:27 UTC (rev 306287) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug35014_64bit.phpt 2010-12-12 19:27:04 UTC (rev 306288) @@ -25,8 +25,8 @@ --EXPECTF-- Warning: array_product() expects parameter 1 to be array, string given in %s on line %d NULL +int(1) int(0) -int(0) int(3) int(9) float(1) Added: php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug48484.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug48484.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/array/bug48484.phpt 2010-12-12 19:27:04 UTC (rev 306288) @@ -0,0 +1,16 @@ +--TEST-- +Bug 48484 (array_product() always returns 0 for an empty array) +--FILE-- +?php +var_dump(array_product(array())); +? +--EXPECT-- +int(1) +--TEST-- +Bug 48484 (array_product() always returns 0 for an empty array) +--FILE-- +?php +var_dump(array_product(array())); +? +--EXPECT-- +int(1) Modified: php/php-src/trunk/ext/standard/array.c === --- php/php-src/trunk/ext/standard/array.c 2010-12-12 19:06:27 UTC (rev 306287) +++ php/php-src/trunk/ext/standard/array.c 2010-12-12 19:27:04 UTC (rev 306288) @@ -4052,10 +4052,10 @@ return; } + ZVAL_LONG(return_value, 1); if (!zend_hash_num_elements(Z_ARRVAL_P(input))) { - RETURN_LONG(0); + return; } - ZVAL_LONG(return_value, 1); for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(input), pos); zend_hash_get_current_data_ex(Z_ARRVAL_P(input), (void **)entry, pos) == SUCCESS; Modified: php/php-src/trunk/ext/standard/tests/array/bug35014.phpt === --- php/php-src/trunk/ext/standard/tests/array/bug35014.phpt2010-12-12 19:06:27 UTC (rev 306287) +++
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/logical_filters.c branches/PHP_5_3/ext/filter/tests/018.phpt branches/PHP_5_3/ext/filter/tests/bug47435.phpt trunk/ext/fi
iliaaSun, 12 Dec 2010 19:54:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306290 Log: Fixed bug #47435 (FILTER_FLAG_NO_RES_RANGE don't work with ipv6). Bug: http://bugs.php.net/47435 (Open) FILTER_FLAG_NO_PRIV_RANGE and FILTER_FLAG_NO_RES_RANGE don't work with ipv6 Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c U php/php-src/branches/PHP_5_3/ext/filter/tests/018.phpt A php/php-src/branches/PHP_5_3/ext/filter/tests/bug47435.phpt U php/php-src/trunk/ext/filter/logical_filters.c U php/php-src/trunk/ext/filter/tests/018.phpt A php/php-src/trunk/ext/filter/tests/bug47435.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-12 19:35:11 UTC (rev 306289) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-12 19:54:21 UTC (rev 306290) @@ -13,6 +13,8 @@ - Filter extension: . Fixed bug #53150 (FILTER_FLAG_NO_RES_RANGE is missing some IP ranges). (Ilia) + . Fixed bug #47435 (FILTER_FLAG_NO_RES_RANGE don't work with ipv6). +(Ilia, valli at icsurselva dot ch) - Intl extension: . Fixed bug #53512 (NumberFormatter::setSymbol crash on bogus $attr values). Modified: php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c === --- php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c 2010-12-12 19:35:11 UTC (rev 306289) +++ php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c 2010-12-12 19:54:21 UTC (rev 306290) @@ -735,8 +735,40 @@ RETURN_VALIDATION_FAILED } } -if (flags FILTER_FLAG_NO_RES_RANGE Z_STRLEN_P(value) == 3 !strcmp(::1, Z_STRVAL_P(value))) { - RETURN_VALIDATION_FAILED +if (flags FILTER_FLAG_NO_RES_RANGE) { + switch (Z_STRLEN_P(value)) { + case 1: case 0: + break; + case 2: + if (!strcmp(::, Z_STRVAL_P(value))) { +RETURN_VALIDATION_FAILED + } + break; + case 3: + if (!strcmp(::1, Z_STRVAL_P(value)) || !strcmp(5f:, Z_STRVAL_P(value))) { +RETURN_VALIDATION_FAILED + } + break; + default: + if (Z_STRLEN_P(value) = 5) { +if ( + !strncasecmp(fe8, Z_STRVAL_P(value), 3) || + !strncasecmp(fe9, Z_STRVAL_P(value), 3) || + !strncasecmp(fea, Z_STRVAL_P(value), 3) || + !strncasecmp(feb, Z_STRVAL_P(value), 3) +) { + RETURN_VALIDATION_FAILED +} + } + if ( +(Z_STRLEN_P(value) = 9 !strncasecmp(2001:0db8, Z_STRVAL_P(value), 9)) || +(Z_STRLEN_P(value) = 2 !strncasecmp(5f, Z_STRVAL_P(value), 2)) || +(Z_STRLEN_P(value) = 4 !strncasecmp(3ff3, Z_STRVAL_P(value), 4)) || +(Z_STRLEN_P(value) = 8 !strncasecmp(2001:001, Z_STRVAL_P(value), 8)) + ) { +RETURN_VALIDATION_FAILED + } + } } } break; Modified: php/php-src/branches/PHP_5_3/ext/filter/tests/018.phpt === --- php/php-src/branches/PHP_5_3/ext/filter/tests/018.phpt 2010-12-12 19:35:11 UTC (rev 306289) +++ php/php-src/branches/PHP_5_3/ext/filter/tests/018.phpt 2010-12-12 19:54:21 UTC (rev 306290) @@ -24,6 +24,7 @@ var_dump(filter_var(::1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)); var_dump(filter_var(127.0.0.1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)); var_dump(filter_var(::1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)); +var_dump(filter_var(::1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 | FILTER_FLAG_NO_RES_RANGE)); var_dump(filter_var(127.0.0.1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)); echo Done\n; ? @@ -48,5 +49,6 @@ bool(false) bool(false) string(3) ::1 +bool(false) string(9) 127.0.0.1 Done Added: php/php-src/branches/PHP_5_3/ext/filter/tests/bug47435.phpt === --- php/php-src/branches/PHP_5_3/ext/filter/tests/bug47435.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/filter/tests/bug47435.phpt 2010-12-12 19:54:21 UTC (rev 306290) @@ -0,0 +1,34 @@ +--TEST-- +Bug #47435 (FILTER_FLAG_NO_PRIV_RANGE and FILTER_FLAG_NO_RES_RANGE don't work with ipv6) +--FILE-- +?php +var_dump(filter_var(FC00::1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)); +var_dump(filter_var(FC00::1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE)); +var_dump(filter_var(::, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)); +var_dump(filter_var(::, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 | FILTER_FLAG_NO_RES_RANGE)); +var_dump(filter_var(::1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)); +var_dump(filter_var(::1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 | FILTER_FLAG_NO_RES_RANGE)); +var_dump(filter_var(fe8:5:6::1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)); +var_dump(filter_var(fe8:5:6::1, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 | FILTER_FLAG_NO_RES_RANGE));
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
felipe Sun, 12 Dec 2010 21:11:54 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306291 Log: - Cosmetics Changed paths: U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-12 19:54:21 UTC (rev 306290) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-12 21:11:54 UTC (rev 306291) @@ -8,7 +8,8 @@ in method. (Scott) - Core: - . Bug 48484 (array_product() always returns 0 for an empty array). (Ilia) + . Fixed bug #48484 (array_product() always returns 0 for an empty array). +(Ilia) - Filter extension: . Fixed bug #53150 (FILTER_FLAG_NO_RES_RANGE is missing some IP ranges). @@ -38,8 +39,8 @@ . Fixed bug #53515 (property_exists incorrect on ArrayObject null and 0 values). (Felipe) -- Streams - . Implemented FR #26158 (open arbitrary file descriptor with fopen) +- Streams: + . Implemented FR #26158 (open arbitrary file descriptor with fopen). (Gustavo) 09 Dec 2010, PHP 5.3.4 - Upgraded bundled Sqlite3 to version 3.7.3. (Ilia) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/php_crypt_r.c trunk/ext/standard/php_crypt_r.c
cataphract Sun, 12 Dec 2010 22:27:02 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306305 Log: - Fixed bug #53530 (php_crypt tests gcc version incorrectly due to typo) (vapier at gmail dot com) Bug: http://bugs.php.net/53530 (Open) php_crypt tests gcc version incorrectly due to typo Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c U php/php-src/trunk/ext/standard/php_crypt_r.c Modified: php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c === --- php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c 2010-12-12 22:21:29 UTC (rev 306304) +++ php/php-src/branches/PHP_5_3/ext/standard/php_crypt_r.c 2010-12-12 22:27:02 UTC (rev 306305) @@ -94,7 +94,7 @@ if (!initialized) { #ifdef PHP_WIN32 InterlockedIncrement(initialized); -#elif (defined(__GNUC__) (__GNUC__ = 4 __GNUC_MINOR = 2)) +#elif (defined(__GNUC__) (__GNUC__ = 4 __GNUC_MINOR__ = 2)) __sync_fetch_and_add(initialized, 1); #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */ membar_producer(); Modified: php/php-src/trunk/ext/standard/php_crypt_r.c === --- php/php-src/trunk/ext/standard/php_crypt_r.c2010-12-12 22:21:29 UTC (rev 306304) +++ php/php-src/trunk/ext/standard/php_crypt_r.c2010-12-12 22:27:02 UTC (rev 306305) @@ -94,7 +94,7 @@ if (!initialized) { #ifdef PHP_WIN32 InterlockedIncrement(initialized); -#elif (defined(__GNUC__) (__GNUC__ = 4 __GNUC_MINOR = 2)) +#elif (defined(__GNUC__) (__GNUC__ = 4 __GNUC_MINOR__ = 2)) __sync_fetch_and_add(initialized, 1); #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */ membar_producer(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/date/tests/ bug51866.phpt date-lenient-create.phpt date-lenient.phpt
stas Sun, 12 Dec 2010 22:38:05 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306307 Log: add fix tests for lenient parsing Changed paths: U php/php-src/trunk/ext/date/tests/bug51866.phpt A php/php-src/trunk/ext/date/tests/date-lenient-create.phpt A php/php-src/trunk/ext/date/tests/date-lenient.phpt Modified: php/php-src/trunk/ext/date/tests/bug51866.phpt === --- php/php-src/trunk/ext/date/tests/bug51866.phpt 2010-12-12 22:28:12 UTC (rev 306306) +++ php/php-src/trunk/ext/date/tests/bug51866.phpt 2010-12-12 22:38:05 UTC (rev 306307) @@ -48,7 +48,7 @@ [timezone_type]= int(3) [timezone]= - string(13) Europe/London + string(%d) %s } array(4) { [warning_count]= @@ -74,7 +74,7 @@ [timezone_type]= int(3) [timezone]= - string(13) Europe/London + string(%d) %s } array(4) { [warning_count]= @@ -100,7 +100,7 @@ [timezone_type]= int(3) [timezone]= - string(13) Europe/London + string(%d) %s } array(4) { [warning_count]= @@ -143,7 +143,7 @@ [timezone_type]= int(3) [timezone]= - string(13) Europe/London + string(%d) %s } array(4) { [warning_count]= Added: php/php-src/trunk/ext/date/tests/date-lenient-create.phpt === --- php/php-src/trunk/ext/date/tests/date-lenient-create.phpt (rev 0) +++ php/php-src/trunk/ext/date/tests/date-lenient-create.phpt 2010-12-12 22:38:05 UTC (rev 306307) @@ -0,0 +1,149 @@ +--TEST-- +Test for + character in date format +--FILE-- +?php +$tz = new DateTimeZone(UTC); +$date = 06/08/04 12:00; +echo ==\n; +print_r( date_create_from_format( 'm/d/y', $date , $tz) ); +print_r( date_get_last_errors() ); +echo ==\n; +print_r( date_create_from_format( 'm/d/y+', $date , $tz)-setTime(0, 0) ); +print_r( date_get_last_errors() ); +echo ==\n; +print_r( date_create_from_format( '+m/d/y', $date , $tz)-setTime(0, 0) ); +print_r( date_get_last_errors() ); +echo ==\n; +print_r( date_create_from_format( 'm/d/y++', $date , $tz)-setTime(0, 0) ); +print_r( date_get_last_errors() ); +echo ==\n; + +$date = 06/08/04; +print_r( date_create_from_format( 'm/d/y+', $date , $tz)-setTime(0, 0) ); +print_r( date_get_last_errors() ); +echo ==\n; +print_r( date_create_from_format( '+m/d/y', $date , $tz)-setTime(0, 0) ); +print_r( date_get_last_errors() ); +echo ==\n; + +? +--EXPECT-- +== +Array +( +[warning_count] = 0 +[warnings] = Array +( +) + +[error_count] = 1 +[errors] = Array +( +[8] = Trailing data +) + +) +== +DateTime Object +( +[date] = 2004-06-08 00:00:00 +[timezone_type] = 3 +[timezone] = UTC +) +Array +( +[warning_count] = 1 +[warnings] = Array +( +[8] = Trailing data +) + +[error_count] = 0 +[errors] = Array +( +) + +) +== +DateTime Object +( +[date] = 2004-06-08 00:00:00 +[timezone_type] = 3 +[timezone] = UTC +) +Array +( +[warning_count] = 1 +[warnings] = Array +( +[8] = Trailing data +) + +[error_count] = 0 +[errors] = Array +( +) + +) +== +DateTime Object +( +[date] = 2004-06-08 00:00:00 +[timezone_type] = 3 +[timezone] = UTC +) +Array +( +[warning_count] = 1 +[warnings] = Array +( +[8] = Trailing data +) + +[error_count] = 0 +[errors] = Array +( +) + +) +== +DateTime Object +( +[date] = 2004-06-08 00:00:00 +[timezone_type] = 3 +[timezone] = UTC +) +Array +( +[warning_count] = 0 +[warnings] = Array +( +) + +[error_count] = 0 +[errors] = Array +( +) + +) +== +DateTime Object +( +[date] = 2004-06-08 00:00:00 +[timezone_type] = 3 +[timezone] = UTC +) +Array +( +[warning_count] = 0 +[warnings] = Array +( +) + +[error_count] = 0 +[errors] = Array +( +) + +) +== Added: php/php-src/trunk/ext/date/tests/date-lenient.phpt === --- php/php-src/trunk/ext/date/tests/date-lenient.phpt (rev 0) +++ php/php-src/trunk/ext/date/tests/date-lenient.phpt 2010-12-12 22:38:05 UTC (rev 306307) @@ -0,0 +1,146 @@ +--TEST-- +Test for + character in date format +--FILE-- +?php +$date = 06/08/04 12:00; +print_r( date_parse_from_format( 'm/d/y', $date ) ); +print_r( date_parse_from_format( 'm/d/y+', $date ) ); +print_r( date_parse_from_format( '+m/d/y', $date ) ); +print_r( date_parse_from_format( 'm/d/y++', $date ) ); + +$date = 06/08/04; +print_r( date_parse_from_format( 'm/d/y+', $date ) ); +print_r( date_parse_from_format( '+m/d/y', $date ) ); + +? +--EXPECT-- +Array +( +[year] = 2004 +[month] = 6 +[day] = 8 +[hour] = +[minute] = +
[PHP-CVS] svn: /SVNROOT/ global_avail
philip Mon, 13 Dec 2010 06:22:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306327 Log: Updated doc karma for x1v4nx and carlos from es/ to full Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail 2010-12-13 06:19:19 UTC (rev 306326) +++ SVNROOT/global_avail 2010-12-13 06:22:32 UTC (rev 306327) @@ -47,7 +47,7 @@ # The PHP Documentation Group maintains the documentation and its # translations. -avail|lucas,jmertic,bobby,takagi,gcc,cem,mfp,ansriniv,jsgoupil,mazzanet,frogger,coldocean,fleaslob,torben,lynch,kk,ted,paul,mbritton,bibi,mrobinso,perugini,tzwenny,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,danbeck,sli,jmcastagnetto,mohrt,samesch,soneca,ronabop,glace,latoserver,rafael,jcmeloni,chrullrich,mk,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zimt,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,hakan,chief977,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,sp,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodive,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,tix,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey,belleto,jtacon,yuw,elfyn,noam,nathan,salman,cheezy,ene,rezaiqbal,purnomo,dufiga_php,ftp_geo,udhien,prio,luckyguy354,maf,handi,meme,satiri,maddankara,rildo,hd,ali,lpj,adhitama,engkongs,preilly,dave,marcelo,curt,fd,javi,mrmaster,fa,vrana,apaxx,pjotrik,marduk,narcotia1234,enloma,trizo,xmadda,redshift,alifikri,coder,dodol_maniac,eflorin,adywarna,kyokpae,milans,lovchy,spermwhale,phaze,baoengb,derek,yannick,daan,xxiengb,ott,mg,kennyt,tomsommer,poz,zamolxe,bishmila,ph1,irchtml,rogamer,bortolini,sapfir,guru,ahmed,robinhood,sohli,amt,romain,hlecuanda,thessoro,nforbes,jolan,laze,bagilevi,young,shakaali,chokobo,portalufpa,teecee,blindman,holst,schst,mnv,sodhi,aidan,jellybob,lauer,shenkong,jad,robert,peterhuewe,ogre,techtonik,narigone,realtebo,krid,mclay,dasch,miwaniec,abdshomad,sammywg,aeoris,mez,jed,hsc,luckec,dmytton,choudesh,phpvcn,simp,michael,grantc,atex,katja,sthulbourn,mikl,kevinsz,roast,tessus,gavinfo,rant,ramsey,arkadius,erinet,omar,oliver,rquadling,timo,shadda,joeaccord,ezyang,ljbuesch,knut,asonge,ron,nicobn,jacques,void,mcbrown,simionea,preinheimer,stanprog,msaraujo,asbjornit,philippe,sezer,rmlr,hradtke,alan,danielc,danbrown,alexxed,psalehpoor,loudi,abedford,morgue,nilgun,saltybeagle,dedemorton,eniac2008,jawed,ch,mgdm,ericstewart,mager,keito,juxecl,chx,vito,beverloo,joris,mumumu,brandon,santiago,ajcollison,rbowen,ruslany,satoruyoshida,seld,degeberg,yago,seros,dtajchreber,jwage,ambrish,shein,frozenfire|phpdoc,phd,web/doc,web/doc-editor