[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/TSRM/tsrm_win32.c trunk/TSRM/tsrm_win32.c

2010-01-25 Thread Pierre Joye
pajoye   Mon, 25 Jan 2010 09:01:22 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293964

Log:
- ws

Changed paths:
U   php/php-src/branches/PHP_5_3/TSRM/tsrm_win32.c
U   php/php-src/trunk/TSRM/tsrm_win32.c

Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_win32.c
===
--- php/php-src/branches/PHP_5_3/TSRM/tsrm_win32.c  2010-01-25 07:15:13 UTC 
(rev 293963)
+++ php/php-src/branches/PHP_5_3/TSRM/tsrm_win32.c  2010-01-25 09:01:22 UTC 
(rev 293964)
@@ -146,7 +146,7 @@
PSID *ppsid = &sid;
DWORD sid_len;
PSID pResultSid = NULL;
-
+
/* Get the actual size of the TokenUser structure */
if (!GetTokenInformation(
hToken, TokenUser, (LPVOID) pTokenUser, 0, &dwLength))  
{

Modified: php/php-src/trunk/TSRM/tsrm_win32.c
===
--- php/php-src/trunk/TSRM/tsrm_win32.c 2010-01-25 07:15:13 UTC (rev 293963)
+++ php/php-src/trunk/TSRM/tsrm_win32.c 2010-01-25 09:01:22 UTC (rev 293964)
@@ -146,7 +146,7 @@
PSID *ppsid = &sid;
DWORD sid_len;
PSID pResultSid = NULL;
-
+
/* Get the actual size of the TokenUser structure */
if (!GetTokenInformation(
hToken, TokenUser, (LPVOID) pTokenUser, 0, &dwLength))  
{

-- 
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/tests/general_functions/ .getservbyport_basic.phpt.swp

2010-01-25 Thread Pierre Joye
pajoye   Mon, 25 Jan 2010 09:09:02 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293965

Log:
- pls don't add .swp/bak/etc. :)

Changed paths:
D   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/.getservbyport_basic.phpt.swp

Deleted: 
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/.getservbyport_basic.phpt.swp
===
(Binary files differ)

-- 
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/tests/streams/ bug49936.phpt

2010-01-25 Thread Pierre Joye
pajoye   Mon, 25 Jan 2010 09:10:45 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293966

Log:
- disable the non win32 version on win

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug49936.phpt

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug49936.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug49936.phpt   
2010-01-25 09:09:02 UTC (rev 293965)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug49936.phpt   
2010-01-25 09:10:45 UTC (rev 293966)
@@ -1,5 +1,10 @@
 --TEST--
 Bug #49936 (crash with ftp stream in php_stream_context_get_option())
+--SKIPIF--
+
 --FILE--
 -- 
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/fileinfo/libmagic/apprentice.c branches/PHP_5_3/ext/fileinfo/libmagic/apptype.c branches/PHP_5_3/ext/fileinfo/libmagic/ascma

2010-01-25 Thread Johannes Schlüter
Hi,

On Sat, 2009-12-26 at 15:00 +, Mikko Koppanen wrote:
> mkoppanenSat, 26 Dec 2009 15:00:21 +
> 
> Revision: http://svn.php.net/viewvc?view=revision&revision=292654
> 
> Log:
> Upgrade bundled libmagic to 5.03 (fixes CDF parsing related issues)
> Clean up / remove whitespace differences to make next merge easier
> Removed unnecessary files from trunk

is ext/fileinfo/libmagic.patch applied/still valid? If it was applied
I'd expect that at least some offsets changed so that it has to be
updated in svn. Revisions 292682 (spprintf the dbname) and 292693 (-
Fixed ZTS build) also seem to be missing from the patch.

johannes

> Changed paths:
> U   php/php-src/branches/PHP_5_3/NEWS
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/apprentice.c
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/apptype.c
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/ascmagic.c
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/cdf.c
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/cdf_time.c
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/compress.c
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/file.h
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/fsmagic.c
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/funcs.c
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/is_tar.c
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/magic.c
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/magic.h
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/patchlevel.h
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/print.c
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/readcdf.c
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/readelf.c
> U   php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/softmagic.c
> U   php/php-src/trunk/ext/fileinfo/libmagic/apprentice.c
> U   php/php-src/trunk/ext/fileinfo/libmagic/apptype.c
> U   php/php-src/trunk/ext/fileinfo/libmagic/ascmagic.c
> U   php/php-src/trunk/ext/fileinfo/libmagic/cdf.c
> U   php/php-src/trunk/ext/fileinfo/libmagic/cdf_time.c
> U   php/php-src/trunk/ext/fileinfo/libmagic/compress.c
> D   php/php-src/trunk/ext/fileinfo/libmagic/file.c
> U   php/php-src/trunk/ext/fileinfo/libmagic/file.h
> D   php/php-src/trunk/ext/fileinfo/libmagic/file_opts.h
> U   php/php-src/trunk/ext/fileinfo/libmagic/funcs.c
> D   php/php-src/trunk/ext/fileinfo/libmagic/getopt_long.c
> U   php/php-src/trunk/ext/fileinfo/libmagic/is_tar.c
> U   php/php-src/trunk/ext/fileinfo/libmagic/magic.c
> U   php/php-src/trunk/ext/fileinfo/libmagic/magic.h
> U   php/php-src/trunk/ext/fileinfo/libmagic/print.c
> U   php/php-src/trunk/ext/fileinfo/libmagic/readcdf.c
> U   php/php-src/trunk/ext/fileinfo/libmagic/readelf.c
> U   php/php-src/trunk/ext/fileinfo/libmagic/softmagic.c
> 
> -- 
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.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_2/Zend/tests/bug44827.phpt branches/PHP_5_3/Zend/tests/bug44827.phpt trunk/Zend/tests/bug44827.phpt

2010-01-25 Thread Ilia Alshanetsky
iliaaMon, 25 Jan 2010 13:08:43 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293974

Log:
Added test case for bug #44827

Bug: http://bugs.php.net/44827 (Closed) define('::') can be defined
  
Changed paths:
A   php/php-src/branches/PHP_5_2/Zend/tests/bug44827.phpt
A   php/php-src/branches/PHP_5_3/Zend/tests/bug44827.phpt
A   php/php-src/trunk/Zend/tests/bug44827.phpt

Added: php/php-src/branches/PHP_5_2/Zend/tests/bug44827.phpt
===
--- php/php-src/branches/PHP_5_2/Zend/tests/bug44827.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_2/Zend/tests/bug44827.phpt   2010-01-25 
13:08:43 UTC (rev 293974)
@@ -0,0 +1,11 @@
+--TEST--
+Bug #44827 (define() allows :: in constant names)
+--FILE--
+
+--EXPECTF--
+Warning: Class constants cannot be defined or redefined in %sbug44827.php on 
line %d
+
+Warning: Class constants cannot be defined or redefined in %sbug44827.php on 
line %d

Added: php/php-src/branches/PHP_5_3/Zend/tests/bug44827.phpt
===
--- php/php-src/branches/PHP_5_3/Zend/tests/bug44827.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/Zend/tests/bug44827.phpt   2010-01-25 
13:08:43 UTC (rev 293974)
@@ -0,0 +1,11 @@
+--TEST--
+Bug #44827 (define() allows :: in constant names)
+--FILE--
+
+--EXPECTF--
+Warning: Class constants cannot be defined or redefined in %sbug44827.php on 
line %d
+
+Warning: Class constants cannot be defined or redefined in %sbug44827.php on 
line %d

Added: php/php-src/trunk/Zend/tests/bug44827.phpt
===
--- php/php-src/trunk/Zend/tests/bug44827.phpt  (rev 0)
+++ php/php-src/trunk/Zend/tests/bug44827.phpt  2010-01-25 13:08:43 UTC (rev 
293974)
@@ -0,0 +1,11 @@
+--TEST--
+Bug #44827 (define() allows :: in constant names)
+--FILE--
+
+--EXPECTF--
+Warning: Class constants cannot be defined or redefined in %sbug44827.php on 
line %d
+
+Warning: Class constants cannot be defined or redefined in %sbug44827.php on 
line %d

-- 
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/mysqli/mysqli_api.c branches/PHP_5_2/ext/mysqli/mysqli_nonapi.c branches/PHP_5_2/ext/mysqli/php_mysqli.h branches/PHP_5_2/ext/my

2010-01-25 Thread Andrey Hristov
andrey   Mon, 25 Jan 2010 13:23:32 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293976

Log:
Fix for bug#50772
mysqli constructor without parameters does not return a working mysqli object

Bug: http://bugs.php.net/50772 (Assigned) mysqli constructor without parameters 
does not return a working mysqli object
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/mysqli/mysqli_api.c
U   php/php-src/branches/PHP_5_2/ext/mysqli/mysqli_nonapi.c
U   php/php-src/branches/PHP_5_2/ext/mysqli/php_mysqli.h
A   php/php-src/branches/PHP_5_2/ext/mysqli/tests/bug50772.phpt
U   php/php-src/branches/PHP_5_2/ext/mysqli/tests/connect.inc
U   php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c
U   php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c
U   php/php-src/branches/PHP_5_3/ext/mysqli/php_mysqli_structs.h
A   php/php-src/branches/PHP_5_3/ext/mysqli/tests/bug50772.phpt
U   php/php-src/trunk/ext/mysqli/mysqli_api.c
U   php/php-src/trunk/ext/mysqli/mysqli_nonapi.c
U   php/php-src/trunk/ext/mysqli/php_mysqli_structs.h
A   php/php-src/trunk/ext/mysqli/tests/bug50772.phpt

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS	2010-01-25 13:22:58 UTC (rev 293975)
+++ php/php-src/branches/PHP_5_2/NEWS	2010-01-25 13:23:32 UTC (rev 293976)
@@ -24,6 +24,8 @@
   emulation). (Jani)
 - Fixed bug #50787 (stream_set_write_buffer() has no effect on socket
   streams). (vnegrier at optilian dot com, Ilia)
+- Fixed bug #50772 (mysqli constructor without parameters does not return a
+  working mysqli object). (Andrey)
 - Fixed bug #50761 (system.multiCall crashes in xmlrpc extension). (hiroaki
   dot kawai at gmail dot com, Ilia)
 - Fixed bug #50732 (exec() adds single byte twice to $output array). (Ilia)

Modified: php/php-src/branches/PHP_5_2/ext/mysqli/mysqli_api.c
===
--- php/php-src/branches/PHP_5_2/ext/mysqli/mysqli_api.c	2010-01-25 13:22:58 UTC (rev 293975)
+++ php/php-src/branches/PHP_5_2/ext/mysqli/mysqli_api.c	2010-01-25 13:23:32 UTC (rev 293976)
@@ -1094,9 +1094,9 @@
 }
 /* }}} */

-/* {{{ proto resource mysqli_init(void)
-   Initialize mysqli and return a resource for use with mysql_real_connect */
-PHP_FUNCTION(mysqli_init)
+
+/* {{{ php_mysqli_init() */
+void php_mysqli_init(INTERNAL_FUNCTION_PARAMETERS)
 {
 	MYSQLI_RESOURCE *mysqli_resource;
 	MY_MYSQL *mysql;
@@ -1121,9 +1121,20 @@
 	} else {
 		((mysqli_object *) zend_object_store_get_object(getThis() TSRMLS_CC))->ptr = mysqli_resource;
 	}
+
 }
 /* }}} */

+
+/* {{{ proto resource mysqli_init(void)
+   Initialize mysqli and return a resource for use with mysql_real_connect */
+PHP_FUNCTION(mysqli_init)
+{
+	php_mysqli_init(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+}
+/* }}} */
+
+
 /* {{{ proto mixed mysqli_insert_id(object link)
Get the ID generated from the previous INSERT operation */
 PHP_FUNCTION(mysqli_insert_id)

Modified: php/php-src/branches/PHP_5_2/ext/mysqli/mysqli_nonapi.c
===
--- php/php-src/branches/PHP_5_2/ext/mysqli/mysqli_nonapi.c	2010-01-25 13:22:58 UTC (rev 293975)
+++ php/php-src/branches/PHP_5_2/ext/mysqli/mysqli_nonapi.c	2010-01-25 13:23:32 UTC (rev 293976)
@@ -40,8 +40,15 @@
 	unsigned int 		hostname_len = 0, username_len = 0, passwd_len = 0, dbname_len = 0, socket_len = 0;
 	longport=0;

+	if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() / 100)) {
+		php_error_docref(NULL TSRMLS_CC, E_WARNING,
+		"Headers and client library minor version mismatch. Headers:%d Library:%ld",
+		MYSQL_VERSION_ID, mysql_get_client_version());
+	}
+
 	if (getThis() && !ZEND_NUM_ARGS()) {
-		RETURN_NULL();
+		php_mysqli_init(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+		return;
 	}

 	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ls", &hostname, &hostname_len, &username, &username_len,

Modified: php/php-src/branches/PHP_5_2/ext/mysqli/php_mysqli.h
===
--- php/php-src/branches/PHP_5_2/ext/mysqli/php_mysqli.h	2010-01-25 13:22:58 UTC (rev 293975)
+++ php/php-src/branches/PHP_5_2/ext/mysqli/php_mysqli.h	2010-01-25 13:23:32 UTC (rev 293976)
@@ -312,6 +312,8 @@
 PHP_MYSQLI_API void mysqli_register_result(zval *return_value, void *result TSRMLS_DC);
 PHP_MYSQLI_API void php_mysqli_set_error(long mysql_errno, char *mysql_err TSRMLS_DC);

+void php_mysqli_init(INTERNAL_FUNCTION_PARAMETERS);
+
 PHP_MINIT_FUNCTION(mysqli);
 PHP_MSHUTDOWN_FUNCTION(mysqli);
 PHP_RINIT_FUNCTION(mysqli);

Added: php/php-src/branches/PHP_5_2/ext/mysqli/tests/bug50772.phpt
===
--- php/php-src/branches/PHP_5_2/ext/mysqli/tests/bug50772.phpt	(rev 0)
+++ ph

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/standard/tests/general_functions/bug49847.phpt branches/PHP_5_3/ext/standard/tests/general_functions/bug49847.phpt trunk/ext/standard/tests/general_fu

2010-01-25 Thread Pierre Joye
pajoye   Mon, 25 Jan 2010 13:49:47 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293977

Log:
- make it work on win, simplify expect using expectf

Changed paths:
U   
php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49847.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/bug49847.phpt
U   php/php-src/trunk/ext/standard/tests/general_functions/bug49847.phpt

Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49847.phpt
===
--- php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49847.phpt	2010-01-25 13:23:32 UTC (rev 293976)
+++ php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/bug49847.phpt	2010-01-25 13:49:47 UTC (rev 293977)
@@ -2,11 +2,24 @@
 Bug #49847 (exec() fails on lines larger then 4095 bytes)
 --FILE--
 
---EXPECT--
+--EXPECTF--
 array(1) {
   [0]=>
-  string(4098) "

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_2/ext/iconv/ php_iconv.h

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 13:55:41 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293978

Log:
merge r292562: -ws (jani)

Changed paths:
U   php/php-src/branches/PHP_5_3_2/ext/iconv/php_iconv.h

Modified: php/php-src/branches/PHP_5_3_2/ext/iconv/php_iconv.h
===
--- php/php-src/branches/PHP_5_3_2/ext/iconv/php_iconv.h2010-01-25 
13:49:47 UTC (rev 293977)
+++ php/php-src/branches/PHP_5_3_2/ext/iconv/php_iconv.h2010-01-25 
13:55:41 UTC (rev 293978)
@@ -23,15 +23,15 @@
 #define PHP_ICONV_H

 #ifdef PHP_WIN32
-#  ifdef PHP_ICONV_EXPORTS
-#  define PHP_ICONV_API __declspec(dllexport)
-#  else
-#  define PHP_ICONV_API __declspec(dllimport)
-#  endif
+# ifdef PHP_ICONV_EXPORTS
+#  define PHP_ICONV_API __declspec(dllexport)
+# else
+#  define PHP_ICONV_API __declspec(dllimport)
+# endif
 #elif defined(__GNUC__) && __GNUC__ >= 4
-#  define PHP_ICONV_API __attribute__ ((visibility("default")))
+# define PHP_ICONV_API __attribute__ ((visibility("default")))
 #else
-#  define PHP_ICONV_API
+# define PHP_ICONV_API
 #endif

 #ifdef PHP_ATOM_INC
@@ -45,7 +45,6 @@
 #include "ext/iconv/php_php_iconv_h_path.h"
 #endif

-
 #ifdef HAVE_ICONV
 extern zend_module_entry iconv_module_entry;
 #define iconv_module_ptr &iconv_module_entry
@@ -73,9 +72,9 @@
 ZEND_END_MODULE_GLOBALS(iconv)

 #ifdef ZTS
-#define ICONVG(v) TSRMG(iconv_globals_id, zend_iconv_globals *, v)
+# define ICONVG(v) TSRMG(iconv_globals_id, zend_iconv_globals *, v)
 #else
-#define ICONVG(v) (iconv_globals.v)
+# define ICONVG(v) (iconv_globals.v)
 #endif

 #ifdef HAVE_IBM_ICONV
@@ -122,7 +121,6 @@

 #endif /* PHP_ICONV_H */

-
 /*
  * Local variables:
  * tab-width: 4

-- 
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_2/ext/intl/ dateformat/dateformat.c formatter/formatter_main.c grapheme/grapheme_string.c grapheme/grapheme_util.c idn/idn.c intl_error.c intl_error.h loca

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 13:59:35 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293979

Log:
merge r292566: cleanup some code, improve error handling (stas)

Changed paths:
U   php/php-src/branches/PHP_5_3_2/ext/intl/dateformat/dateformat.c
U   php/php-src/branches/PHP_5_3_2/ext/intl/formatter/formatter_main.c
U   php/php-src/branches/PHP_5_3_2/ext/intl/grapheme/grapheme_string.c
U   php/php-src/branches/PHP_5_3_2/ext/intl/grapheme/grapheme_util.c
U   php/php-src/branches/PHP_5_3_2/ext/intl/idn/idn.c
U   php/php-src/branches/PHP_5_3_2/ext/intl/intl_error.c
U   php/php-src/branches/PHP_5_3_2/ext/intl/intl_error.h
U   php/php-src/branches/PHP_5_3_2/ext/intl/locale/locale_methods.c
U   
php/php-src/branches/PHP_5_3_2/ext/intl/normalizer/normalizer_normalize.c
A + php/php-src/branches/PHP_5_3_2/ext/intl/tests/badargs.phpt
(from php/php-src/branches/PHP_5_3/ext/intl/tests/badargs.phpt:r292566)

Modified: php/php-src/branches/PHP_5_3_2/ext/intl/dateformat/dateformat.c
===
--- php/php-src/branches/PHP_5_3_2/ext/intl/dateformat/dateformat.c	2010-01-25 13:55:41 UTC (rev 293978)
+++ php/php-src/branches/PHP_5_3_2/ext/intl/dateformat/dateformat.c	2010-01-25 13:59:35 UTC (rev 293979)
@@ -181,8 +181,7 @@
  */
 PHP_FUNCTION( datefmt_get_error_code )
 {
-	zval*object  = NULL;
-	IntlDateFormatter_object*  dfo = NULL;
+	DATE_FORMAT_METHOD_INIT_VARS;

 	/* Parse parameters. */
 	if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
@@ -208,8 +207,7 @@
 PHP_FUNCTION( datefmt_get_error_message )
 {
 	char*message = NULL;
-	zval*object  = NULL;
-	IntlDateFormatter_object*  dfo = NULL;
+	DATE_FORMAT_METHOD_INIT_VARS;

 	/* Parse parameters. */
 	if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
@@ -224,7 +222,7 @@
 	dfo = (IntlDateFormatter_object *) zend_object_store_get_object( object TSRMLS_CC );

 	/* Return last error message. */
-	message = intl_error_get_message( &dfo->datef_data.error TSRMLS_CC );
+	message = intl_error_get_message( INTL_DATA_ERROR_P(dfo) TSRMLS_CC );
 	RETURN_STRING( message, 0);
 }
 /* }}} */

Modified: php/php-src/branches/PHP_5_3_2/ext/intl/formatter/formatter_main.c
===
--- php/php-src/branches/PHP_5_3_2/ext/intl/formatter/formatter_main.c	2010-01-25 13:55:41 UTC (rev 293978)
+++ php/php-src/branches/PHP_5_3_2/ext/intl/formatter/formatter_main.c	2010-01-25 13:59:35 UTC (rev 293979)
@@ -141,7 +141,7 @@
 	nfo = (NumberFormatter_object *) zend_object_store_get_object( object TSRMLS_CC );

 	/* Return last error message. */
-	message = intl_error_get_message( &INTL_DATA_ERROR(nfo) TSRMLS_CC );
+	message = intl_error_get_message( INTL_DATA_ERROR_P(nfo) TSRMLS_CC );
 	RETURN_STRING( message, 0);
 }
 /* }}} */

Modified: php/php-src/branches/PHP_5_3_2/ext/intl/grapheme/grapheme_string.c
===
--- php/php-src/branches/PHP_5_3_2/ext/intl/grapheme/grapheme_string.c	2010-01-25 13:55:41 UTC (rev 293978)
+++ php/php-src/branches/PHP_5_3_2/ext/intl/grapheme/grapheme_string.c	2010-01-25 13:59:35 UTC (rev 293979)
@@ -83,7 +83,7 @@
 		intl_error_set_code( NULL, status TSRMLS_CC );

 		/* Set error messages. */
-		intl_error_set_custom_msg( NULL, "Error converting input string to UTF-16", 1 TSRMLS_CC );
+		intl_error_set_custom_msg( NULL, "Error converting input string to UTF-16", 0 TSRMLS_CC );
 		efree( ustring );
 		RETURN_NULL();
 	}
@@ -446,7 +446,7 @@
 		intl_error_set_code( NULL, status TSRMLS_CC );

 		/* Set error messages. */
-		intl_error_set_custom_msg( NULL, "Error converting input string to UTF-16", 1 TSRMLS_CC );
+		intl_error_set_custom_msg( NULL, "Error converting input string to UTF-16", 0 TSRMLS_CC );
 		efree( ustr );
 		RETURN_FALSE;
 	}
@@ -507,7 +507,7 @@
 			intl_error_set_code( NULL, status TSRMLS_CC );

 			/* Set error messages. */
-			intl_error_set_custom_msg( NULL, "Error converting output string to UTF-8", 1 TSRMLS_CC );
+			intl_error_set_custom_msg( NULL, "Error converting output string to UTF-8", 0 TSRMLS_CC );

 			efree( sub_str );

@@ -563,7 +563,7 @@
 		intl_error_set_code( NULL, status TSRMLS_CC );

 		/* Set error messages. */
-		intl_error_set_custom_msg( NULL, "Error converting output string to UTF-8", 1 TSRMLS_CC );
+		intl_error_set_custom_msg( NULL, "Error converting output string to UTF-8", 0 TSRMLS_CC );

 		if ( NULL != sub_str )
 			efree( sub_str );
@@ -870,7 +870,7 @@
 		intl_error_set_code( NULL, status TSRMLS_CC );

 		/* Set error messages. */
-		intl_error_set_custom_msg( NULL, "Error converting input string to UTF-16", 1 TSRMLS_CC );
+		intl_error_set_custom_msg( NULL, "Error converting input string to UTF-16", 0 TSRMLS_CC );

 		if ( NULL != ustr )
 			efree(

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_2/Zend/ zend_API.c

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 14:02:09 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293980

Log:
merge r292571 fix flags handling in zend_parse_method_parameters_ex (stas)

Changed paths:
U   php/php-src/branches/PHP_5_3_2/Zend/zend_API.c

Modified: php/php-src/branches/PHP_5_3_2/Zend/zend_API.c
===
--- php/php-src/branches/PHP_5_3_2/Zend/zend_API.c  2010-01-25 13:59:35 UTC 
(rev 293979)
+++ php/php-src/branches/PHP_5_3_2/Zend/zend_API.c  2010-01-25 14:02:09 UTC 
(rev 293980)
@@ -923,7 +923,7 @@
RETURN_IF_ZERO_ARGS(num_args, p, quiet);

va_start(va, type_spec);
-   retval = zend_parse_va_args(num_args, type_spec, &va, 0 
TSRMLS_CC);
+   retval = zend_parse_va_args(num_args, type_spec, &va, flags 
TSRMLS_CC);
va_end(va);
} else {
p++;

-- 
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_2/ ext/ldap/tests/ldap_get_entries_variation.phpt ext/ldap/tests/ldap_mod_del_basic.phpt tests/security/open_basedir_parse_ini_file.phpt

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 14:07:05 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293981

Log:
merge -r292574: - Update tests to reflect current behavior after fix for bug
#50185 (srinatar)

Bug: http://bugs.php.net/50185 (Closed) ldap_get_entries() return false instead 
of an empty array when there is no error
  
Changed paths:
_U  php/php-src/branches/PHP_5_3_2/
U   
php/php-src/branches/PHP_5_3_2/ext/ldap/tests/ldap_get_entries_variation.phpt
U   php/php-src/branches/PHP_5_3_2/ext/ldap/tests/ldap_mod_del_basic.phpt
_U  php/php-src/branches/PHP_5_3_2/ext/tidy/tests/
_U  
php/php-src/branches/PHP_5_3_2/tests/security/open_basedir_parse_ini_file.phpt


Property changes on: php/php-src/branches/PHP_5_3_2
___
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3:292504
/php/php-src/trunk:284726
   + /php/php-src/branches/PHP_5_3:292504,292574
/php/php-src/trunk:284726

Modified: 
php/php-src/branches/PHP_5_3_2/ext/ldap/tests/ldap_get_entries_variation.phpt
===
--- 
php/php-src/branches/PHP_5_3_2/ext/ldap/tests/ldap_get_entries_variation.phpt   
2010-01-25 14:02:09 UTC (rev 293980)
+++ 
php/php-src/branches/PHP_5_3_2/ext/ldap/tests/ldap_get_entries_variation.phpt   
2010-01-25 14:07:05 UTC (rev 293981)
@@ -29,5 +29,8 @@
 remove_dummy_data($link);
 ?>
 --EXPECT--
-NULL
+array(1) {
+  ["count"]=>
+  int(0)
+}
 ===DONE===

Modified: php/php-src/branches/PHP_5_3_2/ext/ldap/tests/ldap_mod_del_basic.phpt
===
--- php/php-src/branches/PHP_5_3_2/ext/ldap/tests/ldap_mod_del_basic.phpt   
2010-01-25 14:02:09 UTC (rev 293980)
+++ php/php-src/branches/PHP_5_3_2/ext/ldap/tests/ldap_mod_del_basic.phpt   
2010-01-25 14:07:05 UTC (rev 293981)
@@ -36,5 +36,8 @@
 ?>
 --EXPECT--
 bool(true)
-NULL
+array(1) {
+  ["count"]=>
+  int(0)
+}
 ===DONE===


Property changes on: php/php-src/branches/PHP_5_3_2/ext/tidy/tests
___
Modified: svn:mergeinfo
   - /php/php-src/trunk/ext/tidy/tests:284726,287798-287941
   + /php/php-src/branches/PHP_5_3/ext/tidy/tests:292562,292566,292571,292574
/php/php-src/trunk/ext/tidy/tests:284726,287798-287941


Property changes on: 
php/php-src/branches/PHP_5_3_2/tests/security/open_basedir_parse_ini_file.phpt
___
Modified: svn:mergeinfo
   - /php/php-src/trunk/tests/security/open_basedir_parse_ini_file.phpt:265951
   + 
/php/php-src/branches/PHP_5_3/tests/security/open_basedir_parse_ini_file.phpt:292562,292566,292571,292574
/php/php-src/trunk/tests/security/open_basedir_parse_ini_file.phpt:265951

-- 
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_2/ ext/standard/array.c

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 14:11:32 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293982

Log:
merge r292594: fix the fix for #47409 (tony2001)

Bug: http://bugs.php.net/47409 (Closed) extract() problem with array containing 
word "this"
  
Changed paths:
_U  php/php-src/branches/PHP_5_3_2/
U   php/php-src/branches/PHP_5_3_2/ext/standard/array.c


Property changes on: php/php-src/branches/PHP_5_3_2
___
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3:292504,292574
/php/php-src/trunk:284726
   + /php/php-src/branches/PHP_5_3:292504,292574,292594
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_3_2/ext/standard/array.c
===
--- php/php-src/branches/PHP_5_3_2/ext/standard/array.c 2010-01-25 14:07:05 UTC 
(rev 293981)
+++ php/php-src/branches/PHP_5_3_2/ext/standard/array.c 2010-01-25 14:11:32 UTC 
(rev 293982)
@@ -1383,7 +1383,7 @@
if (var_exists && var_name_len == 
sizeof("GLOBALS") && !strcmp(var_name, "GLOBALS")) {
break;
}
-   if (var_exists && var_name_len == 
sizeof("this")  && !strcmp(var_name, "this") && EG(scope) && "" != 
EG(scope)->name) {
+   if (var_exists && var_name_len == 
sizeof("this")  && !strcmp(var_name, "this") && EG(scope) && 
EG(scope)->name_length != 0) {
break;
}
ZVAL_STRINGL(&final_name, var_name, 
var_name_len, 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_3/Zend/zend_alloc.c branches/PHP_5_3/Zend/zend_execute.c branches/PHP_5_3/Zend/zend_execute_API.c branches/PHP_5_3/Zend/zend_extensions.c branches/PHP_5_3/m

2010-01-25 Thread Pierre Joye
pajoye   Mon, 25 Jan 2010 14:47:19 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293985

Log:
- Ensure that stderr output are not buffered, portability for tests

Changed paths:
U   php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
U   php/php-src/branches/PHP_5_3/Zend/zend_execute.c
U   php/php-src/branches/PHP_5_3/Zend/zend_execute_API.c
U   php/php-src/branches/PHP_5_3/Zend/zend_extensions.c
U   php/php-src/branches/PHP_5_3/main/output.c
U   php/php-src/trunk/Zend/zend_alloc.c
U   php/php-src/trunk/Zend/zend_execute.c
U   php/php-src/trunk/Zend/zend_execute_API.c
U   php/php-src/trunk/Zend/zend_extensions.c

Modified: php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_alloc.c	2010-01-25 14:46:24 UTC (rev 293984)
+++ php/php-src/branches/PHP_5_3/Zend/zend_alloc.c	2010-01-25 14:47:19 UTC (rev 293985)
@@ -84,6 +84,10 @@
 static void zend_mm_panic(const char *message)
 {
 	fprintf(stderr, "%s\n", message);
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+	fflush(stderr);
+#endif
 #if ZEND_DEBUG && defined(HAVE_KILL) && defined(HAVE_GETPID)
 	kill(getpid(), SIGSEGV);
 #endif
@@ -1031,11 +1035,19 @@

 	if (zend_mm_low_bit(block_size) != zend_mm_high_bit(block_size)) {
 		fprintf(stderr, "'block_size' must be a power of two\n");
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+		fflush(stderr);
+#endif
 		exit(255);
 	}
 	storage = handlers->init(params);
 	if (!storage) {
 		fprintf(stderr, "Cannot initialize zend_mm storage [%s]\n", handlers->name);
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+		fflush(stderr);
+#endif
 		exit(255);
 	}
 	storage->handlers = handlers;
@@ -1118,9 +1130,17 @@
 		if (!mem_handlers[i].name) {
 			fprintf(stderr, "Wrong or unsupported zend_mm storage type '%s'\n", mem_type);
 			fprintf(stderr, "  supported types:\n");
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+			fflush(stderr);
+#endif
 			for (i = 0; mem_handlers[i].name; i++) {
 fprintf(stderr, "'%s'\n", mem_handlers[i].name);
 			}
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+			fflush(stderr);
+#endif
 			exit(255);
 		}
 	}
@@ -1131,9 +1151,17 @@
 		seg_size = zend_atoi(tmp, 0);
 		if (zend_mm_low_bit(seg_size) != zend_mm_high_bit(seg_size)) {
 			fprintf(stderr, "ZEND_MM_SEG_SIZE must be a power of two\n");
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+			fflush(stderr);
+#endif
 			exit(255);
 		} else if (seg_size < ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE) {
 			fprintf(stderr, "ZEND_MM_SEG_SIZE is too small\n");
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+			fflush(stderr);
+#endif
 			exit(255);
 		}
 	} else {
@@ -1672,6 +1700,10 @@
 	size);
 fprintf(stderr, " in %s on line %d\n", error_filename, error_lineno);
 			}
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+			fflush(stderr);
+#endif
 		} zend_end_try();
 	} else {
 		heap->overflow = 2;

Modified: php/php-src/branches/PHP_5_3/Zend/zend_execute.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_execute.c	2010-01-25 14:46:24 UTC (rev 293984)
+++ php/php-src/branches/PHP_5_3/Zend/zend_execute.c	2010-01-25 14:47:19 UTC (rev 293985)
@@ -1232,6 +1232,10 @@
 {
 	if (Z_TYPE_PP(pz) > 9) {
 		fprintf(stderr, "Warning!  %x has invalid type!\n", *pz);
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+		fflush(stderr);
+#endif
 	} else if (Z_TYPE_PP(pz) == IS_ARRAY) {
 		zend_hash_apply(Z_ARRVAL_PP(pz), (apply_func_t) zend_check_symbol TSRMLS_CC);
 	} else if (Z_TYPE_PP(pz) == IS_OBJECT) {

Modified: php/php-src/branches/PHP_5_3/Zend/zend_execute_API.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_execute_API.c	2010-01-25 14:46:24 UTC (rev 293984)
+++ php/php-src/branches/PHP_5_3/Zend/zend_execute_API.c	2010-01-25 14:47:19 UTC (rev 293985)
@@ -74,6 +74,10 @@
 get_active_function_name(TSRMLS_C),
 zend_get_executed_filename(TSRMLS_C),
 zend_get_executed_lineno(TSRMLS_C));
+/* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+		fflush(stderr);
+#endif
 	}
 	if (original_sigsegv_handler!=zend_handle_sigsegv) {
 		original_sigsegv_handler(dummy);

Modified: php/php-src/branches/PHP_5_3/Zend/zend_extensions.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_extensions.c	2010-01-25 14:46:24 UTC (rev 293984)
+++ php/php-src/branches/PHP_5_3/Zend/zend_extensions.c	2010-01-25 14:47:19 UTC (rev 293985)
@@ -35,6 +35,10 @@
 	if (!handle) {
 #ifndef ZEND_WIN32
 		fprintf(stderr, "Failed loading %s:  %s\n", path, DL_ERROR());
+/* See http://support.micro

[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ NEWS

2010-01-25 Thread Derick Rethans
derick   Mon, 25 Jan 2010 15:01:48 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293989

Log:
- Updated to 2010.2.

Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2010-01-25 15:01:39 UTC (rev 293988)
+++ php/php-src/branches/PHP_5_2/NEWS   2010-01-25 15:01:48 UTC (rev 293989)
@@ -1,7 +1,7 @@
 PHPNEWS
 |||
 ?? ??? 2010, PHP 5.2.13
-- Updated timezone database to version 2010.1. (Derick)
+- Updated timezone database to version 2010.2. (Derick)
 - Upgraded bundled PCRE to version 8.01. (Ilia)

 - Removed automatic file descriptor unlocking happening on shutdown and/or

-- 
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_2/ NEWS ext/standard/basic_functions.c ext/standard/streamsfuncs.c ext/standard/streamsfuncs.h ext/standard/tests/streams/stream_resolve_include_path.phpt

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 15:57:24 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293995

Log:
merge r292595: Changed stream_resolve_include_path to use zend_resolve_path
(mkoppanen)

Changed paths:
_U  php/php-src/branches/PHP_5_3_2/
U   php/php-src/branches/PHP_5_3_2/NEWS
U   php/php-src/branches/PHP_5_3_2/ext/standard/basic_functions.c
U   php/php-src/branches/PHP_5_3_2/ext/standard/streamsfuncs.c
U   php/php-src/branches/PHP_5_3_2/ext/standard/streamsfuncs.h
A + 
php/php-src/branches/PHP_5_3_2/ext/standard/tests/streams/stream_resolve_include_path.phpt
(from 
php/php-src/branches/PHP_5_3/ext/standard/tests/streams/stream_resolve_include_path.phpt:r292595)


Property changes on: php/php-src/branches/PHP_5_3_2
___
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3:292504,292574,292594
/php/php-src/trunk:284726
   + /php/php-src/branches/PHP_5_3:292504,292574,292594-292595
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_3_2/NEWS
===
--- php/php-src/branches/PHP_5_3_2/NEWS 2010-01-25 15:53:23 UTC (rev 293994)
+++ php/php-src/branches/PHP_5_3_2/NEWS 2010-01-25 15:57:24 UTC (rev 293995)
@@ -29,6 +29,7 @@
 - Added support for CURLOPT_CERTINFO. FR #49253.
   (Linus Nielsen Feltzing )
 - Added client-side server name indication support in openssl. (Arnaud)
+- Added stream_resolve_include_path() (Mikko)

 - Improved fix for bug #50006 (Segfault caused by uksort()). (Stas)


Modified: php/php-src/branches/PHP_5_3_2/ext/standard/basic_functions.c
===
--- php/php-src/branches/PHP_5_3_2/ext/standard/basic_functions.c   
2010-01-25 15:53:23 UTC (rev 293994)
+++ php/php-src/branches/PHP_5_3_2/ext/standard/basic_functions.c   
2010-01-25 15:57:24 UTC (rev 293995)
@@ -2010,6 +2010,10 @@
 ZEND_BEGIN_ARG_INFO(arginfo_stream_get_wrappers, 0)
 ZEND_END_ARG_INFO()

+ZEND_BEGIN_ARG_INFO(arginfo_stream_resolve_include_path, 0)
+   ZEND_ARG_INFO(0, filename)
+ZEND_END_ARG_INFO()
+
 ZEND_BEGIN_ARG_INFO(arginfo_stream_is_local, 0)
ZEND_ARG_INFO(0, stream)
 ZEND_END_ARG_INFO()
@@ -3115,6 +3119,7 @@
PHP_FE(stream_wrapper_restore,  
arginfo_stream_wrapper_restore)
PHP_FE(stream_get_wrappers, 
arginfo_stream_get_wrappers)
PHP_FE(stream_get_transports,   
arginfo_stream_get_transports)
+   PHP_FE(stream_resolve_include_path, 
arginfo_stream_resolve_include_path)
PHP_FE(stream_is_local, 
arginfo_stream_is_local)
PHP_FE(get_headers, 
arginfo_get_headers)


Modified: php/php-src/branches/PHP_5_3_2/ext/standard/streamsfuncs.c
===
--- php/php-src/branches/PHP_5_3_2/ext/standard/streamsfuncs.c  2010-01-25 
15:53:23 UTC (rev 293994)
+++ php/php-src/branches/PHP_5_3_2/ext/standard/streamsfuncs.c  2010-01-25 
15:57:24 UTC (rev 293995)
@@ -1442,6 +1442,26 @@
 }
 /* }}} */

+/* {{{ proto string stream_resolve_include_path(string filename)
+Determine what file will be opened by calls to fopen() with a relative path */
+PHP_FUNCTION(stream_resolve_include_path)
+{
+   char *filename, *resolved_path;
+   int filename_len;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, 
&filename_len) == FAILURE) {
+   return;
+   }
+
+   resolved_path = zend_resolve_path(filename, filename_len TSRMLS_CC);
+
+   if (resolved_path) {
+   RETURN_STRING(resolved_path, 0);
+   }
+   RETURN_FALSE;
+}
+/* }}} */
+
 /* {{{ proto bool stream_is_local(resource stream|string url) U
 */
 PHP_FUNCTION(stream_is_local)

Modified: php/php-src/branches/PHP_5_3_2/ext/standard/streamsfuncs.h
===
--- php/php-src/branches/PHP_5_3_2/ext/standard/streamsfuncs.h  2010-01-25 
15:53:23 UTC (rev 293994)
+++ php/php-src/branches/PHP_5_3_2/ext/standard/streamsfuncs.h  2010-01-25 
15:57:24 UTC (rev 293995)
@@ -56,6 +56,7 @@
 PHP_FUNCTION(stream_filter_remove);
 PHP_FUNCTION(stream_socket_enable_crypto);
 PHP_FUNCTION(stream_socket_shutdown);
+PHP_FUNCTION(stream_resolve_include_path);
 PHP_FUNCTION(stream_is_local);
 PHP_FUNCTION(stream_supports_lock);


Copied: 
php/php-src/branches/PHP_5_3_2/ext/standard/tests/str

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_2/ NEWS ext/filter/logical_filters.c

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 16:14:28 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293996

Log:
merge r292611: Added missing host validation for HTTP urls inside
FILTER_VALIDATE_URL. (iliaa)

Changed paths:
_U  php/php-src/branches/PHP_5_3_2/
U   php/php-src/branches/PHP_5_3_2/NEWS
U   php/php-src/branches/PHP_5_3_2/ext/filter/logical_filters.c


Property changes on: php/php-src/branches/PHP_5_3_2
___
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3:292504,292574,292594-292595
/php/php-src/trunk:284726
   + /php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_3_2/NEWS
===
--- php/php-src/branches/PHP_5_3_2/NEWS 2010-01-25 15:57:24 UTC (rev 293995)
+++ php/php-src/branches/PHP_5_3_2/NEWS 2010-01-25 16:14:28 UTC (rev 293996)
@@ -1,6 +1,9 @@
 PHPNEWS
 |||
 ?? ??? 20??, PHP 5.3.2 RC 2
+- Added missing host validation for HTTP urls inside FILTER_VALIDATE_URL.
+  (Ilia)
+
 - Fixed bug #47409 (extract() problem with array containing word "this").
   (Ilia, chrisstocktonaz at gmail dot com)


Modified: php/php-src/branches/PHP_5_3_2/ext/filter/logical_filters.c
===
--- php/php-src/branches/PHP_5_3_2/ext/filter/logical_filters.c 2010-01-25 
15:57:24 UTC (rev 293995)
+++ php/php-src/branches/PHP_5_3_2/ext/filter/logical_filters.c 2010-01-25 
16:14:28 UTC (rev 293996)
@@ -456,12 +456,35 @@
RETURN_VALIDATION_FAILED
}

+   if (url->scheme != NULL && (!strcasecmp(url->scheme, "http") || 
!strcasecmp(url->scheme, "https"))) {
+   char *e, *s;
+
+   if (url->host == NULL) {
+   goto bad_url;
+   }
+
+   e = url->host + strlen(url->host);
+   s = url->host;
+
+   while (s < e) {
+   if (!isalnum((int)*(unsigned char *)s) && *s != '_' && 
*s != '.') {
+   goto bad_url;
+   }
+   s++;
+   }
+
+   if (*(e - 1) == '.') {
+   goto bad_url;
+   }
+   }
+
if (
url->scheme == NULL ||
/* some schemas allow the host to be empty */
(url->host == NULL && (strcmp(url->scheme, "mailto") && 
strcmp(url->scheme, "news") && strcmp(url->scheme, "file"))) ||
((flags & FILTER_FLAG_PATH_REQUIRED) && url->path == NULL) || 
((flags & FILTER_FLAG_QUERY_REQUIRED) && url->query == NULL)
) {
+bad_url:
php_url_free(url);
RETURN_VALIDATION_FAILED
}

-- 
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/standard/http_fopen_wrapper.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/http_fopen_wrapper.c trunk/ext/standard/http_f

2010-01-25 Thread Jani Taskinen
jani Mon, 25 Jan 2010 16:28:13 +

Revision: http://svn.php.net/viewvc?view=revision&revision=293998

Log:
- Fixed bug #50832 (HTTP fopen wrapper does not support passwordless HTTP 
authentication)

