[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c branches/PHP_5_4/NEWS branches/PHP_5_4/TSRM/tsrm_virtual_cwd.c trunk/TSRM/tsrm_virtual_cwd.c
dmitry Mon, 30 Jan 2012 10:08:11 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322927 Log: Fixed bug #51860 (Include fails with toplevel symlink to /) Bug: https://bugs.php.net/51860 (Assigned) Include fails with toplevel symlink to / Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/TSRM/tsrm_virtual_cwd.c U php/php-src/trunk/TSRM/tsrm_virtual_cwd.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-01-30 09:17:44 UTC (rev 322926) +++ php/php-src/branches/PHP_5_3/NEWS 2012-01-30 10:08:11 UTC (rev 322927) @@ -12,6 +12,7 @@ (Dmitry, Laruence) . Fix bug #60895 (Possible invalid handler usage in windows random functions). (Pierre) + . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry) - Firebird Database extension (ibase): . Fixed bug #60802 (ibase_trans() gives segfault when passing params). Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c2012-01-30 09:17:44 UTC (rev 322926) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c2012-01-30 10:08:11 UTC (rev 322927) @@ -773,6 +773,9 @@ while (1) { if (len = start) { + if (link_is_dir) { + *link_is_dir = 1; + } return start; } @@ -789,6 +792,10 @@ continue; } else if (i == len - 2 path[i] == '.' path[i+1] == '.') { /* remove '..' and previous directory */ + is_dir = 1; + if (link_is_dir) { + *link_is_dir = 1; + } if (i - 1 = start) { return start ? start : len; } @@ -1214,9 +1221,14 @@ return 1; } memcpy(resolved_path, state-cwd, state_cwd_length); - resolved_path[state_cwd_length] = DEFAULT_SLASH; - memcpy(resolved_path + state_cwd_length + 1, path, path_length + 1); - path_length += state_cwd_length + 1; + if (resolved_path[state_cwd_length-1] == DEFAULT_SLASH) { + memcpy(resolved_path + state_cwd_length, path, path_length + 1); + path_length += state_cwd_length; + } else { + resolved_path[state_cwd_length] = DEFAULT_SLASH; + memcpy(resolved_path + state_cwd_length + 1, path, path_length + 1); + path_length += state_cwd_length + 1; + } } } else { #ifdef TSRM_WIN32 Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-01-30 09:17:44 UTC (rev 322926) +++ php/php-src/branches/PHP_5_4/NEWS 2012-01-30 10:08:11 UTC (rev 322927) @@ -4,6 +4,7 @@ - Core: . Fix bug #60895 (Possible invalid handler usage in windows random functions). (Pierre) + . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry) - OpenSSL: . Fix possible attack in SSL sockets with SSL 3.0 / TLS 1.0. Modified: php/php-src/branches/PHP_5_4/TSRM/tsrm_virtual_cwd.c === --- php/php-src/branches/PHP_5_4/TSRM/tsrm_virtual_cwd.c2012-01-30 09:17:44 UTC (rev 322926) +++ php/php-src/branches/PHP_5_4/TSRM/tsrm_virtual_cwd.c2012-01-30 10:08:11 UTC (rev 322927) @@ -760,6 +760,9 @@ while (1) { if (len = start) { + if (link_is_dir) { + *link_is_dir = 1; + } return start; } @@ -776,6 +779,10 @@ continue; } else if (i == len - 2 path[i] == '.' path[i+1] == '.') { /* remove '..' and previous directory */ + is_dir = 1; + if (link_is_dir) { + *link_is_dir = 1; + } if (i - 1 = start) { return start ? start : len; } @@ -1200,9 +1207,14 @@ return 1; } memcpy(resolved_path,
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/Zend/zend_vm_def.h branches/PHP_5_4/Zend/zend_vm_execute.h trunk/Zend/zend_vm_def.h trunk/Zend/zend_vm_execute.h
dmitry Mon, 30 Jan 2012 10:51:02 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322928 Log: Fixed (disabled) inline-caching for ZEND_OVERLOADED_FUNCTION methods Changed paths: U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/Zend/zend_vm_def.h U php/php-src/branches/PHP_5_4/Zend/zend_vm_execute.h U php/php-src/trunk/Zend/zend_vm_def.h U php/php-src/trunk/Zend/zend_vm_execute.h Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-01-30 10:08:11 UTC (rev 322927) +++ php/php-src/branches/PHP_5_4/NEWS 2012-01-30 10:51:02 UTC (rev 322928) @@ -5,6 +5,8 @@ . Fix bug #60895 (Possible invalid handler usage in windows random functions). (Pierre) . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry) + . Fixed (disabled) inline-caching for ZEND_OVERLOADED_FUNCTION methods. +(Dmitry) - OpenSSL: . Fix possible attack in SSL sockets with SSL 3.0 / TLS 1.0. Modified: php/php-src/branches/PHP_5_4/Zend/zend_vm_def.h === --- php/php-src/branches/PHP_5_4/Zend/zend_vm_def.h 2012-01-30 10:08:11 UTC (rev 322927) +++ php/php-src/branches/PHP_5_4/Zend/zend_vm_def.h 2012-01-30 10:51:02 UTC (rev 322928) @@ -2187,6 +2187,7 @@ zend_error_noreturn(E_ERROR, Call to undefined method %s::%s(), Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval); } if (OP2_TYPE == IS_CONST + EXPECTED(EX(fbc)-type = ZEND_USER_FUNCTION) EXPECTED((EX(fbc)-common.fn_flags (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) EXPECTED(EX(object) == object)) { CACHE_POLYMORPHIC_PTR(opline-op2.literal-cache_slot, EX(called_scope), EX(fbc)); @@ -2284,7 +2285,9 @@ if (UNEXPECTED(EX(fbc) == NULL)) { zend_error_noreturn(E_ERROR, Call to undefined method %s::%s(), ce-name, function_name_strval); } - if (OP2_TYPE == IS_CONST EXPECTED((EX(fbc)-common.fn_flags (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) { + if (OP2_TYPE == IS_CONST + EXPECTED(EX(fbc)-type = ZEND_USER_FUNCTION) + EXPECTED((EX(fbc)-common.fn_flags (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) { if (OP1_TYPE == IS_CONST) { CACHE_PTR(opline-op2.literal-cache_slot, EX(fbc)); } else { Modified: php/php-src/branches/PHP_5_4/Zend/zend_vm_execute.h === --- php/php-src/branches/PHP_5_4/Zend/zend_vm_execute.h 2012-01-30 10:08:11 UTC (rev 322927) +++ php/php-src/branches/PHP_5_4/Zend/zend_vm_execute.h 2012-01-30 10:51:02 UTC (rev 322928) @@ -3453,7 +3453,9 @@ if (UNEXPECTED(EX(fbc) == NULL)) { zend_error_noreturn(E_ERROR, Call to undefined method %s::%s(), ce-name, function_name_strval); } - if (IS_CONST == IS_CONST EXPECTED((EX(fbc)-common.fn_flags (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) { + if (IS_CONST == IS_CONST + EXPECTED(EX(fbc)-type = ZEND_USER_FUNCTION) + EXPECTED((EX(fbc)-common.fn_flags (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) { if (IS_CONST == IS_CONST) { CACHE_PTR(opline-op2.literal-cache_slot, EX(fbc)); } else { @@ -4237,7 +4239,9 @@ if (UNEXPECTED(EX(fbc) == NULL)) { zend_error_noreturn(E_ERROR, Call to undefined method %s::%s(), ce-name, function_name_strval); } - if (IS_TMP_VAR == IS_CONST EXPECTED((EX(fbc)-common.fn_flags (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) { + if (IS_TMP_VAR == IS_CONST + EXPECTED(EX(fbc)-type = ZEND_USER_FUNCTION) + EXPECTED((EX(fbc)-common.fn_flags (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) { if (IS_CONST == IS_CONST) { CACHE_PTR(opline-op2.literal-cache_slot, EX(fbc)); } else { @@ -4900,7 +4904,9 @@ if (UNEXPECTED(EX(fbc) == NULL)) { zend_error_noreturn(E_ERROR, Call to undefined method %s::%s(), ce-name, function_name_strval); } - if (IS_VAR == IS_CONST EXPECTED((EX(fbc)-common.fn_flags (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) { + if (IS_VAR == IS_CONST + EXPECTED(EX(fbc)-type = ZEND_USER_FUNCTION) + EXPECTED((EX(fbc)-common.fn_flags (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) { if (IS_CONST == IS_CONST) { CACHE_PTR(opline-op2.literal-cache_slot, EX(fbc)); } else { @@ -5434,7 +5440,9 @@ if (UNEXPECTED(EX(fbc) == NULL)) { zend_error_noreturn(E_ERROR, Call to undefined method %s::%s(), ce-name, function_name_strval); } - if (IS_UNUSED == IS_CONST EXPECTED((EX(fbc)-common.fn_flags (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) { + if (IS_UNUSED == IS_CONST + EXPECTED(EX(fbc)-type = ZEND_USER_FUNCTION) + EXPECTED((EX(fbc)-common.fn_flags (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) { if
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/win32/build/libs_version.txt branches/PHP_5_4/win32/build/libs_version.txt trunk/win32/build/libs_version.txt
pajoye Mon, 30 Jan 2012 11:04:19 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322929 Log: - libssh2 1.3.0 Changed paths: U php/php-src/branches/PHP_5_3/win32/build/libs_version.txt U php/php-src/branches/PHP_5_4/win32/build/libs_version.txt U php/php-src/trunk/win32/build/libs_version.txt Modified: php/php-src/branches/PHP_5_3/win32/build/libs_version.txt === --- php/php-src/branches/PHP_5_3/win32/build/libs_version.txt 2012-01-30 10:51:02 UTC (rev 322928) +++ php/php-src/branches/PHP_5_3/win32/build/libs_version.txt 2012-01-30 11:04:19 UTC (rev 322929) @@ -9,7 +9,7 @@ libmpir-1.3.1 libpng-1.2.46 libpq-8.3.6 -libssh2-1.2.7 +libssh2-1.3.0 libtidy-20090325 libxslt-1.1.23 libxml-2.7.7 Modified: php/php-src/branches/PHP_5_4/win32/build/libs_version.txt === --- php/php-src/branches/PHP_5_4/win32/build/libs_version.txt 2012-01-30 10:51:02 UTC (rev 322928) +++ php/php-src/branches/PHP_5_4/win32/build/libs_version.txt 2012-01-30 11:04:19 UTC (rev 322929) @@ -9,7 +9,7 @@ libmpir-1.3.1 libpng-1.2.46 libpq-8.3.6 -libssh2-1.2.7 +libssh2-1.3.0 libtidy-20090325 libxslt-1.1.23 libxml-2.7.7 Modified: php/php-src/trunk/win32/build/libs_version.txt === --- php/php-src/trunk/win32/build/libs_version.txt 2012-01-30 10:51:02 UTC (rev 322928) +++ php/php-src/trunk/win32/build/libs_version.txt 2012-01-30 11:04:19 UTC (rev 322929) @@ -9,7 +9,7 @@ libmpir-1.3.1 libpng-1.2.46 libpq-8.3.6 -libssh2-1.2.7 +libssh2-1.3.0 libtidy-20090325 libxslt-1.1.23 libxml-2.7.7 -- 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_4/main/output.c trunk/main/output.c
mike Mon, 30 Jan 2012 12:17:51 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322931 Log: use stderr before, stdout after php_output_startup() and sapi_module.ub_write() after php_output_activate() - fixes Bug #60920 CLI: php -v on STDERR - fixes Bug #60923 Failing tests for sapi/cli Bugs: https://bugs.php.net/60920 (Critical) CLI: php -v on STDERR https://bugs.php.net/60923 (Critical) Failing tests for sapi/cli Changed paths: U php/php-src/branches/PHP_5_4/main/output.c U php/php-src/trunk/main/output.c Modified: php/php-src/branches/PHP_5_4/main/output.c === --- php/php-src/branches/PHP_5_4/main/output.c 2012-01-30 11:36:37 UTC (rev 322930) +++ php/php-src/branches/PHP_5_4/main/output.c 2012-01-30 12:17:51 UTC (rev 322931) @@ -85,7 +85,12 @@ } /* }}} */ -/* {{{ stderr writer if not PHP_OUTPUT_ACTIVATED */ +/* {{{ stderr/stdout writer if not PHP_OUTPUT_ACTIVATED */ +static int php_output_stdout(const char *str, size_t str_len) +{ + fwrite(str, 1, str_len, stdout); + return str_len; +} static int php_output_stderr(const char *str, size_t str_len) { fwrite(str, 1, str_len, stderr); @@ -95,6 +100,7 @@ #endif return str_len; } +static int (*php_output_direct)(const char *str, size_t str_len) = php_output_stderr; /* }}} */ /* {{{ void php_output_startup(void) @@ -105,6 +111,7 @@ zend_hash_init(php_output_handler_aliases, 0, NULL, NULL, 1); zend_hash_init(php_output_handler_conflicts, 0, NULL, NULL, 1); zend_hash_init(php_output_handler_reverse_conflicts, 0, NULL, (void (*)(void *)) zend_hash_destroy, 1); + php_output_direct = php_output_stdout; } /* }}} */ @@ -112,6 +119,7 @@ * Destroy module globals and the conflict and reverse conflict hash tables */ PHPAPI void php_output_shutdown(void) { + php_output_direct = php_output_stderr; zend_hash_destroy(php_output_handler_aliases); zend_hash_destroy(php_output_handler_conflicts); zend_hash_destroy(php_output_handler_reverse_conflicts); @@ -207,7 +215,7 @@ if (OG(flags) PHP_OUTPUT_ACTIVATED) { return sapi_module.ub_write(str, len TSRMLS_CC); } - return php_output_stderr(str, len); + return php_output_direct(str, len); } /* }}} */ @@ -222,7 +230,7 @@ php_output_op(PHP_OUTPUT_HANDLER_WRITE, str, len TSRMLS_CC); return (int) len; } - return php_output_stderr(str, len); + return php_output_direct(str, len); } /* }}} */ Modified: php/php-src/trunk/main/output.c === --- php/php-src/trunk/main/output.c 2012-01-30 11:36:37 UTC (rev 322930) +++ php/php-src/trunk/main/output.c 2012-01-30 12:17:51 UTC (rev 322931) @@ -85,7 +85,12 @@ } /* }}} */ -/* {{{ stderr writer if not PHP_OUTPUT_ACTIVATED */ +/* {{{ stderr/stdout writer if not PHP_OUTPUT_ACTIVATED */ +static int php_output_stdout(const char *str, size_t str_len) +{ + fwrite(str, 1, str_len, stdout); + return str_len; +} static int php_output_stderr(const char *str, size_t str_len) { fwrite(str, 1, str_len, stderr); @@ -95,6 +100,7 @@ #endif return str_len; } +static int (*php_output_direct)(const char *str, size_t str_len) = php_output_stderr; /* }}} */ /* {{{ void php_output_startup(void) @@ -105,6 +111,7 @@ zend_hash_init(php_output_handler_aliases, 0, NULL, NULL, 1); zend_hash_init(php_output_handler_conflicts, 0, NULL, NULL, 1); zend_hash_init(php_output_handler_reverse_conflicts, 0, NULL, (void (*)(void *)) zend_hash_destroy, 1); + php_output_direct = php_output_stdout; } /* }}} */ @@ -112,6 +119,7 @@ * Destroy module globals and the conflict and reverse conflict hash tables */ PHPAPI void php_output_shutdown(void) { + php_output_direct = php_output_stderr; zend_hash_destroy(php_output_handler_aliases); zend_hash_destroy(php_output_handler_conflicts); zend_hash_destroy(php_output_handler_reverse_conflicts); @@ -207,7 +215,7 @@ if (OG(flags) PHP_OUTPUT_ACTIVATED) { return sapi_module.ub_write(str, len TSRMLS_CC); } - return php_output_stderr(str, len); + return php_output_direct(str, len); } /* }}} */ @@ -222,7 +230,7 @@ php_output_op(PHP_OUTPUT_HANDLER_WRITE, str, len TSRMLS_CC); return (int) len; } - return php_output_stderr(str, len); + return php_output_direct(str, len); } /* }}} */ -- 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/standard/ string.c tests/strings/bug60801.phpt
aharvey Mon, 30 Jan 2012 13:29:15 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322934 Log: Fix bug #60801 (strpbrk() mishandles NUL byte) on trunk only for now. Bug: https://bugs.php.net/60801 (Assigned) strpbrk() mishandles NUL byte Changed paths: U php/php-src/trunk/ext/standard/string.c A php/php-src/trunk/ext/standard/tests/strings/bug60801.phpt Modified: php/php-src/trunk/ext/standard/string.c === --- php/php-src/trunk/ext/standard/string.c 2012-01-30 13:02:10 UTC (rev 322933) +++ php/php-src/trunk/ext/standard/string.c 2012-01-30 13:29:15 UTC (rev 322934) @@ -5315,7 +5315,7 @@ { char *haystack, *char_list; int haystack_len, char_list_len; - char *p; + char *haystack_ptr, *cl_ptr; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss, haystack, haystack_len, char_list, char_list_len) == FAILURE) { RETURN_FALSE; @@ -5326,11 +5326,15 @@ RETURN_FALSE; } - if ((p = strpbrk(haystack, char_list))) { - RETURN_STRINGL(p, (haystack + haystack_len - p), 1); - } else { - RETURN_FALSE; + for (haystack_ptr = haystack; haystack_ptr (haystack + haystack_len); ++haystack_ptr) { + for (cl_ptr = char_list; cl_ptr (char_list + char_list_len); ++cl_ptr) { + if (*cl_ptr == *haystack_ptr) { + RETURN_STRINGL(haystack_ptr, (haystack + haystack_len - haystack_ptr), 1); + } + } } + + RETURN_FALSE; } /* }}} */ Added: php/php-src/trunk/ext/standard/tests/strings/bug60801.phpt === --- php/php-src/trunk/ext/standard/tests/strings/bug60801.phpt (rev 0) +++ php/php-src/trunk/ext/standard/tests/strings/bug60801.phpt 2012-01-30 13:29:15 UTC (rev 322934) @@ -0,0 +1,23 @@ +--TEST-- +Bug #60801 (strpbrk() mishandles NUL byte) +--FILE-- +?php +$haystack = foob\x00ar; +$needle = a\x00b; + +var_dump(strpbrk($haystack, 'ar')); +var_dump(strpbrk($haystack, \x00)); +var_dump(strpbrk($haystack, $needle)); +var_dump(strpbrk('foobar', $needle)); +var_dump(strpbrk(\x00, $needle)); +var_dump(strpbrk('xyz', $needle)); +var_dump(strpbrk($haystack, 'xyz')); +? +--EXPECT-- +string(2) ar +string(3) +string(4) b +string(3) bar +string(1) +bool(false) +bool(false) Property changes on: php/php-src/trunk/ext/standard/tests/strings/bug60801.phpt ___ Added: svn:mime-type + text/x-php -- 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/pdo_sqlite/sqlite_driver.c branches/PHP_5_4/ext/pdo_sqlite/sqlite_driver.c trunk/ext/pdo_sqlite/sqlite_driver.c
pajoye Tue, 31 Jan 2012 07:14:36 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322961 Log: - fix #55226, fix build Bug: https://bugs.php.net/55226 (Closed) Support creating collations in SQLite Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c U php/php-src/branches/PHP_5_4/ext/pdo_sqlite/sqlite_driver.c U php/php-src/trunk/ext/pdo_sqlite/sqlite_driver.c Modified: php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c === --- php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c 2012-01-31 04:30:08 UTC (rev 322960) +++ php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c 2012-01-31 07:14:36 UTC (rev 322961) @@ -130,9 +130,8 @@ efree(func); } - struct pdo_sqlite_collation *collation; - while (H-collations) { + struct pdo_sqlite_collation *collation; collation = H-collations; H-collations = collation-next; Modified: php/php-src/branches/PHP_5_4/ext/pdo_sqlite/sqlite_driver.c === --- php/php-src/branches/PHP_5_4/ext/pdo_sqlite/sqlite_driver.c 2012-01-31 04:30:08 UTC (rev 322960) +++ php/php-src/branches/PHP_5_4/ext/pdo_sqlite/sqlite_driver.c 2012-01-31 07:14:36 UTC (rev 322961) @@ -130,9 +130,8 @@ efree(func); } - struct pdo_sqlite_collation *collation; - while (H-collations) { + struct pdo_sqlite_collation *collation; collation = H-collations; H-collations = collation-next; Modified: php/php-src/trunk/ext/pdo_sqlite/sqlite_driver.c === --- php/php-src/trunk/ext/pdo_sqlite/sqlite_driver.c2012-01-31 04:30:08 UTC (rev 322960) +++ php/php-src/trunk/ext/pdo_sqlite/sqlite_driver.c2012-01-31 07:14:36 UTC (rev 322961) @@ -130,9 +130,8 @@ efree(func); } - struct pdo_sqlite_collation *collation; - while (H-collations) { + struct pdo_sqlite_collation *collation; collation = H-collations; H-collations = collation-next; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_sqlite/php_pdo_sqlite_int.h branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c branches/PHP_5_3/ext/pdo_sqlite/tests/pdo_sqlite_createcollation.p
hi Rasmus, 5.4 is in feature freeze and only critical fixes should get in. Any reason to add this at this stage? As it breaks the build (fixed now), I suppose it was not well tested. ps: sorry for double mails, wrong internals email :) Cheers, On Sun, Jan 29, 2012 at 5:22 AM, Rasmus Lerdorf ras...@php.net wrote: rasmus Sun, 29 Jan 2012 04:22:23 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322916 Log: createCollation() for pdo_sqlite as well Closes bug #55226 Bug: https://bugs.php.net/55226 (Open) Support creating collations in SQLite Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_sqlite/php_pdo_sqlite_int.h U php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c A php/php-src/branches/PHP_5_3/ext/pdo_sqlite/tests/pdo_sqlite_createcollation.phpt U php/php-src/branches/PHP_5_4/ext/pdo_sqlite/php_pdo_sqlite_int.h U php/php-src/branches/PHP_5_4/ext/pdo_sqlite/sqlite_driver.c A php/php-src/branches/PHP_5_4/ext/pdo_sqlite/tests/pdo_sqlite_createcollation.phpt U php/php-src/trunk/ext/pdo_sqlite/php_pdo_sqlite_int.h U php/php-src/trunk/ext/pdo_sqlite/sqlite_driver.c A php/php-src/trunk/ext/pdo_sqlite/tests/pdo_sqlite_createcollation.phpt -- 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/pdo_sqlite/sqlite_driver.c branches/PHP_5_4/ext/pdo_sqlite/sqlite_driver.c trunk/ext/pdo_sqlite/sqlite_driver.c
pajoye Tue, 31 Jan 2012 07:17:05 + Revision: http://svn.php.net/viewvc?view=revisionrevision=322962 Log: - fix #55226, WS Bug: https://bugs.php.net/55226 (Closed) Support creating collations in SQLite Changed paths: U php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c U php/php-src/branches/PHP_5_4/ext/pdo_sqlite/sqlite_driver.c U php/php-src/trunk/ext/pdo_sqlite/sqlite_driver.c Modified: php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c === --- php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c 2012-01-31 07:14:36 UTC (rev 322961) +++ php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c 2012-01-31 07:17:05 UTC (rev 322962) @@ -670,14 +670,14 @@ struct pdo_sqlite_collation *collation; zval *callback; char *collation_name; - int collation_name_len; - char *cbname = NULL; + int collation_name_len; + char *cbname = NULL; pdo_dbh_t *dbh; pdo_sqlite_db_handle *H; int ret; if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sz, - collation_name, collation_name_len, callback)) { + collation_name, collation_name_len, callback)) { RETURN_FALSE; } @@ -693,10 +693,10 @@ H = (pdo_sqlite_db_handle *)dbh-driver_data; - collation = (struct pdo_sqlite_collation*)ecalloc(1, sizeof(*collation)); + collation = (struct pdo_sqlite_collation*)ecalloc(1, sizeof(*collation)); - ret = sqlite3_create_collation(H-db, collation_name, SQLITE_UTF8, collation, php_sqlite3_collation_callback); - if (ret == SQLITE_OK) { + ret = sqlite3_create_collation(H-db, collation_name, SQLITE_UTF8, collation, php_sqlite3_collation_callback); + if (ret == SQLITE_OK) { collation-name = estrdup(collation_name); MAKE_STD_ZVAL(collation-callback); Modified: php/php-src/branches/PHP_5_4/ext/pdo_sqlite/sqlite_driver.c === --- php/php-src/branches/PHP_5_4/ext/pdo_sqlite/sqlite_driver.c 2012-01-31 07:14:36 UTC (rev 322961) +++ php/php-src/branches/PHP_5_4/ext/pdo_sqlite/sqlite_driver.c 2012-01-31 07:17:05 UTC (rev 322962) @@ -680,7 +680,7 @@ collation_name, collation_name_len, callback)) { RETURN_FALSE; } - + dbh = zend_object_store_get_object(getThis() TSRMLS_CC); PDO_CONSTRUCT_CHECK; @@ -713,7 +713,6 @@ } /* }}} */ - static const zend_function_entry dbh_methods[] = { PHP_ME(SQLite, sqliteCreateFunction, NULL, ZEND_ACC_PUBLIC) PHP_ME(SQLite, sqliteCreateAggregate, NULL, ZEND_ACC_PUBLIC) Modified: php/php-src/trunk/ext/pdo_sqlite/sqlite_driver.c === --- php/php-src/trunk/ext/pdo_sqlite/sqlite_driver.c2012-01-31 07:14:36 UTC (rev 322961) +++ php/php-src/trunk/ext/pdo_sqlite/sqlite_driver.c2012-01-31 07:17:05 UTC (rev 322962) @@ -680,7 +680,7 @@ collation_name, collation_name_len, callback)) { RETURN_FALSE; } - + dbh = zend_object_store_get_object(getThis() TSRMLS_CC); PDO_CONSTRUCT_CHECK; @@ -713,7 +713,6 @@ } /* }}} */ - static const zend_function_entry dbh_methods[] = { PHP_ME(SQLite, sqliteCreateFunction, NULL, ZEND_ACC_PUBLIC) PHP_ME(SQLite, sqliteCreateAggregate, NULL, ZEND_ACC_PUBLIC) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php