[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/standard/tests/general_functions/bug49692.ini branches/PHP_5_2/ext/standard/tests/general_functions/bug49692.phpt branches/PHP_5_3/ext/standard/tests/
rdohms Mon, 28 Sep 2009 22:57:41 + Revision: http://svn.php.net/viewvc?view=revision&revision=288922 Log: Adding tests for bug #49692 Bug: http://bugs.php.net/49692 (Bogus) parse_ini_file() throws errors when key contains '/' (forward slash) Changed paths: A php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49692.ini A php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49692.phpt A php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug49692.ini A php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug49692.phpt A php/php-src/trunk/ext/standard/tests/general_functions/bug49692.ini A php/php-src/trunk/ext/standard/tests/general_functions/bug49692.phpt Added: php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49692.ini === --- php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49692.ini (rev 0) +++ php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49692.ini 2009-09-28 22:57:41 UTC (rev 288922) @@ -0,0 +1,4 @@ +//my.ini file +[sitemap] +/home= default:index +/info= default:info Added: php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49692.phpt === --- php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49692.phpt (rev 0) +++ php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49692.phpt 2009-09-28 22:57:41 UTC (rev 288922) @@ -0,0 +1,24 @@ +--TEST-- +Bug #49692: parse_ini_file() throws errors when key contains '/' (forward slash) +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +array(1) { + ["sitemap"]=> + array(2) { +["/home"]=> +string(13) "default:index" +["/info"]=> +string(12) "default:info" + } +} Added: php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug49692.ini === --- php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug49692.ini (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug49692.ini 2009-09-28 22:57:41 UTC (rev 288922) @@ -0,0 +1,4 @@ +//my.ini file +[sitemap] +/home= default:index +/info= default:info Added: php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug49692.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug49692.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug49692.phpt 2009-09-28 22:57:41 UTC (rev 288922) @@ -0,0 +1,24 @@ +--TEST-- +Bug #49692: parse_ini_file() throws errors when key contains '/' (forward slash) +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +array(1) { + ["sitemap"]=> + array(2) { +["/home"]=> +string(13) "default:index" +["/info"]=> +string(12) "default:info" + } +} Added: php/php-src/trunk/ext/standard/tests/general_functions/bug49692.ini === --- php/php-src/trunk/ext/standard/tests/general_functions/bug49692.ini (rev 0) +++ php/php-src/trunk/ext/standard/tests/general_functions/bug49692.ini 2009-09-28 22:57:41 UTC (rev 288922) @@ -0,0 +1,4 @@ +//my.ini file +[sitemap] +/home= default:index +/info= default:info Added: php/php-src/trunk/ext/standard/tests/general_functions/bug49692.phpt === --- php/php-src/trunk/ext/standard/tests/general_functions/bug49692.phpt (rev 0) +++ php/php-src/trunk/ext/standard/tests/general_functions/bug49692.phpt 2009-09-28 22:57:41 UTC (rev 288922) @@ -0,0 +1,24 @@ +--TEST-- +Bug #49692: parse_ini_file() throws errors when key contains '/' (forward slash) +--CREDITS-- +Rafael Dohms +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +array(1) { + ["sitemap"]=> + array(2) { +["/home"]=> +string(13) "default:index" +["/info"]=> +string(12) "default:info" + } +} -- 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_2/NEWS PHP_5_3/NEWS
kalleMon, 28 Sep 2009 15:07:37 + Revision: http://svn.php.net/viewvc?view=revision&revision=288907 Log: NEWS for Rasmus' bug fix Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2009-09-28 15:06:42 UTC (rev 288906) +++ php/php-src/branches/PHP_5_2/NEWS 2009-09-28 15:07:37 UTC (rev 288907) @@ -1,6 +1,7 @@ -PHPNEWS +PHP NEWS ||| ?? ??? 20??, PHP 5.2.12 +- Fixed bug #49698 (Unexpected change in strnatcasecmp()). (Rasmus) - Fixed bug #49647 (DOMUserData does not exist). (Rob) - Fixed bug #49630 (imap_listscan function missing). (Felipe) - Fixed bug #49578 (make install-pear fails). (Hannes) Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-09-28 15:06:42 UTC (rev 288906) +++ php/php-src/branches/PHP_5_3/NEWS 2009-09-28 15:07:37 UTC (rev 288907) @@ -1,4 +1,4 @@ -PHPNEWS +PHP NEWS ||| ?? ??? 20??, PHP 5.3.2 - Added ReflectionMethod::setAccessible() for invoking non-public methods @@ -8,6 +8,7 @@ - Implemented FR #49253 (added support for libcurl's CERTINFO option). (Linus Nielsen Feltzing ) +- Fixed bug #49698 (Unexpected change in strnatcasecmp()). (Rasmus) - Fixed bug #49647 (DOMUserData does not exist). (Rob) - Fixed bug #49630 (imap_listscan function missing). (Felipe) - Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning "CURLPROTO_FILE -- 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_2/ext/standard/strnatcmp.c branches/PHP_5_3/ext/standard/strnatcmp.c trunk/ext/standard/strnatcmp.c
rasmus Mon, 28 Sep 2009 13:29:53 + Revision: http://svn.php.net/viewvc?view=revision&revision=288896 Log: Fix for bug #49698 Bug: http://bugs.php.net/49698 (Open) Unexpected change in strnatcasecmp() Changed paths: U php/php-src/branches/PHP_5_2/ext/standard/strnatcmp.c U php/php-src/branches/PHP_5_3/ext/standard/strnatcmp.c U php/php-src/trunk/ext/standard/strnatcmp.c Modified: php/php-src/branches/PHP_5_2/ext/standard/strnatcmp.c === --- php/php-src/branches/PHP_5_2/ext/standard/strnatcmp.c 2009-09-28 13:11:21 UTC (rev 288895) +++ php/php-src/branches/PHP_5_2/ext/standard/strnatcmp.c 2009-09-28 13:29:53 UTC (rev 288896) @@ -116,12 +116,12 @@ while (1) { ca = *ap; cb = *bp; - /* skip over leading zeros unless they are followed by punctuation */ - while (leading && ca == '0' && (ap+1 < aend) && !ispunct(*(ap+1))) { + /* skip over leading zeros */ + while (leading && ca == '0' && (ap+1 < aend) && isdigit(*(ap+1))) { ca = *++ap; } - while (leading && cb == '0' && (bp+1 < bend) && !ispunct(*(bp+1))) { + while (leading && cb == '0' && (bp+1 < bend) && isdigit(*(bp+1))) { cb = *++bp; } Modified: php/php-src/branches/PHP_5_3/ext/standard/strnatcmp.c === --- php/php-src/branches/PHP_5_3/ext/standard/strnatcmp.c 2009-09-28 13:11:21 UTC (rev 288895) +++ php/php-src/branches/PHP_5_3/ext/standard/strnatcmp.c 2009-09-28 13:29:53 UTC (rev 288896) @@ -116,12 +116,12 @@ while (1) { ca = *ap; cb = *bp; - /* skip over leading zeros unless they are followed by punctuation */ - while (leading && ca == '0' && (ap+1 < aend) && !ispunct(*(ap+1))) { + /* skip over leading zeros */ + while (leading && ca == '0' && (ap+1 < aend) && isdigit(*(ap+1))) { ca = *++ap; } - while (leading && cb == '0' && (bp+1 < bend) && !ispunct(*(bp+1))) { + while (leading && cb == '0' && (bp+1 < bend) && isdigit(*(bp+1))) { cb = *++bp; } Modified: php/php-src/trunk/ext/standard/strnatcmp.c === --- php/php-src/trunk/ext/standard/strnatcmp.c 2009-09-28 13:11:21 UTC (rev 288895) +++ php/php-src/trunk/ext/standard/strnatcmp.c 2009-09-28 13:29:53 UTC (rev 288896) @@ -112,12 +112,12 @@ while (1) { ca = a[ai]; cb = b[bi]; - /* skip over leading zeros unless they are followed by punctuation */ - while (leading && ca == '0' && (ai+1 < a_len) && !ispunct(a[ai+1])) { + /* skip over leading zeros */ + while (leading && ca == '0' && (ai+1 < a_len) && isdigit(a[ai+1])) { ca = a[++ai]; } - while (leading && cb == '0' && (bi+1 < b_len) && !ispunct(b[bi+1])) { + while (leading && cb == '0' && (bi+1 < b_len) && isdigit(a[ai+1])) { cb = b[++bi]; } -- 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_2/ext/mysqli/ mysqli_api.c
iliaaMon, 28 Sep 2009 13:11:21 + Revision: http://svn.php.net/viewvc?view=revision&revision=288895 Log: Fixed build Changed paths: U php/php-src/branches/PHP_5_2/ext/mysqli/mysqli_api.c Modified: php/php-src/branches/PHP_5_2/ext/mysqli/mysqli_api.c === --- php/php-src/branches/PHP_5_2/ext/mysqli/mysqli_api.c2009-09-28 12:54:23 UTC (rev 288894) +++ php/php-src/branches/PHP_5_2/ext/mysqli/mysqli_api.c2009-09-28 13:11:21 UTC (rev 288895) @@ -1854,7 +1854,7 @@ } MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); - if (FALSE == mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) { + if (!mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) { RETURN_FALSE; } RETURN_TRUE; -- 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/mysqlnd/ php_mysqlnd.c
pajoye Mon, 28 Sep 2009 12:54:23 + Revision: http://svn.php.net/viewvc?view=revision&revision=288894 Log: - fix TS build, this macro contains code and declaration, always put it right after your declaration Changed paths: U php/php-src/trunk/ext/mysqlnd/php_mysqlnd.c Modified: php/php-src/trunk/ext/mysqlnd/php_mysqlnd.c === --- php/php-src/trunk/ext/mysqlnd/php_mysqlnd.c 2009-09-28 10:42:36 UTC (rev 288893) +++ php/php-src/trunk/ext/mysqlnd/php_mysqlnd.c 2009-09-28 12:54:23 UTC (rev 288894) @@ -46,14 +46,14 @@ zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(values), &pos_values); while (zend_hash_get_current_data_ex(Z_ARRVAL_P(values), - (void **)&values_entry, &pos_values) == SUCCESS) { - TSRMLS_FETCH(); + (void **)&values_entry, &pos_values) == SUCCESS) { zstrstring_key; uintstring_key_len; ulong num_key; int s_len; char*s = NULL; + TSRMLS_FETCH(); zend_hash_get_current_key_ex(Z_ARRVAL_P(values), &string_key, &string_key_len, &num_key, 0, &pos_values); convert_to_string(*values_entry); -- 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/mysqli/tests/mysqli_info.phpt trunk/ext/mysqli/tests/mysqli_info.phpt
uw Mon, 28 Sep 2009 10:42:36 + Revision: http://svn.php.net/viewvc?view=revision&revision=288893 Log: Fixing test Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_info.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_info.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_info.phpt === --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_info.phpt 2009-09-28 10:39:42 UTC (rev 288892) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_info.phpt 2009-09-28 10:42:36 UTC (rev 288893) @@ -85,7 +85,7 @@ } if (!is_string($tmp = mysqli_info($link)) || ('' == $tmp)) - printf("[015] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp); + printf("[016] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp); unlink($file); } while (false); Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_info.phpt === --- php/php-src/trunk/ext/mysqli/tests/mysqli_info.phpt 2009-09-28 10:39:42 UTC (rev 288892) +++ php/php-src/trunk/ext/mysqli/tests/mysqli_info.phpt 2009-09-28 10:42:36 UTC (rev 288893) @@ -85,7 +85,7 @@ } if (!is_string($tmp = mysqli_info($link)) || ('' == $tmp)) - printf("[015] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp); + printf("[016] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp); unlink($file); } while (false); -- 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/mysql/tests/connect.inc branches/PHP_5_3/ext/mysql/tests/skipifconnectfailure.inc trunk/ext/mysql/tests/connect.inc trunk/ext/mysql/tests/skipifconnec
uw Mon, 28 Sep 2009 10:39:42 + Revision: http://svn.php.net/viewvc?view=revision&revision=288892 Log: Allow setting of default connection flags through the environment variable MYSQL_TEST_CONNECT_FLAGS Changed paths: U php/php-src/branches/PHP_5_3/ext/mysql/tests/connect.inc U php/php-src/branches/PHP_5_3/ext/mysql/tests/skipifconnectfailure.inc U php/php-src/trunk/ext/mysql/tests/connect.inc U php/php-src/trunk/ext/mysql/tests/skipifconnectfailure.inc Modified: php/php-src/branches/PHP_5_3/ext/mysql/tests/connect.inc === --- php/php-src/branches/PHP_5_3/ext/mysql/tests/connect.inc2009-09-28 09:56:21 UTC (rev 288891) +++ php/php-src/branches/PHP_5_3/ext/mysql/tests/connect.inc2009-09-28 10:39:42 UTC (rev 288892) @@ -20,14 +20,17 @@ } /* wrapper to simplify test porting */ -function my_mysql_connect($host, $user, $passwd, $db, $port, $socket) { +function my_mysql_connect($host, $user, $passwd, $db, $port, $socket, $flags = NULL) { + global $connect_flags; + $flags = ($flags === NULL) ? $connect_flags : $flags; + if ($socket) $host = sprintf("%s:%s", $host, $socket); else if ($port) $host = sprintf("%s:%s", $host, $port); - if (!$link = mysql_connect($host, $user, $passwd, true)) { + if (!$link = mysql_connect($host, $user, $passwd, true, $flags)) { printf("[000-a] Cannot connect using host '%s', user '%s', password '', [%d] %s\n", $host, $user, $passwd, mysql_errno(), mysql_error()); @@ -55,6 +58,7 @@ $engine= getenv("MYSQL_TEST_ENGINE") ? getenv("MYSQL_TEST_ENGINE") : "MyISAM"; $socket= getenv("MYSQL_TEST_SOCKET") ? getenv("MYSQL_TEST_SOCKET") : null; $skip_on_connect_failure = getenv("MYSQL_TEST_SKIP_CONNECT_FAILURE") ? getenv("MYSQL_TEST_SKIP_CONNECT_FAILURE") : true; +$connect_flags = getenv("MYSQL_TEST_CONNECT_FLAGS") ? (int)getenv("MYSQL_TEST_CONNECT_FLAGS") : 0; /* Development setting: test experimal features and/or feature requests that never worked before? */ $TEST_EXPERIMENTAL = (in_array(getenv("MYSQL_TEST_EXPERIMENTAL"), array(0, 1))) ? Modified: php/php-src/branches/PHP_5_3/ext/mysql/tests/skipifconnectfailure.inc === --- php/php-src/branches/PHP_5_3/ext/mysql/tests/skipifconnectfailure.inc 2009-09-28 09:56:21 UTC (rev 288891) +++ php/php-src/branches/PHP_5_3/ext/mysql/tests/skipifconnectfailure.inc 2009-09-28 10:39:42 UTC (rev 288892) @@ -6,7 +6,7 @@ else if ($port) $myhost = sprintf("%s:%s", $host, $port); - if (!$link = @mysql_connect($myhost, $user, $passwd, true)) + if (!$link = @mysql_connect($myhost, $user, $passwd, true, $connect_flags)) die(sprintf("skip Can't connect to MySQL Server - [%d] %s", mysql_errno(), mysql_error())); if (!...@mysql_select_db($db, $link)) Modified: php/php-src/trunk/ext/mysql/tests/connect.inc === --- php/php-src/trunk/ext/mysql/tests/connect.inc 2009-09-28 09:56:21 UTC (rev 288891) +++ php/php-src/trunk/ext/mysql/tests/connect.inc 2009-09-28 10:39:42 UTC (rev 288892) @@ -20,14 +20,17 @@ } /* wrapper to simplify test porting */ -function my_mysql_connect($host, $user, $passwd, $db, $port, $socket) { +function my_mysql_connect($host, $user, $passwd, $db, $port, $socket, $flags = NULL) { + global $connect_flags; + $flags = ($flags === NULL) ? $connect_flags : $flags; + if ($socket) $host = sprintf("%s:%s", $host, $socket); else if ($port) $host = sprintf("%s:%s", $host, $port); - if (!$link = mysql_connect($host, $user, $passwd, true)) { + if (!$link = mysql_connect($host, $user, $passwd, true, $flags)) { printf("[000-a] Cannot connect using host '%s', user '%s', password '', [%d] %s\n", $host, $user, $passwd, mysql_errno(), mysql_error()); @@ -55,6 +58,7 @@ $engine= getenv("MYSQL_TEST_ENGINE") ? getenv("MYSQL_TEST_ENGINE") : "MyISAM"; $socket= getenv("MYSQL_TEST_SOCKET") ? getenv("MYSQL_TEST_SOCKET") : null; $skip_on_connect_failure = getenv("MYSQL_TEST_SKIP_CONNECT_FAILURE") ? getenv("MYSQL_TEST_SKIP_CONNECT_FAILURE") : true; +$connect_flags = getenv("MYSQL_TEST_CONNECT_FLAGS") ? (int)getenv("MYSQL_TEST_CONNECT_FLAGS") : 0; /* Development setting: test experimal features and/or feature requests that never worked before? */ $TEST_EXPERIMENTAL = (in_array(getenv("MYSQL_TEST_EXPERIMENTAL"), array(0, 1))) ? Modified: php/php-src/trunk/ext/mysql/tests/skipifconnectfailure.inc ===