Bug: http://bugs.php.net/50832 (Assigned) HTTP fopen wrapper does not support 
passwordless HTTP authentication
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/standard/http_fopen_wrapper.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c
U   php/php-src/trunk/ext/standard/http_fopen_wrapper.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2010-01-25 16:21:23 UTC (rev 293997)
+++ php/php-src/branches/PHP_5_2/NEWS   2010-01-25 16:28:13 UTC (rev 293998)
@@ -18,6 +18,8 @@
   gdImageFilledPolygon (libgd #100). (Takeshi Abe)
 - Fixed build of mysqli with MySQL 5.5.0-m2. (Andrey)

+- Fixed bug #50832 (HTTP fopen wrapper does not support passwordless HTTP
+  authentication). (Jani)
 - Fixed bug #50823 (ReflectionFunction::isDeprecated producing "cannot be 
called
   statically" error). (Jani, Felipe)
 - Fixed bug #50791 (Compile failure: Bad logic in defining fopencookie

Modified: php/php-src/branches/PHP_5_2/ext/standard/http_fopen_wrapper.c
===
--- php/php-src/branches/PHP_5_2/ext/standard/http_fopen_wrapper.c  
2010-01-25 16:21:23 UTC (rev 293997)
+++ php/php-src/branches/PHP_5_2/ext/standard/http_fopen_wrapper.c  
2010-01-25 16:28:13 UTC (rev 293998)
@@ -415,16 +415,20 @@
}

/* auth header if it was specified */
-   if (((have_header & HTTP_HEADER_AUTH) == 0) && resource->user && 
resource->pass){
+   if (((have_header & HTTP_HEADER_AUTH) == 0) && resource->user) {
/* decode the strings first */
php_url_decode(resource->user, strlen(resource->user));
-   php_url_decode(resource->pass, strlen(resource->pass));

/* scratch is large enough, since it was made large enough for 
the whole URL */
strcpy(scratch, resource->user);
strcat(scratch, ":");
-   strcat(scratch, resource->pass);

+   /* Note: password is optional! */
+   if (resource->pass) {
+   php_url_decode(resource->pass, strlen(resource->pass));
+   strcat(scratch, resource->pass);
+   }
+
tmp = (char*)php_base64_encode((unsigned char*)scratch, 
strlen(scratch), NULL);

if (snprintf(scratch, scratch_len, "Authorization: Basic 
%s\r\n", tmp) > 0) {
@@ -719,7 +723,7 @@
s++;\
}   \
}   \
-}  \
+}
/* check for control characters in login, password & 
path */
if (strncasecmp(new_path, "http://";, sizeof("http://";) 
- 1) || strncasecmp(new_path, "https://";, sizeof("https://";) - 1)) {
CHECK_FOR_CNTRL_CHARS(resource->user)

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-01-25 16:21:23 UTC (rev 293997)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-01-25 16:28:13 UTC (rev 293998)
@@ -18,6 +18,8 @@
 - Fixed possible crash when a error/warning is raised during php startup.
   (Pierre)

+- Fixed bug #50832 (HTTP fopen wrapper does not support passwordless HTTP
+  authentication). (Jani)
 - Fixed bug #50787 (stream_set_write_buffer() has no effect on socket streams).
   (vnegrier at optilian dot com, Ilia)
 - Fixed bug #50761 (system.multiCall crashes in xmlrpc extension).

Modified: php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c  
2010-01-25 16:21:23 UTC (rev 293997)
+++ php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c  
2010-01-25 16:28:13 UTC (rev 293998)
@@ -416,16 +416,20 @@
}

/* auth header if it was specified */
-   if (((have_header & HTTP_HEADER_AUTH) == 0) && resource->user && 
resource->pass){
+   if (((have_header & HTTP_HEADER_AUTH) == 0) && resource->user) {
/* decode the strings first */
php_url_decode(resource->user, strlen(resource->user));
-   php_url_decode(resource->pass, strlen(resource->pass));

/* scratch is large enough, since it was made large enough for 
the whole URL */
strcpy(scratch, resource->user);
strcat(scratch, ":");
-   strcat(scratch, resource->pass);

+   /* Note: password is optional! */
+  

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_2/ NEWS Zend/zend_variables.c

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 16:46:55 +

Revision: http://svn.php.net/viewvc?view=revision&revision=294000

Log:
merge -r292624: Fixed bug #50519 (segfault in garbage collection when using
set_error_handler and DomDocument (dmitry)

Bug: http://bugs.php.net/50519 (Closed) segfault in garbage collection when 
using set_error_handler and DomDocument
  
Changed paths:
_U  php/php-src/branches/PHP_5_3_2/
U   php/php-src/branches/PHP_5_3_2/NEWS
U   php/php-src/branches/PHP_5_3_2/Zend/zend_variables.c


Property changes on: php/php-src/branches/PHP_5_3_2
___
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611
/php/php-src/trunk:284726
   + /php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_3_2/NEWS
===
--- php/php-src/branches/PHP_5_3_2/NEWS 2010-01-25 16:30:38 UTC (rev 293999)
+++ php/php-src/branches/PHP_5_3_2/NEWS 2010-01-25 16:46:55 UTC (rev 294000)
@@ -46,6 +46,8 @@

 - Fixed bug #50540 (Crash while running ldap_next_reference test cases).
   (Sriram)
+- Fixed bug #50519 (segfault in garbage collection when using set_error_handler
+  and DomDocument). (Dmitry)
 - Fixed bug #50508 (compile failure: Conflicting HEADER type declarations).
   (Jani)
 - Fixed bug #50496 (Use of  is valid only in a c99 compilation

Modified: php/php-src/branches/PHP_5_3_2/Zend/zend_variables.c
===
--- php/php-src/branches/PHP_5_3_2/Zend/zend_variables.c2010-01-25 
16:30:38 UTC (rev 293999)
+++ php/php-src/branches/PHP_5_3_2/Zend/zend_variables.c2010-01-25 
16:46:55 UTC (rev 294000)
@@ -160,6 +160,9 @@

 ZEND_API void _zval_dtor_wrapper(zval *zvalue)
 {
+   TSRMLS_FETCH();
+
+   GC_REMOVE_ZVAL_FROM_BUFFER(zvalue);
zval_dtor(zvalue);
 }


-- 
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_2/ ext/pdo/tests/bug_44861.phpt ext/pdo_pgsql/tests/bug_33876.phpt ext/pdo_pgsql/tests/bug_49985.phpt ext/pgsql/tests/10pg_convert.phpt ext/pgsql/tests/10p

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 17:02:37 +

Revision: http://svn.php.net/viewvc?view=revision&revision=294001

Log:
merge postgresql 8.5 test changes (mbeccati)

-r292630 - Updated pdo_pgsql tests to be 8.5+ friendly
-r292633 - Updated ext/pgsql tests to work w/ PostgreSQL 8.5
-r292634 - Removed spurious high-ascii char from previous commmit

Changed paths:
_U  php/php-src/branches/PHP_5_3_2/
U   php/php-src/branches/PHP_5_3_2/ext/pdo/tests/bug_44861.phpt
U   php/php-src/branches/PHP_5_3_2/ext/pdo_pgsql/tests/bug_33876.phpt
U   php/php-src/branches/PHP_5_3_2/ext/pdo_pgsql/tests/bug_49985.phpt
U   php/php-src/branches/PHP_5_3_2/ext/pgsql/tests/10pg_convert.phpt
A + php/php-src/branches/PHP_5_3_2/ext/pgsql/tests/10pg_convert_85.phpt
(from 
php/php-src/branches/PHP_5_3/ext/pgsql/tests/10pg_convert_85.phpt:r292633)
U   php/php-src/branches/PHP_5_3_2/ext/pgsql/tests/12pg_insert.phpt
A + php/php-src/branches/PHP_5_3_2/ext/pgsql/tests/12pg_insert_85.phpt
(from 
php/php-src/branches/PHP_5_3/ext/pgsql/tests/12pg_insert_85.phpt:r292633)
U   php/php-src/branches/PHP_5_3_2/ext/pgsql/tests/13pg_select.phpt
A + php/php-src/branches/PHP_5_3_2/ext/pgsql/tests/13pg_select_85.phpt
(from 
php/php-src/branches/PHP_5_3/ext/pgsql/tests/13pg_select_85.phpt:r292633)
U   php/php-src/branches/PHP_5_3_2/ext/pgsql/tests/14pg_update.phpt
A + php/php-src/branches/PHP_5_3_2/ext/pgsql/tests/14pg_update_85.phpt
(from 
php/php-src/branches/PHP_5_3/ext/pgsql/tests/14pg_update_85.phpt:r292633)
U   php/php-src/branches/PHP_5_3_2/ext/pgsql/tests/bug37100.phpt
A + php/php-src/branches/PHP_5_3_2/ext/pgsql/tests/bug37100_85.phpt
(from 
php/php-src/branches/PHP_5_3/ext/pgsql/tests/bug37100_85.phpt:r292633)
U   php/php-src/branches/PHP_5_3_2/ext/pgsql/tests/skipif.inc


Property changes on: php/php-src/branches/PHP_5_3_2
___
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624
/php/php-src/trunk:284726
   + /php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292633-292634
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_3_2/ext/pdo/tests/bug_44861.phpt
===
--- php/php-src/branches/PHP_5_3_2/ext/pdo/tests/bug_44861.phpt	2010-01-25 16:46:55 UTC (rev 294000)
+++ php/php-src/branches/PHP_5_3_2/ext/pdo/tests/bug_44861.phpt	2010-01-25 17:02:37 UTC (rev 294001)
@@ -32,7 +32,7 @@
 	$from = '';
 }

-$query = "SELECT 'row1' AS r $from UNION SELECT 'row2' $from UNION SELECT 'row3' $from UNION SELECT 'row4' $from";
+$query = "SELECT 'row1' AS r $from UNION SELECT 'row2' $from UNION SELECT 'row3' $from UNION SELECT 'row4' $from ORDER BY r";
 $aParams = array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL);

 $res = $db->prepare($query, $aParams);

Modified: php/php-src/branches/PHP_5_3_2/ext/pdo_pgsql/tests/bug_33876.phpt
===
--- php/php-src/branches/PHP_5_3_2/ext/pdo_pgsql/tests/bug_33876.phpt	2010-01-25 16:46:55 UTC (rev 294000)
+++ php/php-src/branches/PHP_5_3_2/ext/pdo_pgsql/tests/bug_33876.phpt	2010-01-25 17:02:37 UTC (rev 294001)
@@ -80,10 +80,14 @@

 # Expected to fail; unless told otherwise, PDO assumes string inputs
 # false -> "" as string, which pgsql doesn't like
-if (!$res->execute(array(false)))
-	print_r($res->errorInfo());
-else
+if (!$res->execute(array(false))) {
+	$err = $res->errorInfo();
+	// Strip additional lines ouputted by recent PgSQL versions
+	$err[2] = trim(current(explode("\n", $err[2])));
+	print_r($err);
+} else {
 	print_r($res->fetchAll(PDO::FETCH_ASSOC));
+}




