[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING
cataphract Fri, 10 Dec 2010 07:59:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306171 Log: - I had forgotten to commit UPGRADING (for enable_post_data_processing). Changed paths: U php/php-src/trunk/UPGRADING Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2010-12-10 07:31:51 UTC (rev 306170) +++ php/php-src/trunk/UPGRADING 2010-12-10 07:59:34 UTC (rev 306171) @@ -8,17 +8,18 @@ 4. Changes made to existing methods 5. Changes made to existing classes 6. Deprecated -7. Extensions: +7. Removed +8. Extensions: a. moved out to PECL and actively maintained there b. no longer maintained c. with changed behaviour d. no longer possible to disable -8. Changes in SAPI support -9. Changes in INI directives -10. Syntax additions +9. Changes in SAPI support +10. Changes in INI directives 11. Syntax additions -12. Windows support -12. New in PHP X.Y: +12. Syntax additions +13. Windows support +14. New in PHP X.Y: a. New libraries b. New extensions c. New stream wrappers @@ -255,6 +256,12 @@ multibyte support, but may enable or disable it by zend.multibyte. It doesn't make a lot of sense to enable this option without ext/mbstring, because the most functionality is implemented by mbstrings callbacks. +- Added enable_post_data_reading, which is enable by default. When it's + disabled, the POST data is not read (and processed); the behavior is similar + to that of other request methods with body, like PUT. This allows reading the + raw POST data in multipart requests and read/process the POST data in a + stream fashion (through php://input), without having it copied in memory two/ + three times. 11. Syntax additions -- 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
felipe Fri, 10 Dec 2010 11:26:14 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306179 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-10 10:49:35 UTC (rev 306178) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-10 11:26:14 UTC (rev 306179) @@ -9,8 +9,9 @@ . Fixed bug #39199 (Cannot load Lob data with more than 4000 bytes on ORACLE 10). (spatar at mail dot nnov dot ru) -- Indirect reference to $this fails to resolve if direct $this is never used - in method. (Scott) +- Zend Engine: + . Indirect reference to $this fails to resolve if direct $this is never used +in method. (Scott) 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/Zend/ zend_compile.c
felipe Fri, 10 Dec 2010 11:33:35 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306181 Log: - Fixed ZTS build Changed paths: U php/php-src/branches/PHP_5_3/Zend/zend_compile.c Modified: php/php-src/branches/PHP_5_3/Zend/zend_compile.c === --- php/php-src/branches/PHP_5_3/Zend/zend_compile.c2010-12-10 11:27:35 UTC (rev 306180) +++ php/php-src/branches/PHP_5_3/Zend/zend_compile.c2010-12-10 11:33:35 UTC (rev 306181) @@ -4353,7 +4353,7 @@ fetch_simple_variable(result, variable, 1 TSRMLS_CC); /* there is a chance someone is accessing $this */ if (CG(active_op_array)-scope CG(active_op_array)-this_var == -1) { - CG(active_op_array)-this_var = lookup_cv(CG(active_op_array), estrndup(this, sizeof(this)-1), sizeof(this)-1 TSRMLS_CC); + CG(active_op_array)-this_var = lookup_cv(CG(active_op_array), estrndup(this, sizeof(this)-1), sizeof(this)-1); } } /* }}} */ -- 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 main/fopen_wrappers.c
iliaaFri, 10 Dec 2010 12:50:25 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306184 Log: Fixed bug #53516 (Regression in open_basedir handling). Bug: http://bugs.php.net/53516 (Open) open_basedir BUG introduced in PHP 5.2.15 Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/main/fopen_wrappers.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2010-12-10 11:52:13 UTC (rev 306183) +++ php/php-src/branches/PHP_5_2/NEWS 2010-12-10 12:50:25 UTC (rev 306184) @@ -1,6 +1,7 @@ PHP NEWS ||| ?? ??? , PHP 5.2.16 +- Fixed bug #53516 (Regression in open_basedir handling). (Ilia) 09 Dec 2010, PHP 5.2.15 - Fixed extract() to do not overwrite $GLOBALS and $this when using Modified: php/php-src/branches/PHP_5_2/main/fopen_wrappers.c === --- php/php-src/branches/PHP_5_2/main/fopen_wrappers.c 2010-12-10 11:52:13 UTC (rev 306183) +++ php/php-src/branches/PHP_5_2/main/fopen_wrappers.c 2010-12-10 12:50:25 UTC (rev 306184) @@ -192,7 +192,7 @@ if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) { #endif if (resolved_name_len resolved_basedir_len - resolved_name[resolved_basedir_len] != PHP_DIR_SEPARATOR) { + resolved_name[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { return -1; } else { /* File is in the right directory */ -- 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/NEWS branches/PHP_5_3/ext/zip/zip_stream.c trunk/ext/zip/zip_stream.c
On Wed, Nov 3, 2010 at 22:48, Pierre Joye paj...@php.net wrote: pajoye Wed, 03 Nov 2010 21:48:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305063 Log: - add stat support for zip:// does that mean filesize(zip://archive.zip#foobar) and file_exists(zip://archive.zip#foobar) and buddies work now? Got very frustrated yesterday when I noticed it didn't work :P -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/win32/build/ config.w32 confutils.js
pajoye Fri, 10 Dec 2010 16:10:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306189 Log: - add initial PHP_INSTALL_HEADERS, one step closer to phpize Changed paths: U php/php-src/trunk/win32/build/config.w32 U php/php-src/trunk/win32/build/confutils.js Modified: php/php-src/trunk/win32/build/config.w32 === --- php/php-src/trunk/win32/build/config.w322010-12-10 14:35:37 UTC (rev 306188) +++ php/php-src/trunk/win32/build/config.w322010-12-10 16:10:08 UTC (rev 306189) @@ -107,7 +107,7 @@ } ARG_ENABLE('zts', 'Thread safety', 'yes'); // Configures the hard-coded installation dir -ARG_ENABLE('prefix', 'where PHP will be installed', ''); +ARG_WITH('prefix', 'where PHP will be installed', ''); if (PHP_PREFIX == '') { PHP_PREFIX = C:\\php; if (PHP_DEBUG == yes) @@ -356,6 +356,8 @@ ADD_SOURCES(win32, glob.c readdir.c \ registry.c select.c sendmail.c time.c winutil.c wsyslog.c globals.c); +PHP_INSTALL_HEADERS(Zend/ TSRM/ include/ main/ main/streams/); + STDOUT.WriteBlankLines(1); /* Can we build with IPv6 support? */ Modified: php/php-src/trunk/win32/build/confutils.js === --- php/php-src/trunk/win32/build/confutils.js 2010-12-10 14:35:37 UTC (rev 306188) +++ php/php-src/trunk/win32/build/confutils.js 2010-12-10 16:10:08 UTC (rev 306189) @@ -34,6 +34,9 @@ /* Store the SAPI enabled (summary + QA check) */ var sapi_enabled = new Array(); +/* Store the headers to install */ +var headers_install = new Array(); + /* Mapping CL version human readable name */ var VC_VERSIONS = new Array(); VC_VERSIONS[1200] = 'MSVC6 (Visual C++ 6.0)'; @@ -1848,7 +1851,27 @@ return items; } +function PHP_INSTALL_HEADERS(headers_list) +{ + headers_list = headers_list.split(new RegExp(\\s+)); + headers_list.sort(); + for (i in headers_list) { + src = headers_list[i]; + src = src.replace(new RegExp(/, g), \\); + isdir = FSO.FolderExists(src); + isfile = FSO.FileExists(src); + if (isdir) { + headers_install[headers_install.length] = [src, 'dir']; + ADD_FLAG(INSTALL_HEADERS_DIR, src); + } else if (isfile) { + headers_install[headers_install.length] = [src, 'file']; + ADD_FLAG(INSTALL_HEADERS, src); + } + } + output_as_table([Headers, Type], headers_install); +} + // for snapshot builders, this option will attempt to enable everything // and you can then build everything, ignoring fatal errors within a module // by running nmake snap -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/win32/build/ Makefile
pajoye Fri, 10 Dec 2010 17:11:58 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306190 Log: - install headers, missed that one Changed paths: U php/php-src/trunk/win32/build/Makefile Modified: php/php-src/trunk/win32/build/Makefile === --- php/php-src/trunk/win32/build/Makefile 2010-12-10 16:10:08 UTC (rev 306189) +++ php/php-src/trunk/win32/build/Makefile 2010-12-10 17:11:58 UTC (rev 306190) @@ -152,8 +152,14 @@ $(BUILD_DIR)\php.exe ..\php-installer\build-installer.php $(BUILD_DIR) $(PHPDLL) $(SAPI_TARGETS) $(EXT_TARGETS) $(PECL_TARGETS) # need to redirect, since INSTALL is a file in the root... -install: really-install +install: really-install install-headers +install-headers: + @if not exist $(PHP_PREFIX)\include mkdir $(PHP_PREFIX)\include nul + @for %D in ($(INSTALL_HEADERS_DIR)) do @if not exist $(PHP_PREFIX)\include\%D mkdir $(PHP_PREFIX)\include\%D nul + @for %D in ($(INSTALL_HEADERS_DIR)) do @copy %D*.h $(PHP_PREFIX)\include\%D /y nul + @for %D in ($(INSTALL_HEADERS)) do @copy %D $(PHP_PREFIX)\include /y nul + really-install: @if not exist $(PHP_PREFIX) mkdir $(PHP_PREFIX) @echo Installing files under $(PHP_PREFIX) -- 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 branches/PHP_5_2/ext/pdo_pgsql/pgsql_statement.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pdo_pgsql/pgsql_statement.c trunk/ext/pdo_pgsql/pgsql_sta
felipe Fri, 10 Dec 2010 17:50:26 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306192 Log: - Fixed bug #53517 (segfault in pgsql_stmt_execute() when postgres is down) patch by: gyp at balabit dot hu Bug: http://bugs.php.net/53517 (Closed) segfault in pgsql_stmt_execute() when postgres is down Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/pdo_pgsql/pgsql_statement.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pgsql_statement.c U php/php-src/trunk/ext/pdo_pgsql/pgsql_statement.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2010-12-10 17:19:58 UTC (rev 306191) +++ php/php-src/branches/PHP_5_2/NEWS 2010-12-10 17:50:26 UTC (rev 306192) @@ -1,6 +1,8 @@ PHP NEWS ||| ?? ??? , PHP 5.2.16 +- Fixed bug #53517 (segfault in pgsql_stmt_execute() when postgres is down). + (gyp at balabit dot hu) - Fixed bug #53516 (Regression in open_basedir handling). (Ilia) 09 Dec 2010, PHP 5.2.15 Modified: php/php-src/branches/PHP_5_2/ext/pdo_pgsql/pgsql_statement.c === --- php/php-src/branches/PHP_5_2/ext/pdo_pgsql/pgsql_statement.c 2010-12-10 17:19:58 UTC (rev 306191) +++ php/php-src/branches/PHP_5_2/ext/pdo_pgsql/pgsql_statement.c 2010-12-10 17:50:26 UTC (rev 306192) @@ -156,7 +156,7 @@ * chance to DEALLOCATE the prepared statements it has created. so, if we hit a 42P05 we * deallocate it and retry ONCE (thies 2005.12.15) */ - if (!strcmp(sqlstate, 42P05)) { + if (sqlstate !strcmp(sqlstate, 42P05)) { char buf[100]; /* stmt_name == pdo_crsr_%08x */ PGresult *res; snprintf(buf, sizeof(buf), DEALLOCATE %s, S-stmt_name); Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-10 17:19:58 UTC (rev 306191) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-10 17:50:26 UTC (rev 306192) @@ -9,6 +9,10 @@ . Fixed bug #39199 (Cannot load Lob data with more than 4000 bytes on ORACLE 10). (spatar at mail dot nnov dot ru) +- PDO PostgreSQL driver: + . Fixed bug #53517 (segfault in pgsql_stmt_execute() when postgres is down). +(gyp at balabit dot hu) + - Zend Engine: . Indirect reference to $this fails to resolve if direct $this is never used in method. (Scott) Modified: php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pgsql_statement.c === --- php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pgsql_statement.c 2010-12-10 17:19:58 UTC (rev 306191) +++ php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pgsql_statement.c 2010-12-10 17:50:26 UTC (rev 306192) @@ -184,7 +184,7 @@ * chance to DEALLOCATE the prepared statements it has created. so, if we hit a 42P05 we * deallocate it and retry ONCE (thies 2005.12.15) */ - if (!strcmp(sqlstate, 42P05)) { + if (sqlstate !strcmp(sqlstate, 42P05)) { char buf[100]; /* stmt_name == pdo_crsr_%08x */ PGresult *res; snprintf(buf, sizeof(buf), DEALLOCATE %s, S-stmt_name); Modified: php/php-src/trunk/ext/pdo_pgsql/pgsql_statement.c === --- php/php-src/trunk/ext/pdo_pgsql/pgsql_statement.c 2010-12-10 17:19:58 UTC (rev 306191) +++ php/php-src/trunk/ext/pdo_pgsql/pgsql_statement.c 2010-12-10 17:50:26 UTC (rev 306192) @@ -184,7 +184,7 @@ * chance to DEALLOCATE the prepared statements it has created. so, if we hit a 42P05 we * deallocate it and retry ONCE (thies 2005.12.15) */ - if (!strcmp(sqlstate, 42P05)) { + if (sqlstate !strcmp(sqlstate, 42P05)) { char buf[100]; /* stmt_name == pdo_crsr_%08x */
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ NEWS main/fopen_wrappers.c
Is there a test for this? Chris On 12/10/2010 04:50 AM, Ilia Alshanetsky wrote: iliaaFri, 10 Dec 2010 12:50:25 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306184 Log: Fixed bug #53516 (Regression in open_basedir handling). Bug: http://bugs.php.net/53516 (Open) open_basedir BUG introduced in PHP 5.2.15 Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/main/fopen_wrappers.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2010-12-10 11:52:13 UTC (rev 306183) +++ php/php-src/branches/PHP_5_2/NEWS 2010-12-10 12:50:25 UTC (rev 306184) @@ -1,6 +1,7 @@ PHP NEWS ||| ?? ??? , PHP 5.2.16 +- Fixed bug #53516 (Regression in open_basedir handling). (Ilia) 09 Dec 2010, PHP 5.2.15 - Fixed extract() to do not overwrite $GLOBALS and $this when using Modified: php/php-src/branches/PHP_5_2/main/fopen_wrappers.c === --- php/php-src/branches/PHP_5_2/main/fopen_wrappers.c 2010-12-10 11:52:13 UTC (rev 306183) +++ php/php-src/branches/PHP_5_2/main/fopen_wrappers.c 2010-12-10 12:50:25 UTC (rev 306184) @@ -192,7 +192,7 @@ if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) { #endif if (resolved_name_len resolved_basedir_len - resolved_name[resolved_basedir_len] != PHP_DIR_SEPARATOR) { + resolved_name[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { return -1; } else { /* File is in the right directory */ -- Email: christopher.jo...@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ -- 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_2/ NEWS main/fopen_wrappers.c
Going to see if we can add one. On Fri, Dec 10, 2010 at 4:33 PM, Christopher Jones christopher.jo...@oracle.com wrote: Is there a test for this? Chris On 12/10/2010 04:50 AM, Ilia Alshanetsky wrote: iliaa Fri, 10 Dec 2010 12:50:25 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306184 Log: Fixed bug #53516 (Regression in open_basedir handling). Bug: http://bugs.php.net/53516 (Open) open_basedir BUG introduced in PHP 5.2.15 Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/main/fopen_wrappers.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2010-12-10 11:52:13 UTC (rev 306183) +++ php/php-src/branches/PHP_5_2/NEWS 2010-12-10 12:50:25 UTC (rev 306184) @@ -1,6 +1,7 @@ PHP NEWS ||| ?? ??? , PHP 5.2.16 +- Fixed bug #53516 (Regression in open_basedir handling). (Ilia) 09 Dec 2010, PHP 5.2.15 - Fixed extract() to do not overwrite $GLOBALS and $this when using Modified: php/php-src/branches/PHP_5_2/main/fopen_wrappers.c === --- php/php-src/branches/PHP_5_2/main/fopen_wrappers.c 2010-12-10 11:52:13 UTC (rev 306183) +++ php/php-src/branches/PHP_5_2/main/fopen_wrappers.c 2010-12-10 12:50:25 UTC (rev 306184) @@ -192,7 +192,7 @@ if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) { #endif if (resolved_name_len resolved_basedir_len - resolved_name[resolved_basedir_len] != PHP_DIR_SEPARATOR) { + resolved_name[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { return -1; } else { /* File is in the right directory */ -- Email: christopher.jo...@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ -- 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/spl/spl_array.c branches/PHP_5_3/ext/spl/tests/bug53515.phpt trunk/ext/spl/spl_array.c trunk/ext/spl/tests/bug53515.phpt
felipe Fri, 10 Dec 2010 23:58:33 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306213 Log: - Fixed bug #53515 (property_exists incorrect on ArrayObject null and 0 values) Bug: http://bugs.php.net/53515 (Open) property_exists incorrect on ArrayObject null and 0 values Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/spl/spl_array.c A php/php-src/branches/PHP_5_3/ext/spl/tests/bug53515.phpt U php/php-src/trunk/ext/spl/spl_array.c A php/php-src/trunk/ext/spl/tests/bug53515.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-10 22:51:08 UTC (rev 306212) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-10 23:58:33 UTC (rev 306213) @@ -1,6 +1,10 @@ PHP NEWS ||| ?? ??? 20??, PHP 5.3.5 +- Zend Engine: + . Indirect reference to $this fails to resolve if direct $this is never used +in method. (Scott) + - Intl extension: . Fixed bug #53512 (NumberFormatter::setSymbol crash on bogus $attr values). (Felipe) @@ -13,9 +17,9 @@ . Fixed bug #53517 (segfault in pgsql_stmt_execute() when postgres is down). (gyp at balabit dot hu) -- Zend Engine: - . Indirect reference to $this fails to resolve if direct $this is never used -in method. (Scott) +- SPL extension: + . Fixed bug #53515 (property_exists incorrect on ArrayObject null and 0 +values). (Felipe) 09 Dec 2010, PHP 5.3.4 - Upgraded bundled Sqlite3 to version 3.7.3. (Ilia) Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_array.c === --- php/php-src/branches/PHP_5_3/ext/spl/spl_array.c2010-12-10 22:51:08 UTC (rev 306212) +++ php/php-src/branches/PHP_5_3/ext/spl/spl_array.c2010-12-10 23:58:33 UTC (rev 306213) @@ -579,8 +579,15 @@ switch(Z_TYPE_P(offset)) { case IS_STRING: if (check_empty) { - if (zend_symtable_find(spl_array_get_hash_table(intern, 0 TSRMLS_CC), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, (void **) tmp) != FAILURE zend_is_true(*tmp)) { - return 1; + if (zend_symtable_find(spl_array_get_hash_table(intern, 0 TSRMLS_CC), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, (void **) tmp) != FAILURE) { + switch (check_empty) { + case 0: + return Z_TYPE_PP(tmp) != IS_NULL; + case 2: + return 1; + default: + return zend_is_true(*tmp); + } } return 0; } else { @@ -597,8 +604,15 @@ } if (check_empty) { HashTable *ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC); - if (zend_hash_index_find(ht, index, (void **)tmp) != FAILURE zend_is_true(*tmp)) { - return 1; + if (zend_hash_index_find(ht, index, (void **)tmp) != FAILURE) { + switch (check_empty) { + case 0: + return Z_TYPE_PP(tmp) != IS_NULL; + case 2: + return 1; + default: + return zend_is_true(*tmp); + } } return 0; } else { Added: php/php-src/branches/PHP_5_3/ext/spl/tests/bug53515.phpt === --- php/php-src/branches/PHP_5_3/ext/spl/tests/bug53515.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/spl/tests/bug53515.phpt2010-12-10 23:58:33 UTC (rev 306213) @@ -0,0 +1,27 @@ +--TEST-- +Bug #53515 (property_exists incorrect on ArrayObject null and 0 values) +--FILE-- +?php + +$a = array('a' = 1, 'b'= true, 'c' = 0, 'd' = null, 'e' = false, 'f' = array()); +$o = new ArrayObject($a, ArrayObject::ARRAY_AS_PROPS); + +$a['z'] = ''; +$a[''] = ''; + +foreach ($a as $key = $value) { + echo $key . ': ' . (is_null($value) ? 'null' : $value) . +' array_key_exists: ' . (array_key_exists($key, $a) ? 'true' : 'false') . +' property_exists: ' . (property_exists($o, $key) ? 'true' : 'false'),\n; +} + +? +--EXPECT-- +a: 1 array_key_exists: true property_exists:
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/sapi/litespeed/ lsapi_main.c lsapilib.c lsapilib.h
On Fri, 2010-12-10 at 22:51 +, George Wang wrote: gwangFri, 10 Dec 2010 22:51:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306212 Log: fixed keyLen validation point Changed paths: U php/php-src/branches/PHP_5_3/sapi/litespeed/lsapi_main.c U php/php-src/branches/PHP_5_3/sapi/litespeed/lsapilib.c U php/php-src/branches/PHP_5_3/sapi/litespeed/lsapilib.h Is that needed in trunk, too? johannes -- 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/standard/php_fopen_wrapper.c trunk/ext/standard/info.c trunk/ext/standard/php_fopen_wrapper.c
cataphract Sat, 11 Dec 2010 01:52:13 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306215 Log: - Implemented request #26158/bug #53465 (open arbitrary file descriptor with fopen) Bugs: http://bugs.php.net/26158 (Bogus) Open arbitrary file descriptor with fopen http://bugs.php.net/53465 (Assigned) Cannot open file descriptor streams Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/php_fopen_wrapper.c U php/php-src/trunk/ext/standard/info.c U php/php-src/trunk/ext/standard/php_fopen_wrapper.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-11 01:45:51 UTC (rev 306214) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-11 01:52:13 UTC (rev 306215) @@ -21,6 +21,9 @@ . Fixed bug #53515 (property_exists incorrect on ArrayObject null and 0 values). (Felipe) +- Streams + . Implemented FR #26158 (open arbitrary file descriptor with fopen) + 09 Dec 2010, PHP 5.3.4 - Upgraded bundled Sqlite3 to version 3.7.3. (Ilia) - Upgraded bundled PCRE to version 8.10. (Ilia) Modified: php/php-src/branches/PHP_5_3/ext/standard/php_fopen_wrapper.c === --- php/php-src/branches/PHP_5_3/ext/standard/php_fopen_wrapper.c 2010-12-11 01:45:51 UTC (rev 306214) +++ php/php-src/branches/PHP_5_3/ext/standard/php_fopen_wrapper.c 2010-12-11 01:52:13 UTC (rev 306215) @@ -257,6 +257,39 @@ } else { fd = dup(STDERR_FILENO); } + } else if (!strncasecmp(path, fd/, 3)) { + char *start, + *end; + long fildes_ori; + intdtablesize; + + start = path[3]; + fildes_ori = strtol(start, end, 10); + if (end == start || (*end != '\0' *end != '/')) { + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, + php://fd/ stream must be specified in the form php://fd/orig fd); + return NULL; + } + +#if HAVE_UNISTD_H + dtablesize = getdtablesize(); +#else + dtablesize = INT_MAX; +#endif + + if (fildes_ori 0 || fildes_ori = dtablesize) { + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, + The file descriptors must be non-negative numbers smaller than %d, dtablesize); + return NULL; + } + + fd = dup(fildes_ori); + if (fd == -1) { + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, + Error duping file descriptor %d; possibly it doesn't exist: + [%d]: %s, fildes_ori, errno, strerror(errno)); + return NULL; + } } else if (!strncasecmp(path, filter/, 7)) { /* Save time/memory when chain isn't specified */ if (strchr(mode, 'r') || strchr(mode, '+')) { Modified: php/php-src/trunk/ext/standard/info.c === --- php/php-src/trunk/ext/standard/info.c 2010-12-11 01:45:51 UTC (rev 306214) +++ php/php-src/trunk/ext/standard/info.c 2010-12-11 01:52:13 UTC (rev 306215) @@ -68,7 +68,7 @@ char *new_str; TSRMLS_FETCH(); - new_str = php_escape_html_entities((char *) str, len, new_len, 0, ENT_QUOTES, utf-8 TSRMLS_CC); + new_str = php_escape_html_entities((unsigned char *) str, len, new_len, 0, ENT_QUOTES, utf-8 TSRMLS_CC); written = php_output_write(new_str, new_len TSRMLS_CC); efree(new_str); return written; Modified: php/php-src/trunk/ext/standard/php_fopen_wrapper.c === --- php/php-src/trunk/ext/standard/php_fopen_wrapper.c 2010-12-11 01:45:51 UTC (rev 306214) +++ php/php-src/trunk/ext/standard/php_fopen_wrapper.c 2010-12-11 01:52:13 UTC (rev 306215) @@ -257,6 +257,39 @@ } else { fd = dup(STDERR_FILENO); } + } else if (!strncasecmp(path, fd/, 3)) { + char *start, + *end; + long fildes_ori; + intdtablesize; + + start = path[3]; + fildes_ori = strtol(start, end, 10); + if (end == start || (*end != '\0' *end != '/')) { + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, + php://fd/ stream must be specified in the form php://fd/orig fd); + return NULL;
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/php_fopen_wrapper.c branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_01.phpt branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_0
cataphract Sat, 11 Dec 2010 02:08:02 + Revision: http://svn.php.net/viewvc?view=revisionrevision=306216 Log: - Tests and small parsing correction for php://fd wrapper Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/php_fopen_wrapper.c A php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_01.phpt A php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_02.phpt A php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_03.phpt A php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_04.phpt U php/php-src/trunk/ext/standard/php_fopen_wrapper.c A php/php-src/trunk/ext/standard/tests/file/php_fd_wrapper_01.phpt A php/php-src/trunk/ext/standard/tests/file/php_fd_wrapper_02.phpt A php/php-src/trunk/ext/standard/tests/file/php_fd_wrapper_03.phpt A php/php-src/trunk/ext/standard/tests/file/php_fd_wrapper_04.phpt Modified: php/php-src/branches/PHP_5_3/ext/standard/php_fopen_wrapper.c === --- php/php-src/branches/PHP_5_3/ext/standard/php_fopen_wrapper.c 2010-12-11 01:52:13 UTC (rev 306215) +++ php/php-src/branches/PHP_5_3/ext/standard/php_fopen_wrapper.c 2010-12-11 02:08:02 UTC (rev 306216) @@ -265,7 +265,7 @@ start = path[3]; fildes_ori = strtol(start, end, 10); - if (end == start || (*end != '\0' *end != '/')) { + if (end == start || *end != '\0') { php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, php://fd/ stream must be specified in the form php://fd/orig fd); return NULL; Added: php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_01.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_01.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_01.phpt 2010-12-11 02:08:02 UTC (rev 306216) @@ -0,0 +1,11 @@ +--TEST-- +php://fd wrapper: basic test +--FILE-- +?php +$f = fopen(php://fd/1, wb); +fwrite($f, hi!); + +echo \nDone.\n; +--EXPECT-- +hi! +Done. Added: php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_02.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_02.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_02.phpt 2010-12-11 02:08:02 UTC (rev 306216) @@ -0,0 +1,11 @@ +--TEST-- +php://fd wrapper: mode is ignored +--FILE-- +?php +$f = fopen(php://fd/1, rkkk); +fwrite($f, hi!); + +echo \nDone.\n; +--EXPECT-- +hi! +Done. Added: php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_03.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_03.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_03.phpt 2010-12-11 02:08:02 UTC (rev 306216) @@ -0,0 +1,22 @@ +--TEST-- +php://fd wrapper: bad syntax +--FILE-- +?php +fopen(php://fd, w); +fopen(php://fd/, w); +fopen(php://fd/-2, w); +fopen(php://fd/1/, w); + +echo \nDone.\n; +--EXPECTF-- +Warning: fopen(): Invalid php:// URL specified in %s on line %d + +Warning: fopen(php://fd): failed to open stream: operation failed in %s on line 2 + +Warning: fopen(php://fd/): failed to open stream: php://fd/ stream must be specified in the form php://fd/orig fd in %s on line %d + +Warning: fopen(php://fd/-2): failed to open stream: The file descriptors must be non-negative numbers smaller than %d in %s on line %d + +Warning: fopen(php://fd/1/): failed to open stream: php://fd/ stream must be specified in the form php://fd/orig fd in %s on line %d + +Done. Added: php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_04.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_04.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/php_fd_wrapper_04.phpt 2010-12-11 02:08:02 UTC (rev 306216) @@ -0,0 +1,20 @@ +--TEST-- +php://fd wrapper: invalid file descriptor +--SKIPIF-- +?php include('skipif.inc'); +if(substr(PHP_OS, 0, 3) == WIN) + die(skip Not for Windows); + +//we'd need a release and a test variation for windows, because in debug builds we get this message: +//Warning: Invalid parameter detected in CRT function '_dup' (f:\dd\vctools\crt_bld\self_x86\crt\src\dup.c:52) +//I greped the CRT sources and found no function capable of validating a file descriptor + +--FILE-- +?php +fopen(php://fd/12, w); + +echo \nDone.\n; +--EXPECTF-- +Warning: