[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/Zend/tests/bug50174.phpt branches/PHP_5_2/Zend/zend_compile.c branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug50174.phpt branch
felipe Sat, 14 Nov 2009 19:17:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=290752 Log: - Fixed bug #50174 (Incorrectly matched docComment) Bug: http://bugs.php.net/50174 (Open) Incorrectly matched docComment Changed paths: U php/php-src/branches/PHP_5_2/NEWS A php/php-src/branches/PHP_5_2/Zend/tests/bug50174.phpt U php/php-src/branches/PHP_5_2/Zend/zend_compile.c U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug50174.phpt U php/php-src/branches/PHP_5_3/Zend/zend_compile.c A php/php-src/trunk/Zend/tests/bug50174.phpt U php/php-src/trunk/Zend/zend_compile.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2009-11-14 19:06:01 UTC (rev 290751) +++ php/php-src/branches/PHP_5_2/NEWS 2009-11-14 19:17:22 UTC (rev 290752) @@ -1,6 +1,7 @@ PHPNEWS ||| ?? Nov 2009, PHP 5.2.12RC2 +- Fixed bug #50174 (Incorrectly matched docComment). (Felipe) 12 Nov 2009, PHP 5.2.12RC1 - Updated timezone database to version 2009.18 (2009r). (Derick) Added: php/php-src/branches/PHP_5_2/Zend/tests/bug50174.phpt === --- php/php-src/branches/PHP_5_2/Zend/tests/bug50174.phpt (rev 0) +++ php/php-src/branches/PHP_5_2/Zend/tests/bug50174.phpt 2009-11-14 19:17:22 UTC (rev 290752) @@ -0,0 +1,31 @@ +--TEST-- +Bug #50174 (Incorrectly matched docComment) +--FILE-- +?php + +class TestClass +{ + /** const comment */ + const C = 0; + + function x() {} +} + +$rm = new ReflectionMethod('TestClass', 'x'); +var_dump($rm-getDocComment()); + +class TestClass2 +{ + /** const comment */ + const C = 0; + + public $x; +} + +$rp = new ReflectionProperty('TestClass2', 'x'); +var_dump($rp-getDocComment()); + +? +--EXPECT-- +bool(false) +bool(false) Property changes on: php/php-src/branches/PHP_5_2/Zend/tests/bug50174.phpt ___ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + native Modified: php/php-src/branches/PHP_5_2/Zend/zend_compile.c === --- php/php-src/branches/PHP_5_2/Zend/zend_compile.c2009-11-14 19:06:01 UTC (rev 290751) +++ php/php-src/branches/PHP_5_2/Zend/zend_compile.c2009-11-14 19:17:22 UTC (rev 290752) @@ -3103,6 +3103,12 @@ zend_error(E_COMPILE_ERROR, Cannot redefine class constant %s::%s, CG(active_class_entry)-name, var_name-u.constant.value.str.val); } FREE_PNODE(var_name); + + if (CG(doc_comment)) { + efree(CG(doc_comment)); + CG(doc_comment) = NULL; + CG(doc_comment_len) = 0; + } } Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-11-14 19:06:01 UTC (rev 290751) +++ php/php-src/branches/PHP_5_3/NEWS 2009-11-14 19:17:22 UTC (rev 290752) @@ -20,6 +20,7 @@ - Fixed memory leak in extension loading when an error occurs on Windows. (Pierre) +- Fixed bug #50174 (Incorrectly matched docComment). (Felipe) - Fixed bug #50087 (NSAPI performance improvements). (Uwe Schindler) - Fixed bug #50152 (ReflectionClass::hasProperty behaves like isset() not property_exists). (Felipe) Added: php/php-src/branches/PHP_5_3/Zend/tests/bug50174.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug50174.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug50174.phpt 2009-11-14 19:17:22 UTC (rev 290752) @@ -0,0 +1,31 @@ +--TEST-- +Bug #50174 (Incorrectly matched docComment) +--FILE-- +?php + +class TestClass +{ + /** const comment */ + const C = 0; + + function x() {} +} + +$rm = new ReflectionMethod('TestClass', 'x'); +var_dump($rm-getDocComment()); + +class TestClass2 +{ + /** const comment */ + const C = 0; + + public $x; +} + +$rp = new ReflectionProperty('TestClass2', 'x'); +var_dump($rp-getDocComment()); + +? +--EXPECT-- +bool(false) +bool(false) Property changes on: php/php-src/branches/PHP_5_3/Zend/tests/bug50174.phpt ___ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + native Modified: php/php-src/branches/PHP_5_3/Zend/zend_compile.c === --- php/php-src/branches/PHP_5_3/Zend/zend_compile.c2009-11-14 19:06:01 UTC (rev 290751) +++
[PHP-CVS] svn: /php/php-src/trunk/main/ SAPI.c
jani Sat, 14 Nov 2009 22:42:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=290761 Log: MF53: sprintf - snprintf - slprintf (Marcus, Ilia: Thanks for not committing random stuff to HEAD) Changed paths: U php/php-src/trunk/main/SAPI.c Modified: php/php-src/trunk/main/SAPI.c === --- php/php-src/trunk/main/SAPI.c 2009-11-14 22:05:01 UTC (rev 290760) +++ php/php-src/trunk/main/SAPI.c 2009-11-14 22:42:08 UTC (rev 290761) @@ -773,7 +773,7 @@ http_status_line.header_len = strlen(SG(sapi_headers).http_status_line); } else { http_status_line.header = buf; - http_status_line.header_len = sprintf(buf, HTTP/1.0 %d X, SG(sapi_headers).http_response_code); + http_status_line.header_len = slprintf(buf, sizeof(buf), HTTP/1.0 %d X, SG(sapi_headers).http_response_code); } sapi_module.send_header(http_status_line, SG(server_context) TSRMLS_CC); } -- 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/oci8/tests/fetch_all4.phpt trunk/ext/oci8/tests/fetch_all4.phpt
sixd Sat, 14 Nov 2009 23:28:53 + Revision: http://svn.php.net/viewvc?view=revisionrevision=290763 Log: New test Changed paths: A php/php-src/branches/PHP_5_3/ext/oci8/tests/fetch_all4.phpt A php/php-src/trunk/ext/oci8/tests/fetch_all4.phpt Added: php/php-src/branches/PHP_5_3/ext/oci8/tests/fetch_all4.phpt === --- php/php-src/branches/PHP_5_3/ext/oci8/tests/fetch_all4.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/oci8/tests/fetch_all4.phpt 2009-11-14 23:28:53 UTC (rev 290763) @@ -0,0 +1,82 @@ +--TEST-- +Test oci_fetch_* array overwriting when query returns no rows +--SKIPIF-- +?php if (!extension_loaded('oci8')) die (skip no oci8 extension); ? +--FILE-- +?php + +require(dirname(__FILE__).'/connect.inc'); + +// Initialization + +$stmtarray = array( + drop table fetch_all4_tab, + create table fetch_all4_tab (mycol1 number, mycol2 varchar2(20)), + insert into fetch_all4_tab values (1, 'abc') +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + $r = @oci_execute($s); + if (!$r) { + $m = oci_error($s); + if (!in_array($m['code'], array( // ignore expected errors + 942 // table or view does not exist + , 2289 // sequence does not exist + , 4080 // trigger does not exist +, 38802 // edition does not exist +))) { + echo $stmt . PHP_EOL . $m['message'] . PHP_EOL; + } + } +} + +// Run Test + +echo Test 1\n; + +$s = oci_parse($c, select * from fetch_all4_tab where 1 = 0); +oci_execute($s); +$res = array(1,2,3); // this array is replaced as a result of the query +$r = oci_fetch_all($s, $res); +var_dump($r); +var_dump($res); + +echo Test 2\n; + +$s = oci_parse($c, select * from fetch_all4_tab where 1 = 0); +oci_execute($s); +$row = array(1,2,3); // this array is replaced as a result of the query +$row = oci_fetch_array($s); +var_dump($row); + +// Clean up + +$stmtarray = array( + drop table fetch_all4_tab +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + oci_execute($s); +} + +oci_close($c); + +? +===DONE=== +?php exit(0); ? +--EXPECTF-- +Test 1 +int(0) +array(2) { + [%u|b%MYCOL1]= + array(0) { + } + [%u|b%MYCOL2]= + array(0) { + } +} +Test 2 +bool(false) +===DONE=== Property changes on: php/php-src/branches/PHP_5_3/ext/oci8/tests/fetch_all4.phpt ___ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + native Added: php/php-src/trunk/ext/oci8/tests/fetch_all4.phpt === --- php/php-src/trunk/ext/oci8/tests/fetch_all4.phpt (rev 0) +++ php/php-src/trunk/ext/oci8/tests/fetch_all4.phpt2009-11-14 23:28:53 UTC (rev 290763) @@ -0,0 +1,82 @@ +--TEST-- +Test oci_fetch_* array overwriting when query returns no rows +--SKIPIF-- +?php if (!extension_loaded('oci8')) die (skip no oci8 extension); ? +--FILE-- +?php + +require(dirname(__FILE__).'/connect.inc'); + +// Initialization + +$stmtarray = array( + drop table fetch_all4_tab, + create table fetch_all4_tab (mycol1 number, mycol2 varchar2(20)), + insert into fetch_all4_tab values (1, 'abc') +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + $r = @oci_execute($s); + if (!$r) { + $m = oci_error($s); + if (!in_array($m['code'], array( // ignore expected errors + 942 // table or view does not exist + , 2289 // sequence does not exist + , 4080 // trigger does not exist +, 38802 // edition does not exist +))) { + echo $stmt . PHP_EOL . $m['message'] . PHP_EOL; + } + } +} + +// Run Test + +echo Test 1\n; + +$s = oci_parse($c, select * from fetch_all4_tab where 1 = 0); +oci_execute($s); +$res = array(1,2,3); // this array is replaced as a result of the query +$r = oci_fetch_all($s, $res); +var_dump($r); +var_dump($res); + +echo Test 2\n; + +$s = oci_parse($c, select * from fetch_all4_tab where 1 = 0); +oci_execute($s); +$row = array(1,2,3); // this array is replaced as a result of the query +$row = oci_fetch_array($s); +var_dump($row); + +// Clean up + +$stmtarray = array( + drop table fetch_all4_tab +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + oci_execute($s); +} + +oci_close($c); + +? +===DONE=== +?php exit(0); ? +--EXPECTF-- +Test 1 +int(0) +array(2) { + [%u|b%MYCOL1]= + array(0) { + } + [%u|b%MYCOL2]= + array(0) { + } +} +Test 2 +bool(false) +===DONE=== Property changes on:
[PHP-CVS] svn: /php/php-src/branches/ PHP_5_2/ext/zlib/zlib.c PHP_5_3/ext/zlib/zlib.c
jani Sun, 15 Nov 2009 00:13:19 + Revision: http://svn.php.net/viewvc?view=revisionrevision=290765 Log: - Temporary hack to fix bug #49816 (works fine in HEAD which has working output buffering..) Bug: http://bugs.php.net/49816 (Assigned) output corruption using flush Changed paths: U php/php-src/branches/PHP_5_2/ext/zlib/zlib.c U php/php-src/branches/PHP_5_3/ext/zlib/zlib.c Modified: php/php-src/branches/PHP_5_2/ext/zlib/zlib.c === --- php/php-src/branches/PHP_5_2/ext/zlib/zlib.c2009-11-14 23:29:50 UTC (rev 290764) +++ php/php-src/branches/PHP_5_2/ext/zlib/zlib.c2009-11-15 00:13:19 UTC (rev 290765) @@ -994,16 +994,23 @@ do_start = (mode PHP_OUTPUT_HANDLER_START ? 1 : 0); do_end = (mode PHP_OUTPUT_HANDLER_END ? 1 : 0); - if (do_start !SG(headers_sent) !SG(request_info).no_headers) { - switch (ZLIBG(compression_coding)) { - case CODING_GZIP: - sapi_add_header_ex(ZEND_STRL(Content-Encoding: gzip), 1, 1 TSRMLS_CC); - break; - case CODING_DEFLATE: - sapi_add_header_ex(ZEND_STRL(Content-Encoding: deflate), 1, 1 TSRMLS_CC); - break; + if (do_start) { + if (!SG(headers_sent) !SG(request_info).no_headers) { + switch (ZLIBG(compression_coding)) { + case CODING_GZIP: + sapi_add_header_ex(ZEND_STRL(Content-Encoding: gzip), 1, 1 TSRMLS_CC); + break; + case CODING_DEFLATE: + sapi_add_header_ex(ZEND_STRL(Content-Encoding: deflate), 1, 1 TSRMLS_CC); + break; + } + sapi_add_header_ex(ZEND_STRL(Vary: Accept-Encoding), 1, 1 TSRMLS_CC); + } else { + /* Disable compression if headers can not be set (Fix for bug #49816) */ + ZLIBG(output_compression) = 0; + *handled_output = NULL; + return; } - sapi_add_header_ex(ZEND_STRL(Vary: Accept-Encoding), 1, 1 TSRMLS_CC); } if (php_deflate_string(output, output_len, handled_output, handled_output_len, do_start, do_end TSRMLS_CC) != SUCCESS) { Modified: php/php-src/branches/PHP_5_3/ext/zlib/zlib.c === --- php/php-src/branches/PHP_5_3/ext/zlib/zlib.c2009-11-14 23:29:50 UTC (rev 290764) +++ php/php-src/branches/PHP_5_3/ext/zlib/zlib.c2009-11-15 00:13:19 UTC (rev 290765) @@ -1046,16 +1046,23 @@ do_start = (mode PHP_OUTPUT_HANDLER_START ? 1 : 0); do_end = (mode PHP_OUTPUT_HANDLER_END ? 1 : 0); - if (do_start !SG(headers_sent) !SG(request_info).no_headers) { - switch (ZLIBG(compression_coding)) { - case CODING_GZIP: - sapi_add_header_ex(ZEND_STRL(Content-Encoding: gzip), 1, 1 TSRMLS_CC); - break; - case CODING_DEFLATE: - sapi_add_header_ex(ZEND_STRL(Content-Encoding: deflate), 1, 1 TSRMLS_CC); - break; + if (do_start) { + if (!SG(headers_sent) !SG(request_info).no_headers) { + switch (ZLIBG(compression_coding)) { + case CODING_GZIP: + sapi_add_header_ex(ZEND_STRL(Content-Encoding: gzip), 1, 1 TSRMLS_CC); + break; + case CODING_DEFLATE: + sapi_add_header_ex(ZEND_STRL(Content-Encoding: deflate), 1, 1 TSRMLS_CC); + break; + } + sapi_add_header_ex(ZEND_STRL(Vary: Accept-Encoding), 1, 1 TSRMLS_CC); + } else { + /* Disable compression if headers can not be set (Fix for bug #49816) */ + ZLIBG(output_compression) = 0; + *handled_output = NULL; + return; } -
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/main/ main.c
rasmus Sun, 15 Nov 2009 00:21:31 + Revision: http://svn.php.net/viewvc?view=revisionrevision=290766 Log: Fix bug #49868 As far as I can tell this was a copy-paste induced bug when I added the reset_signals flag to zend_set_timeout. Bug: http://bugs.php.net/49868 (Assigned) max_execution_time affected by max_input_time Changed paths: U php/php-src/branches/PHP_5_3/main/main.c Modified: php/php-src/branches/PHP_5_3/main/main.c === --- php/php-src/branches/PHP_5_3/main/main.c2009-11-15 00:13:19 UTC (rev 290765) +++ php/php-src/branches/PHP_5_3/main/main.c2009-11-15 00:21:31 UTC (rev 290766) @@ -2226,7 +2226,7 @@ #ifdef PHP_WIN32 zend_unset_timeout(TSRMLS_C); #endif - zend_set_timeout(EG(timeout_seconds), 0); +zend_set_timeout(INI_INT(max_execution_time), 0); } retval = (zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, NULL, 3, prepend_file_p, primary_file, append_file_p) == SUCCESS); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/main/ main.c
rasmus Sun, 15 Nov 2009 00:24:06 + Revision: http://svn.php.net/viewvc?view=revisionrevision=290767 Log: Fix bug #49868 Bug: http://bugs.php.net/49868 (Assigned) max_execution_time affected by max_input_time Changed paths: U php/php-src/trunk/main/main.c Modified: php/php-src/trunk/main/main.c === --- php/php-src/trunk/main/main.c 2009-11-15 00:21:31 UTC (rev 290766) +++ php/php-src/trunk/main/main.c 2009-11-15 00:24:06 UTC (rev 290767) @@ -2344,7 +2344,7 @@ #ifdef PHP_WIN32 zend_unset_timeout(TSRMLS_C); #endif - zend_set_timeout(EG(timeout_seconds), 0); +zend_set_timeout(INI_INT(max_execution_time), 0); } retval = (zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, NULL, 3, prepend_file_p, primary_file, append_file_p) == SUCCESS); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php