Modified: php/php-src/branches/PHP_5_3_2/ext/pdo_pgsql/tests/bug_49985.phpt
===
--- php/php-src/branches/PHP_5_3_2/ext/pdo_pgsql/tests/bug_49985.phpt	2010-01-25 16:46:55 UTC (rev 294000)
+++ php/php-src/branches/PHP_5_3_2/ext/pdo_pgsql/tests/bug_49985.phpt	2010-01-25 17:02:37 UTC (rev 294001)
@@ -22,7 +22,7 @@
 var_dump($stmt->execute(array(1)));
 $db->commit();
 } catch (Exception $e) {
-echo $e->getMessage()."\n";
+echo trim(current(explode("\n", $e->getMessage(."\n";
 $db->rollback();
 }
 }

Modified: php/php-src/branches/PHP_5_3_2/ext/pgsql/tests/10pg_convert.phpt
===
--- php/php-src/branches/PHP_5_3_2/ext/pgsql/tests/10pg_convert.phpt	2010-01-25 16:46:55 UTC (rev 294000)
+++ php/php-src/branches/PHP_5_3_2/ext/pgsql/tests/10pg_convert.phpt	2010-01-25 17:02:37 UTC (rev 294001)
@@ -1,7 +1,10 @@
 --TEST--
 PostgreSQL pg_convert()
 --SKIPIF--
-
+=');
+?>
 --FILE--
 
+--FILE--
+'1234', 'str'=>'AAA', 'bin'=>'BBB');
+$converted = pg_convert($db, $table_name, $fields);
+
+var_dump($converted);
+?>
+-

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_2/ NEWS main/streams/plain_wrapper.c

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 17:15:41 +

Revision: http://svn.php.net/viewvc?view=revision&revision=294003

Log:
merge r292632: remove automatic file unlocking on shutdown and/or stream close
(tony2001)

Changed paths:
_U  php/php-src/branches/PHP_5_3_2/
U   php/php-src/branches/PHP_5_3_2/NEWS
U   php/php-src/branches/PHP_5_3_2/main/streams/plain_wrapper.c


Property changes on: php/php-src/branches/PHP_5_3_2
___
Modified: svn:mergeinfo
   - 
/php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292633-292634
/php/php-src/trunk:284726
   + 
/php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292634
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_3_2/NEWS
===
--- php/php-src/branches/PHP_5_3_2/NEWS 2010-01-25 17:14:58 UTC (rev 294002)
+++ php/php-src/branches/PHP_5_3_2/NEWS 2010-01-25 17:15:41 UTC (rev 294003)
@@ -17,6 +17,9 @@
 - Changed "post_max_size" php.ini directive to allow unlimited post size by
   setting it to 0. (Rasmus)

+- Removed automatic file descriptor unlocking happening on shutdown and/or
+  stream close (on all OSes). (Tony, Ilia)
+
 - Added INTERNALDATE support to imap_append. (nick at mailtrust dot com)
 - Added support for SHA-256 and SHA-512 to php's crypt. (Pierre)
 - Added realpath_cache_size() and realpath_cache_get() functions. (Stas)

Modified: php/php-src/branches/PHP_5_3_2/main/streams/plain_wrapper.c
===
--- php/php-src/branches/PHP_5_3_2/main/streams/plain_wrapper.c 2010-01-25 
17:14:58 UTC (rev 294002)
+++ php/php-src/branches/PHP_5_3_2/main/streams/plain_wrapper.c 2010-01-25 
17:15:41 UTC (rev 294003)
@@ -387,9 +387,6 @@
 #endif

if (close_handle) {
-   if (data->lock_flag != LOCK_UN) {
-   php_stream_lock(stream, LOCK_UN);
-   }
if (data->file) {
if (data->is_process_pipe) {
errno = 0;

-- 
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_2/ NEWS ext/tidy/php_tidy.h ext/tidy/tests/023.phpt ext/tidy/tests/025.phpt ext/tidy/tests/035.phpt ext/tidy/tidy.c

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 17:29:37 +

Revision: http://svn.php.net/viewvc?view=revision&revision=294004

Log:
Merge tidynode changes: (pierrick)

r292635 - Changed tidyNode class to disallow manual node creation.
r292719 - Set the tidyNode constructor private
r292765 - Add a test for tidyNode::__construct()

Changed paths:
_U  php/php-src/branches/PHP_5_3_2/
U   php/php-src/branches/PHP_5_3_2/NEWS
U   php/php-src/branches/PHP_5_3_2/ext/tidy/php_tidy.h
_U  php/php-src/branches/PHP_5_3_2/ext/tidy/tests/
U   php/php-src/branches/PHP_5_3_2/ext/tidy/tests/023.phpt
U   php/php-src/branches/PHP_5_3_2/ext/tidy/tests/025.phpt
A + php/php-src/branches/PHP_5_3_2/ext/tidy/tests/035.phpt
(from php/php-src/branches/PHP_5_3/ext/tidy/tests/035.phpt:r292765)
U   php/php-src/branches/PHP_5_3_2/ext/tidy/tidy.c


Property changes on: php/php-src/branches/PHP_5_3_2
___
Modified: svn:mergeinfo
   - 
/php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292634
/php/php-src/trunk:284726
   + 
/php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292719,292765
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_3_2/NEWS
===
--- php/php-src/branches/PHP_5_3_2/NEWS 2010-01-25 17:15:41 UTC (rev 294003)
+++ php/php-src/branches/PHP_5_3_2/NEWS 2010-01-25 17:29:37 UTC (rev 294004)
@@ -16,6 +16,7 @@
   (David Soria Parra)
 - Changed "post_max_size" php.ini directive to allow unlimited post size by
   setting it to 0. (Rasmus)
+- Changed tidyNode class to disallow manual node creation. (Pierrick)

 - Removed automatic file descriptor unlocking happening on shutdown and/or
   stream close (on all OSes). (Tony, Ilia)

Modified: php/php-src/branches/PHP_5_3_2/ext/tidy/php_tidy.h
===
--- php/php-src/branches/PHP_5_3_2/ext/tidy/php_tidy.h  2010-01-25 17:15:41 UTC 
(rev 294003)
+++ php/php-src/branches/PHP_5_3_2/ext/tidy/php_tidy.h  2010-01-25 17:29:37 UTC 
(rev 294004)
@@ -28,6 +28,7 @@
ZEND_NAMED_FE(name, ZEND_FN(func_name), arg_types)
 #define TIDY_NODE_METHOD(name)PHP_FUNCTION(tnm_ ##name)
 #define TIDY_NODE_ME(name, param) TIDY_METHOD_MAP(name, tnm_ ##name, param)
+#define TIDY_NODE_PRIVATE_ME(name, param) ZEND_NAMED_ME(name, ZEND_FN(tnm_ 
##name), param, ZEND_ACC_PRIVATE)
 #define TIDY_DOC_METHOD(name) PHP_FUNCTION(tdm_ ##name)
 #define TIDY_DOC_ME(name, param)  TIDY_METHOD_MAP(name, tdm_ ##name, param)
 #define TIDY_ATTR_METHOD(name)PHP_FUNCTION(tam_ ##name)


Property changes on: php/php-src/branches/PHP_5_3_2/ext/tidy/tests
___
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3/ext/tidy/tests:292562,292566,292571,292574
/php/php-src/trunk/ext/tidy/tests:284726,287798-287941
   + 
/php/php-src/branches/PHP_5_3/ext/tidy/tests:292562,292566,292571,292574,292635,292719,292765
/php/php-src/trunk/ext/tidy/tests:284726,287798-287941

Modified: php/php-src/branches/PHP_5_3_2/ext/tidy/tests/023.phpt
===
--- php/php-src/branches/PHP_5_3_2/ext/tidy/tests/023.phpt  2010-01-25 
17:15:41 UTC (rev 294003)
+++ php/php-src/branches/PHP_5_3_2/ext/tidy/tests/023.phpt  2010-01-25 
17:29:37 UTC (rev 294004)
@@ -6,16 +6,11 @@
 isHtml());
-
 $tidy = new tidy();
 $tidy->parseString('');

@@ -30,8 +25,6 @@

 ?>
 --EXPECT--
-object(tidyNode)#1 (0) {
-}
 object(tidy)#1 (2) {
   ["errorBuffer"]=>
   NULL
@@ -39,7 +32,6 @@
   NULL
 }
 ---
-bool(false)
 bool(true)
 bool(true)
 bool(false)

Modified: php/php-src/branches/PHP_5_3_2/ext/tidy/tests/025.phpt
===
--- php/php-src/branches/PHP_5_3_2/ext/tidy/tests/025.phpt  2010-01-25 
17:15:41 UTC (rev 294003)
+++ php/php-src/branches/PHP_5_3_2/ext/tidy/tests/025.phpt  2010-01-25 
17:29:37 UTC (rev 294004)
@@ -5,15 +5,6 @@
 --FILE--
 isPhp());
-var_dump($node->isText());
-var_dump($node->isComment());
-var_dump($node->hasSiblings());
-var_dump((string)$node);
-
 $tidy=tidy_parse_string('<% %>');
 var_dump($tidy->Root()->child[0]->isAsp());

@@ -34,11 +25,6 @@

 ?>
 --EXPECT--
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-string(0) ""
 bool(true)
 bool(true)
 bool(true)

Copied: php/php-src/branches/PHP_5_3_2/ext/tidy/tests/035.phpt (from rev 
292765, php/php-src/branches/PHP_5_3/ext/tidy/tests/035.phpt)
===
--- php/php-src/branches/PHP_5_3_2/ext/tidy/tests/035.phpt  
(rev 0)
+++ php/php-src/branches/PHP_5_3_2/ext/tidy/tests/035.phpt  2010-01-25 
17:29:37 UTC (rev 294004)
@@ -0,0 +1,12 @@
+--TEST--
+tidyNode::__construct()
+--SKIPIF--
+
+--FI

[PHP-CVS] svn: /SVNROOT/ global_avail

2010-01-25 Thread Philip Olson
philip   Mon, 25 Jan 2010 22:16:16 +

Revision: http://svn.php.net/viewvc?view=revision&revision=294017

Log:
- phpdoc/es karma for Jesus Ruiz Garcia (jesusruiz)

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2010-01-25 21:50:15 UTC (rev 294016)
+++ SVNROOT/global_avail2010-01-25 22:16:16 UTC (rev 294017)
@@ -71,7 +71,7 @@
 avail|mkoula|phpdoc/cs
 avail|penguin,tkxs|phpdoc/da
 avail|kore,thorstenr,lapistano|phpdoc/de
-avail|mgonzalezle,ianasa,gustavo,soywiz,ladderalice,ideados,fcaroberga,dulasoft,benjamin,argosback,tatai|phpdoc/es
+avail|mgonzalezle,ianasa,gustavo,soywiz,ladderalice,ideados,fcaroberga,dulasoft,benjamin,argosback,tatai,jesusruiz|phpdoc/es
 avail|parstic|phpdoc/fa
 avail|magidev,mikaelkael,jpauli|phpdoc/fr
 avail|xdanger,jiania,haohappy|phpdoc/zh,phpdoc/hk,phpdoc/tw

-- 
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_2/ NEWS ext/fileinfo/libmagic/apprentice.c ext/fileinfo/libmagic/apptype.c ext/fileinfo/libmagic/ascmagic.c ext/fileinfo/libmagic/cdf.c ext/fileinfo/libmag

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 22:43:29 +

Revision: http://svn.php.net/viewvc?view=revision&revision=294021

Log:
Merge libmagic update

r292654 - Upgrade bundled libmagic to 5.03 (fixes CDF parsing related issues)
  (mkoppanen)
r292682 - spprintf the dbname (mkoppanen)
r292693 - Fixed ZTS build (felipe)

Changed paths:
_U  php/php-src/branches/PHP_5_3_2/
U   php/php-src/branches/PHP_5_3_2/NEWS
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/apprentice.c
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/apptype.c
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/ascmagic.c
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/cdf.c
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/cdf_time.c
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/compress.c
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/file.h
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/fsmagic.c
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/funcs.c
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/is_tar.c
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/magic.c
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/magic.h
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/patchlevel.h
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/print.c
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/readcdf.c
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/readelf.c
U   php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/softmagic.c


Property changes on: php/php-src/branches/PHP_5_3_2
___
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292719,292765
/php/php-src/trunk:284726
   + /php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292682,292693,292719,292765
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_3_2/NEWS
===
--- php/php-src/branches/PHP_5_3_2/NEWS	2010-01-25 22:26:54 UTC (rev 294020)
+++ php/php-src/branches/PHP_5_3_2/NEWS	2010-01-25 22:43:29 UTC (rev 294021)
@@ -1,8 +1,11 @@
 PHPNEWS
 |||
 ?? ??? 20??, PHP 5.3.2 RC 2
+- Upgraded bundled libmagic to version 5.03. (Mikko)
+
 - Added missing host validation for HTTP urls inside FILTER_VALIDATE_URL.
   (Ilia)
+- Added stream_resolve_include_path(). (Mikko)

 - Fixed bug #47409 (extract() problem with array containing word "this").
   (Ilia, chrisstocktonaz at gmail dot com)
@@ -36,7 +39,6 @@
 - Added support for CURLOPT_CERTINFO. FR #49253.
   (Linus Nielsen Feltzing )
 - Added client-side server name indication support in openssl. (Arnaud)
-- Added stream_resolve_include_path() (Mikko)

 - Improved fix for bug #50006 (Segfault caused by uksort()). (Stas)


Modified: php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/apprentice.c
===
--- php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/apprentice.c	2010-01-25 22:26:54 UTC (rev 294020)
+++ php/php-src/branches/PHP_5_3_2/ext/fileinfo/libmagic/apprentice.c	2010-01-25 22:43:29 UTC (rev 294021)
@@ -34,7 +34,7 @@
 #include "file.h"

 #ifndef	lint
-FILE_RCSID("@(#)$File: apprentice.c,v 1.132 2008/03/28 18:19:30 christos Exp $")
+FILE_RCSID("@(#)$File: apprentice.c,v 1.151 2009/03/18 15:19:23 christos Exp $")
 #endif	/* lint */

 #include "magic.h"
@@ -44,7 +44,7 @@
 #ifdef PHP_WIN32
 #include "win32/unistd.h"
 #if _MSC_VER <= 1300
-#include "win32/php_strtoi64.h"
+# include "win32/php_strtoi64.h"
 #endif
 #define strtoull _strtoui64
 #else
@@ -55,8 +55,10 @@
 #include 
 #include 
 #include 
+#ifndef PHP_WIN32
+#include 
+#endif

-
 #define	EATAB {while (isascii((unsigned char) *l) && \
 		  isspace((unsigned char) *l))  ++l;}
 #define LOWCASE(l) (isupper((unsigned char) (l)) ? \
@@ -609,7 +611,11 @@
 	} else {

 		/* read and parse this file */
+#if (PHP_MAJOR_VERSION < 6)
 		for (ms->line = 1; (line = php_stream_get_line(stream, buffer , BUFSIZ, &line_len)) != NULL; ms->line++) {
+#else
+		for (ms->line = 1; (line = php_stream_get_line(stream, ZSTR(buffer), BUFSIZ, &line_len)) != NULL; ms->line++) {
+#endif
 			if (line_len == 0) /* null line, garbage, etc */
 continue;

@@ -851,9 +857,9 @@
 		case FILE_INDIRECT:
 			break;
 		default:
-			if (ms->flags & MAGIC_CHECK) {
-			file_magwarn(ms, "cannot happen: m->type=%d\n", m->type);
-			}
+			if (ms->flags & MAGIC_CHECK)
+			file_magwarn(ms, "cannot happen: m->type=%d\n",
+m->type);
 			return ~0U;
 		}
 	}
@@ -1669,7 +1675,7 @@
 		 */
 		file_magwarn(ms, "Printf format 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ Makefile.gcov

2010-01-25 Thread Nuno Lopes
nlopess  Mon, 25 Jan 2010 22:44:07 +

Revision: http://svn.php.net/viewvc?view=revision&revision=294022

Log:
Daniel Convissor wants to test ext/date/lib, so enable code coverage data for 
him

Changed paths:
U   php/php-src/branches/PHP_5_3/Makefile.gcov

Modified: php/php-src/branches/PHP_5_3/Makefile.gcov
===
--- php/php-src/branches/PHP_5_3/Makefile.gcov  2010-01-25 22:43:29 UTC (rev 
294021)
+++ php/php-src/branches/PHP_5_3/Makefile.gcov  2010-01-25 22:44:07 UTC (rev 
294022)
@@ -61,7 +61,7 @@
test -f "$$x.bb"   && cp $$x.bb   lcov_data/$$y.bb ; \
test -f "$$x.bbg"  && cp $$x.bbg  lcov_data/$$y.bbg ; \
done
-   for dir in ext/bcmath/libbcmath ext/date/lib ext/fileinfo/libmagic 
ext/gd/libgd ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib 
ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite 
ext/xmlrpc/libxmlrpc ext/zip/lib; do \
+   for dir in ext/bcmath/libbcmath ext/fileinfo/libmagic ext/gd/libgd 
ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib 
ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite 
ext/xmlrpc/libxmlrpc ext/zip/lib; do \
test -d lcov_data/$$dir && rm -rf lcov_data/$$dir ; \
done
@echo

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ Makefile.gcov

2010-01-25 Thread Nuno Lopes
nlopess  Mon, 25 Jan 2010 22:51:52 +

Revision: http://svn.php.net/viewvc?view=revision&revision=294023

Log:
merge r294022. 5.2 branch doesnt need it

Changed paths:
U   php/php-src/trunk/Makefile.gcov

Modified: php/php-src/trunk/Makefile.gcov
===
--- php/php-src/trunk/Makefile.gcov 2010-01-25 22:44:07 UTC (rev 294022)
+++ php/php-src/trunk/Makefile.gcov 2010-01-25 22:51:52 UTC (rev 294023)
@@ -61,7 +61,7 @@
test -f "$$x.bb"   && cp $$x.bb   lcov_data/$$y.bb ; \
test -f "$$x.bbg"  && cp $$x.bbg  lcov_data/$$y.bbg ; \
done
-   for dir in ext/bcmath/libbcmath ext/date/lib ext/fileinfo/libmagic 
ext/gd/libgd ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib 
ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite 
ext/xmlrpc/libxmlrpc ext/zip/lib; do \
+   for dir in ext/bcmath/libbcmath ext/fileinfo/libmagic ext/gd/libgd 
ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib 
ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite 
ext/xmlrpc/libxmlrpc ext/zip/lib; do \
test -d lcov_data/$$dir && rm -rf lcov_data/$$dir ; \
done
@echo

-- 
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_2/ ext/session/mod_files.c

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 23:06:09 +

Revision: http://svn.php.net/viewvc?view=revision&revision=294027

Log:
merge r292677: Along with the valid char set, also add a length check to the
session id here to avoid a lower-level error on the open()
later on in case we exceed MAX_PATH.  The lower level open()
error includes the session dir path in it, so this is a very
low-priority security fix.  People should not be running
production systems with display_errors turned on. (rasmus)

Changed paths:
_U  php/php-src/branches/PHP_5_3_2/
U   php/php-src/branches/PHP_5_3_2/ext/session/mod_files.c


Property changes on: php/php-src/branches/PHP_5_3_2
___
Modified: svn:mergeinfo
   - 
/php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292682,292693,292719,292765
/php/php-src/trunk:284726
   + 
/php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292677,292682,292693,292719,292765
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_3_2/ext/session/mod_files.c
===
--- php/php-src/branches/PHP_5_3_2/ext/session/mod_files.c  2010-01-25 
22:59:10 UTC (rev 294026)
+++ php/php-src/branches/PHP_5_3_2/ext/session/mod_files.c  2010-01-25 
23:06:09 UTC (rev 294027)
@@ -87,7 +87,9 @@

len = p - key;

-   if (len == 0) {
+   /* Somewhat arbitrary length limit here, but should be way more than
+  anyone needs and avoids file-level warnings later on if we exceed 
MAX_PATH */
+   if (len == 0 || len > 128) {
ret = 0;
}

@@ -154,7 +156,7 @@
ps_files_close(data);

if (!ps_files_valid_key(key)) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "The 
session id contains illegal characters, valid characters are a-z, A-Z, 0-9 and 
'-,'");
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "The 
session id is too long or contains illegal characters, valid characters are 
a-z, A-Z, 0-9 and '-,'");
PS(invalid_session_id) = 1;
return;
}

-- 
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_2/ ext/sockets/config.m4 ext/sockets/php_sockets.h ext/sockets/sockets.c

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 23:12:42 +

Revision: http://svn.php.net/viewvc?view=revision&revision=294029

Log:
Merge -r292683 Share the php_sockets.h header (mkoppanen)

Changed paths:
_U  php/php-src/branches/PHP_5_3_2/
U   php/php-src/branches/PHP_5_3_2/ext/sockets/config.m4
U   php/php-src/branches/PHP_5_3_2/ext/sockets/php_sockets.h
U   php/php-src/branches/PHP_5_3_2/ext/sockets/sockets.c


Property changes on: php/php-src/branches/PHP_5_3_2
___
Modified: svn:mergeinfo
   - 
/php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292677,292682,292693,292719,292765
/php/php-src/trunk:284726
   + 
/php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292677,292682-292683,292693,292719,292765
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_3_2/ext/sockets/config.m4
===
--- php/php-src/branches/PHP_5_3_2/ext/sockets/config.m42010-01-25 
23:09:11 UTC (rev 294028)
+++ php/php-src/branches/PHP_5_3_2/ext/sockets/config.m42010-01-25 
23:12:42 UTC (rev 294029)
@@ -29,4 +29,5 @@
   AC_DEFINE([HAVE_SOCKETS], 1, [ ])

   PHP_NEW_EXTENSION([sockets], [sockets.c], [$ext_shared])
+  PHP_INSTALL_HEADERS([ext/sockets/], [php_sockets.h])
 fi

Modified: php/php-src/branches/PHP_5_3_2/ext/sockets/php_sockets.h
===
--- php/php-src/branches/PHP_5_3_2/ext/sockets/php_sockets.h2010-01-25 
23:09:11 UTC (rev 294028)
+++ php/php-src/branches/PHP_5_3_2/ext/sockets/php_sockets.h2010-01-25 
23:12:42 UTC (rev 294029)
@@ -95,6 +95,8 @@

 PHP_SOCKETS_API int php_sockets_le_socket(void);

+#define php_sockets_le_socket_name "Socket"
+
 /* Prototypes */
 #ifdef ilia_0 /* not needed, only causes a compiler warning */
 static int php_open_listen_sock(php_socket **php_sock, int port, int backlog 
TSRMLS_DC);

Modified: php/php-src/branches/PHP_5_3_2/ext/sockets/sockets.c
===
--- php/php-src/branches/PHP_5_3_2/ext/sockets/sockets.c2010-01-25 
23:09:11 UTC (rev 294028)
+++ php/php-src/branches/PHP_5_3_2/ext/sockets/sockets.c2010-01-25 
23:12:42 UTC (rev 294029)
@@ -110,7 +110,7 @@
php_error_docref(NULL 
TSRMLS_CC, E_WARNING, "%s [%d]: %s", msg, errn, php_strerror(errn TSRMLS_CC))

 static int le_socket;
-#define le_socket_name "Socket"
+#define le_socket_name php_sockets_le_socket_name

 /* {{{ arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_select, 0, 0, 4)

-- 
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_2/ NEWS main/rfc1867.c

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 23:26:15 +

Revision: http://svn.php.net/viewvc?view=revision&revision=294031

Log:
Merge rfc1867.c changes

r292762 - Fixed bug #48190 (Content-type parameter "boundary" is not case-
   insensitive in HTTP uploads). (iliaa)
r292771 - WS + CS + folding tags (jani)
r292777 - Sync with HEAD (jani)

Bug: http://bugs.php.net/48190 (Closed) Content-type parameter "boundary" is 
not case-insensitive in HTTP uploads
  
Changed paths:
_U  php/php-src/branches/PHP_5_3_2/
U   php/php-src/branches/PHP_5_3_2/NEWS
U   php/php-src/branches/PHP_5_3_2/main/rfc1867.c


Property changes on: php/php-src/branches/PHP_5_3_2
___
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292677,292682-292683,292693,292719,292765
/php/php-src/trunk:284726
   + /php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292677,292682-292683,292693,292719,292762,292765,292771,292777
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_3_2/NEWS
===
--- php/php-src/branches/PHP_5_3_2/NEWS	2010-01-25 23:17:52 UTC (rev 294030)
+++ php/php-src/branches/PHP_5_3_2/NEWS	2010-01-25 23:26:15 UTC (rev 294031)
@@ -7,6 +7,8 @@
   (Ilia)
 - Added stream_resolve_include_path(). (Mikko)

+- Fixed bug #48190 (Content-type parameter "boundary" is not case-insensitive
+  in HTTP uploads). (Ilia)
 - Fixed bug #47409 (extract() problem with array containing word "this").
   (Ilia, chrisstocktonaz at gmail dot com)


Modified: php/php-src/branches/PHP_5_3_2/main/rfc1867.c
===
--- php/php-src/branches/PHP_5_3_2/main/rfc1867.c	2010-01-25 23:17:52 UTC (rev 294030)
+++ php/php-src/branches/PHP_5_3_2/main/rfc1867.c	2010-01-25 23:26:15 UTC (rev 294031)
@@ -13,7 +13,7 @@
| lice...@php.net so we can mail you a copy immediately.   |
+--+
| Authors: Rasmus Lerdorf  |
-   |  Jani Taskinen   |
+   |  Jani Taskinen |
+--+
  */

@@ -23,7 +23,7 @@
  *  This product includes software developed by the Apache Group
  *  for use in the Apache HTTP server project (http://www.apache.org/).
  *
- */
+ */

 #include 
 #include "php.h"
@@ -32,6 +32,7 @@
 #include "php_globals.h"
 #include "php_variables.h"
 #include "rfc1867.h"
+#include "ext/standard/php_string.h"

 #define DEBUG_FILE_UPLOAD ZEND_DEBUG

@@ -43,7 +44,7 @@
 static void safe_php_register_variable(char *var, char *strval, int val_len, zval *track_vars_array, zend_bool override_protection TSRMLS_DC);

 #define SAFE_RETURN { \
-php_mb_flush_gpc_variables(num_vars, val_list, len_list, array_ptr TSRMLS_CC); \
+	php_mb_flush_gpc_variables(num_vars, val_list, len_list, array_ptr TSRMLS_CC); \
 	if (lbuf) efree(lbuf); \
 	if (abuf) efree(abuf); \
 	if (array_index) efree(array_index); \
@@ -55,7 +56,7 @@
 	if (mbuff) efree(mbuff); \
 	return; }

-void php_mb_flush_gpc_variables(int num_vars, char **val_list, int *len_list, zval *array_ptr  TSRMLS_DC)
+void php_mb_flush_gpc_variables(int num_vars, char **val_list, int *len_list, zval *array_ptr  TSRMLS_DC) /* {{{ */
 {
 	int i;
 	if (php_mb_encoding_translation(TSRMLS_C)) {
@@ -63,17 +64,18 @@
 			php_mb_gpc_encoding_detector(val_list, len_list, num_vars, NULL TSRMLS_CC) == SUCCESS) {
 			php_mb_gpc_encoding_converter(val_list, len_list, num_vars, NULL, NULL TSRMLS_CC);
 		}
-		for (i=0; i=*num_vars_max){
-		php_mb_gpc_realloc_buffer(pval_list, plen_list, num_vars_max,
-  16 TSRMLS_CC);
+	if (*num_vars >= *num_vars_max) {
+		php_mb_gpc_realloc_buffer(pval_list, plen_list, num_vars_max, 16 TSRMLS_CC);
 		/* in case realloc relocated the buffer */
 		val_list = *pval_list;
 		len_list = *plen_list;
@@ -104,6 +106,7 @@
 	len_list[*num_vars] = strlen(value);
 	(*num_vars)++;
 }
+/* }}} */

 #else

@@ -136,7 +139,7 @@
 #define UPLOAD_ERROR_F7  /* Failed to write file to disk */
 #define UPLOAD_ERROR_X8  /* File upload stopped by extension */

-void php_rfc1867_register_constants(TSRMLS_D)
+void php_rfc1867_register_constants(TSRMLS_D) /* {{{ */
 {
 	REGISTER_MAIN_LONG_CONSTANT("UPLOAD_ERR_OK", UPLOAD_ERROR_OK, CONST_CS | CONST_PERSISTENT);
 	REGISTER_MAIN_LONG_CONSTANT("UPLOAD_ERR_INI_SIZE",   UPLOAD_ERROR_A,  CONST_CS | CONST_PERSISTENT);
@@ -147,26 +150,27 @@
 	REGISTER_MAIN_LONG_CONSTANT("UPLOAD_ERR_CANT_WRITE", UPLOAD_ERROR_F,  CONST_CS | CONST_PERSISTENT);
 	REGISTER_MAIN_LONG_CONSTANT("UPLOAD_ERR_EXTENSION",  UPLOAD_ERROR_X,  CONST_CS | CONST_PERSISTENT);
 }
+/* }}} */

-static void normalize_pro

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_2/ NEWS Zend/tests/bug44827.phpt Zend/zend_builtin_functions.c

2010-01-25 Thread Johannes Schlüter
johannes Mon, 25 Jan 2010 23:41:18 +

Revision: http://svn.php.net/viewvc?view=revision&revision=294034

Log:
merge r292823 Fixed bug #44827 (define() allows :: in constant names). (iliaa)
and r293974 Added test case for bug #44827 (iliaa)

Bug: http://bugs.php.net/44827 (Closed) define('::') can be defined
  
Changed paths:
_U  php/php-src/branches/PHP_5_3_2/
U   php/php-src/branches/PHP_5_3_2/NEWS
A + php/php-src/branches/PHP_5_3_2/Zend/tests/bug44827.phpt
(from php/php-src/branches/PHP_5_3/Zend/tests/bug44827.phpt:r293974)
U   php/php-src/branches/PHP_5_3_2/Zend/zend_builtin_functions.c


Property changes on: php/php-src/branches/PHP_5_3_2
___
Modified: svn:mergeinfo
   - 
/php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292677,292682-292683,292693,292719,292762,292765,292771,292777
/php/php-src/trunk:284726
   + 
/php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292677,292682-292683,292693,292719,292762,292765,292771,292777,292823,293974
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_3_2/NEWS
===
--- php/php-src/branches/PHP_5_3_2/NEWS 2010-01-25 23:36:07 UTC (rev 294033)
+++ php/php-src/branches/PHP_5_3_2/NEWS 2010-01-25 23:41:18 UTC (rev 294034)
@@ -11,6 +11,7 @@
   in HTTP uploads). (Ilia)
 - Fixed bug #47409 (extract() problem with array containing word "this").
   (Ilia, chrisstocktonaz at gmail dot com)
+- Fixed bug #44827 (define() allows :: in constant names). (Ilia)


 22 Dec 2009, PHP 5.3.2 RC 1

Copied: php/php-src/branches/PHP_5_3_2/Zend/tests/bug44827.phpt (from rev 
293974, php/php-src/branches/PHP_5_3/Zend/tests/bug44827.phpt)
===
--- php/php-src/branches/PHP_5_3_2/Zend/tests/bug44827.phpt 
(rev 0)
+++ php/php-src/branches/PHP_5_3_2/Zend/tests/bug44827.phpt 2010-01-25 
23:41:18 UTC (rev 294034)
@@ -0,0 +1,11 @@
+--TEST--
+Bug #44827 (define() allows :: in constant names)
+--FILE--
+
+--EXPECTF--
+Warning: Class constants cannot be defined or redefined in %sbug44827.php on 
line %d
+
+Warning: Class constants cannot be defined or redefined in %sbug44827.php on 
line %d

Modified: php/php-src/branches/PHP_5_3_2/Zend/zend_builtin_functions.c
===
--- php/php-src/branches/PHP_5_3_2/Zend/zend_builtin_functions.c
2010-01-25 23:36:07 UTC (rev 294033)
+++ php/php-src/branches/PHP_5_3_2/Zend/zend_builtin_functions.c
2010-01-25 23:41:18 UTC (rev 294034)
@@ -629,7 +629,6 @@
zend_bool non_cs = 0;
int case_sensitive = CONST_CS;
zend_constant c;
-   char *p;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|b", &name, 
&name_len, &val, &non_cs) == FAILURE) {
return;
@@ -640,31 +639,9 @@
}

/* class constant, check if there is name and make sure class is valid 
& exists */
-   if ((p = zend_memnstr(name, "::", sizeof("::") - 1, name + name_len))) {
-   char *class_name;
-   int found;
-   zend_class_entry **ce;
-   ALLOCA_FLAG(use_heap)
-
-   if (p == (name + name_len - sizeof("::") + 1)) {
-   zend_error(E_WARNING, "Class constant must have a 
name");
-   RETURN_FALSE;
-   } else if (p == name) {
-   zend_error(E_WARNING, "Missing class name");
-   RETURN_FALSE;
-   }
-
-   class_name = do_alloca((p - name + 1), use_heap);
-   zend_str_tolower_copy(class_name, name, (p - name));
-
-   found = zend_hash_find(EG(class_table), class_name, p - name + 
1, (void **) &ce);
-
-   if (found != SUCCESS) {
-   zend_error(E_WARNING, "Class '%s' does not exist", 
class_name);
-   free_alloca(class_name, use_heap);
-   RETURN_FALSE;
-   }
-   free_alloca(class_name, use_heap);
+   if (zend_memnstr(name, "::", sizeof("::") - 1, name + name_len)) {
+   zend_error(E_WARNING, "Class constants cannot be defined or 
redefined");
+   RETURN_FALSE;
}

 repeat:

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php