[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/reflection/php_reflection.c branches/PHP_5_3/ext/reflection/tests/bug60367.phpt branches/PHP_5_4/NEWS branches/PHP_5_4/ext/refle

2011-11-24 Thread Xinchen Hui
laruence Thu, 24 Nov 2011 09:16:11 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=319745

Log:
Fixed bug #60367 (Reflection and Late Static Binding)

Bug: https://bugs.php.net/60367 (Assigned) Reflection and Late Static Binding
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c
A   php/php-src/branches/PHP_5_3/ext/reflection/tests/bug60367.phpt
U   php/php-src/branches/PHP_5_4/NEWS
U   php/php-src/branches/PHP_5_4/ext/reflection/php_reflection.c
A   php/php-src/branches/PHP_5_4/ext/reflection/tests/bug60367.phpt
U   php/php-src/trunk/ext/reflection/php_reflection.c
A   php/php-src/trunk/ext/reflection/tests/bug60367.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-11-24 08:47:22 UTC (rev 319744)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-11-24 09:16:11 UTC (rev 319745)
@@ -75,6 +75,9 @@
   . Fixed bug #54682 (Tidy::diagnose() NULL pointer dereference).
 (Maksymilian Arciemowicz, Felipe)

+- Reflection:
+  . Fixed bug #60367 (Reflection and Late Static Binding). (Laruence)
+
 03 Nov 2011, PHP 5.3.9RC1

 - Core:

Modified: php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c
===
--- php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c
2011-11-24 08:47:22 UTC (rev 319744)
+++ php/php-src/branches/PHP_5_3/ext/reflection/php_reflection.c
2011-11-24 09:16:11 UTC (rev 319745)
@@ -2635,7 +2635,7 @@
fcc.initialized = 1;
fcc.function_handler = mptr;
fcc.calling_scope = obj_ce;
-   fcc.called_scope = obj_ce;
+   fcc.called_scope = intern-ce;
fcc.object_ptr = object_ptr;

result = zend_call_function(fci, fcc TSRMLS_CC);

Added: php/php-src/branches/PHP_5_3/ext/reflection/tests/bug60367.phpt
===
--- php/php-src/branches/PHP_5_3/ext/reflection/tests/bug60367.phpt 
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/reflection/tests/bug60367.phpt 
2011-11-24 09:16:11 UTC (rev 319745)
@@ -0,0 +1,26 @@
+--TEST--
+Bug #60367 (Reflection and Late Static Binding)
+--FILE--
+?php
+abstract class A {
+
+   const WHAT = 'A';
+
+   public static function call() {
+   echo static::WHAT;
+   }
+
+}
+
+class B extends A {
+
+   const WHAT = 'B';
+
+}
+
+$method = new ReflectionMethod(b::call);
+$method-invoke(null);
+$method = new ReflectionMethod(A::call);
+$method-invoke(null);
+--EXPECTF--
+BA

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2011-11-24 08:47:22 UTC (rev 319744)
+++ php/php-src/branches/PHP_5_4/NEWS   2011-11-24 09:16:11 UTC (rev 319745)
@@ -66,6 +66,7 @@
 - Reflection:
   . Fixed bug #60357 (__toString() method triggers E_NOTICE Array to string
 conversion). (Laruence)
+  . Fixed bug #60367 (Reflection and Late Static Binding). (Laruence)

 - SOAP extension:
   . Added new SoapClient option keep_alive. FR #60329. (Pierrick)

Modified: php/php-src/branches/PHP_5_4/ext/reflection/php_reflection.c
===
--- php/php-src/branches/PHP_5_4/ext/reflection/php_reflection.c
2011-11-24 08:47:22 UTC (rev 319744)
+++ php/php-src/branches/PHP_5_4/ext/reflection/php_reflection.c
2011-11-24 09:16:11 UTC (rev 319745)
@@ -2811,7 +2811,7 @@
fcc.initialized = 1;
fcc.function_handler = mptr;
fcc.calling_scope = obj_ce;
-   fcc.called_scope = obj_ce;
+   fcc.called_scope = intern-ce;
fcc.object_ptr = object_ptr;

result = zend_call_function(fci, fcc TSRMLS_CC);

Added: php/php-src/branches/PHP_5_4/ext/reflection/tests/bug60367.phpt
===
--- php/php-src/branches/PHP_5_4/ext/reflection/tests/bug60367.phpt 
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/reflection/tests/bug60367.phpt 
2011-11-24 09:16:11 UTC (rev 319745)
@@ -0,0 +1,26 @@
+--TEST--
+Bug #60367 (Reflection and Late Static Binding)
+--FILE--
+?php
+abstract class A {
+
+   const WHAT = 'A';
+
+   public static function call() {
+   echo static::WHAT;
+   }
+
+}
+
+class B extends A {
+
+   const WHAT = 'B';
+
+}
+
+$method = new ReflectionMethod(b::call);
+$method-invoke(null);
+$method = new ReflectionMethod(A::call);
+$method-invoke(null);
+--EXPECTF--
+BA

Modified: php/php-src/trunk/ext/reflection/php_reflection.c
===
--- php/php-src/trunk/ext/reflection/php_reflection.c   2011-11-24 08:47:22 UTC 
(rev 319744)
+++ 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/UPGRADING branches/PHP_5_3/main/main.c branches/PHP_5_3/main/php_globals.h branches/PHP_5_4/main/main.c trunk/main/main.c

2011-11-24 Thread Pierre Joye
pajoye   Thu, 24 Nov 2011 12:46:45 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=319750

Log:
- merge crt warning change (r216594) and rename the ini to 
windows.show_crt_warning

Changed paths:
U   php/php-src/branches/PHP_5_3/UPGRADING
U   php/php-src/branches/PHP_5_3/main/main.c
U   php/php-src/branches/PHP_5_3/main/php_globals.h
U   php/php-src/branches/PHP_5_4/main/main.c
U   php/php-src/trunk/main/main.c

Modified: php/php-src/branches/PHP_5_3/UPGRADING
===
--- php/php-src/branches/PHP_5_3/UPGRADING  2011-11-24 11:42:00 UTC (rev 
319749)
+++ php/php-src/branches/PHP_5_3/UPGRADING  2011-11-24 12:46:45 UTC (rev 
319750)
@@ -343,6 +343,9 @@

 - A new directive, request_order, controls the behavior of $_REQUEST
   independently of variables_order.
+- A new directive, called windows.show_crt_warning, has been introduced.
+  This directive shows the CRT warnings when enabled. These warnings were
+  displayed by default until now. It is disabled by default.

 - New INI directives:
   - mail.add_x_header

Modified: php/php-src/branches/PHP_5_3/main/main.c
===
--- php/php-src/branches/PHP_5_3/main/main.c2011-11-24 11:42:00 UTC (rev 
319749)
+++ php/php-src/branches/PHP_5_3/main/main.c2011-11-24 12:46:45 UTC (rev 
319750)
@@ -544,6 +544,9 @@
STD_PHP_INI_ENTRY(user_ini.filename,  .user.ini,
PHP_INI_SYSTEM, OnUpdateString, user_ini_filename,  
php_core_globals,   core_globals)
STD_PHP_INI_ENTRY(user_ini.cache_ttl, 300,  
PHP_INI_SYSTEM, OnUpdateLong,   user_ini_cache_ttl, 
php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(exit_on_timeout,  0,
PHP_INI_ALL,OnUpdateBool,   exit_on_timeout,
php_core_globals,   core_globals)
+#ifdef PHP_WIN32
+   STD_PHP_INI_BOOLEAN(windows.show_crt_warning, 0,
PHP_INI_ALL,OnUpdateBool,   
windows_show_crt_warning,   php_core_globals,   
core_globals)
+#endif
 PHP_INI_END()
 /* }}} */

@@ -1787,18 +1790,21 @@
int len;

if (!called) {
-   called = 1;
-   if (function) {
-   if (file) {
-   len = _snprintf(buf, sizeof(buf)-1, Invalid 
parameter detected in CRT function '%ws' (%ws:%d), function, file, line);
+   TSRMLS_FETCH();
+   if(PG(windows_show_crt_warning)) {
+   called = 1;
+   if (function) {
+   if (file) {
+   len = _snprintf(buf, sizeof(buf)-1, 
Invalid parameter detected in CRT function '%ws' (%ws:%d), function, file, 
line);
+   } else {
+   len = _snprintf(buf, sizeof(buf)-1, 
Invalid parameter detected in CRT function '%ws', function);
+   }
} else {
-   len = _snprintf(buf, sizeof(buf)-1, Invalid 
parameter detected in CRT function '%ws', function);
+   len = _snprintf(buf, sizeof(buf)-1, Invalid 
CRT parameter detected (function not known));
}
-   } else {
-   len = _snprintf(buf, sizeof(buf)-1, Invalid CRT 
parameters detected);
+   zend_error(E_WARNING, %s, buf);
+   called = 0;
}
-   zend_error(E_WARNING, %s, buf);
-   called = 0;
}
 }
 #endif

Modified: php/php-src/branches/PHP_5_3/main/php_globals.h
===
--- php/php-src/branches/PHP_5_3/main/php_globals.h 2011-11-24 11:42:00 UTC 
(rev 319749)
+++ php/php-src/branches/PHP_5_3/main/php_globals.h 2011-11-24 12:46:45 UTC 
(rev 319750)
@@ -170,6 +170,10 @@
char *mail_log;

zend_bool in_error_log;
+
+#ifdef PHP_WIN32
+   zend_bool windows_show_crt_warning;
+#endif
 };



Modified: php/php-src/branches/PHP_5_4/main/main.c
===
--- php/php-src/branches/PHP_5_4/main/main.c2011-11-24 11:42:00 UTC (rev 
319749)
+++ php/php-src/branches/PHP_5_4/main/main.c2011-11-24 12:46:45 UTC (rev 
319750)
@@ -514,7 +514,7 @@
STD_PHP_INI_ENTRY(user_ini.cache_ttl, 300,  
PHP_INI_SYSTEM, OnUpdateLong,   user_ini_cache_ttl, 
php_core_globals,   core_globals)
STD_PHP_INI_BOOLEAN(exit_on_timeout,  0,
PHP_INI_ALL,OnUpdateBool,   exit_on_timeout,

[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/curl/config.m4 ext/curl/config.w32 ext/curl/curl.dsp ext/curl/interface.c ext/curl/package.xml ext/curl/php_curl.h ext/curl/share.c

2011-11-24 Thread Pierrick Charron
pierrick Thu, 24 Nov 2011 12:49:11 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=319751

Log:
Revert commit r319729 until I have a clean version for non-ZTS

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/ext/curl/config.m4
U   php/php-src/trunk/ext/curl/config.w32
U   php/php-src/trunk/ext/curl/curl.dsp
U   php/php-src/trunk/ext/curl/interface.c
U   php/php-src/trunk/ext/curl/package.xml
U   php/php-src/trunk/ext/curl/php_curl.h
D   php/php-src/trunk/ext/curl/share.c

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS	2011-11-24 12:46:45 UTC (rev 319750)
+++ php/php-src/trunk/NEWS	2011-11-24 12:49:11 UTC (rev 319751)
@@ -6,8 +6,6 @@
   . World domination

 - cURL:
-  . Implemented FR #55540, added functions curl_share_init(),
-curl_share_setopt() and curl_share_close(). (Pierrick)
   . Added support for CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_APPEND,
 CURLOPT_DIRLISTONLY, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_NEW_FILE_PERMS,
 CURLOPT_NETRC_FILE, CURLOPT_PREQUOTE, CURLOPT_KRBLEVEL, CURLOPT_MAXFILESIZE,
@@ -27,7 +25,7 @@
 CURLOPT_TRANSFER_ENCODING, CURLOPT_DNS_SERVERS and CURLOPT_USE_SSL.
 (Pierrick)
   . Fixed bug #55635 (CURLOPT_BINARYTRANSFER no longer used. The constant
-still exists for backward compatibility but is doing nothing). (Pierrick)
+	still exists for backward compatibility but is doing nothing). (Pierrick)
   . Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick)

  NOTE: Insert NEWS from last stable release here prior to actual release! 

Modified: php/php-src/trunk/ext/curl/config.m4
===
--- php/php-src/trunk/ext/curl/config.m4	2011-11-24 12:46:45 UTC (rev 319750)
+++ php/php-src/trunk/ext/curl/config.m4	2011-11-24 12:49:11 UTC (rev 319751)
@@ -156,6 +156,6 @@
 AC_DEFINE(PHP_CURL_URL_WRAPPERS,1,[ ])
   fi

-  PHP_NEW_EXTENSION(curl, interface.c multi.c share.c streams.c, $ext_shared)
+  PHP_NEW_EXTENSION(curl, interface.c multi.c streams.c, $ext_shared)
   PHP_SUBST(CURL_SHARED_LIBADD)
 fi

Modified: php/php-src/trunk/ext/curl/config.w32
===
--- php/php-src/trunk/ext/curl/config.w32	2011-11-24 12:46:45 UTC (rev 319750)
+++ php/php-src/trunk/ext/curl/config.w32	2011-11-24 12:49:11 UTC (rev 319751)
@@ -13,7 +13,7 @@
 		 (((PHP_ZLIB==no)  (CHECK_LIB(zlib_a.lib;zlib.lib, curl, PHP_CURL))) ||
 			(PHP_ZLIB_SHARED  CHECK_LIB(zlib.lib, curl, PHP_CURL)) || (PHP_ZLIB == yes  (!PHP_ZLIB_SHARED)))
 		) {
-		EXTENSION(curl, interface.c multi.c share.c streams.c, true);
+		EXTENSION(curl, interface.c multi.c streams.c, true);
 		AC_DEFINE('HAVE_CURL', 1, 'Have cURL library');
 		AC_DEFINE('HAVE_CURL_SSL', 1, 'Have SSL suppurt in cURL');
 		AC_DEFINE('HAVE_CURL_EASY_STRERROR', 1, 'Have curl_easy_strerror in cURL');

Modified: php/php-src/trunk/ext/curl/curl.dsp
===
(Binary files differ)

Modified: php/php-src/trunk/ext/curl/interface.c
===
--- php/php-src/trunk/ext/curl/interface.c	2011-11-24 12:46:45 UTC (rev 319750)
+++ php/php-src/trunk/ext/curl/interface.c	2011-11-24 12:49:11 UTC (rev 319751)
@@ -90,7 +90,6 @@

 int  le_curl;
 int  le_curl_multi_handle;
-int  le_curl_share_handle;

 #ifdef PHP_CURL_NEED_OPENSSL_TSL /* {{{ */
 static MUTEX_T *php_curl_openssl_tsl = NULL;
@@ -349,19 +348,6 @@
 ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_close, 0)
 	ZEND_ARG_INFO(0, mh)
 ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(arginfo_curl_share_init, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(arginfo_curl_share_close, 0)
-	ZEND_ARG_INFO(0, sh)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(arginfo_curl_share_setopt, 0)
-	ZEND_ARG_INFO(0, sh)
-	ZEND_ARG_INFO(0, option)
-	ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO()
 /* }}} */

 /* {{{ curl_functions[]
@@ -385,9 +371,6 @@
 	PHP_FE(curl_multi_getcontent,arginfo_curl_multi_getcontent)
 	PHP_FE(curl_multi_info_read, arginfo_curl_multi_info_read)
 	PHP_FE(curl_multi_close, arginfo_curl_multi_close)
-	PHP_FE(curl_share_init,  arginfo_curl_share_init)
-	PHP_FE(curl_share_close, arginfo_curl_share_close)
-	PHP_FE(curl_share_setopt,arginfo_curl_share_setopt)
 	PHP_FE_END
 };
 /* }}} */
@@ -544,7 +527,6 @@
 {
 	le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, curl, module_number);
 	le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, curl_multi, module_number);
-	le_curl_share_handle = zend_register_list_destructors_ex(_php_curl_share_close, NULL, curl_share, module_number);

 	REGISTER_INI_ENTRIES();

@@ -1007,14 +989,6 @@
 	REGISTER_CURL_CONSTANT(CURLFTPMETHOD_SINGLECWD);
 #endif

-	/* Constant for curl_share_setopt */
-	

Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/curl/config.m4 ext/curl/config.w32 ext/curl/curl.dsp ext/curl/interface.c ext/curl/package.xml ext/curl/php_curl.h ext/curl/share.c

2011-11-24 Thread Pierrick Charron
Doh ! For once it's not the ZTS which broke :p

I reverted the commit until I come up with a clean solution for both
ZTS and non-ZTS

Thanks

On 24 November 2011 01:45, Antony Dovgal t...@daylessday.org wrote:
 On 11/24/2011 02:20 AM, Pierrick Charron wrote:

 pierrick                                 Wed, 23 Nov 2011 22:20:28 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=319729

 Log:
 Implemented FR #55540, added functions curl_share_init(),
 curl_share_setopt() and curl_share_close().

 This patch breaks non-ZTS build of trunk:

 /local/qa/HEAD_non-ZTS/ext/curl/php_curl.h:157:2: error: expected
 specifier-qualifier-list before ‘MUTEX_T’
 /local/qa/HEAD_non-ZTS/ext/curl/interface.c: In function ‘_php_curl_setopt’:
 /local/qa/HEAD_non-ZTS/ext/curl/interface.c:2449:8: warning: ‘return’ with
 no value, in function returning non-void
 make: *** [ext/curl/interface.lo] Error 1

 --
 Wbr,
 Antony Dovgal
 ---
 http://pinba.org - realtime profiling for PHP

 --
 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_3/php.ini-development branches/PHP_5_3/php.ini-production branches/PHP_5_4/php.ini-development branches/PHP_5_4/php.ini-production trunk/php.ini-development

2011-11-24 Thread Pierre Joye
pajoye   Thu, 24 Nov 2011 12:51:28 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=319752

Log:
- add crt warning ini

Changed paths:
U   php/php-src/branches/PHP_5_3/php.ini-development
U   php/php-src/branches/PHP_5_3/php.ini-production
U   php/php-src/branches/PHP_5_4/php.ini-development
U   php/php-src/branches/PHP_5_4/php.ini-production
U   php/php-src/trunk/php.ini-development
U   php/php-src/trunk/php.ini-production

Modified: php/php-src/branches/PHP_5_3/php.ini-development
===
--- php/php-src/branches/PHP_5_3/php.ini-development2011-11-24 12:49:11 UTC 
(rev 319751)
+++ php/php-src/branches/PHP_5_3/php.ini-development2011-11-24 12:51:28 UTC 
(rev 319752)
@@ -191,6 +191,11 @@
 ;   Development Value: GPCS
 ;   Production Value: GPCS

+;windows.show_crt_warning
+; Default value: 0
+; Development value: 0
+; Production value: 0
+
 
 ; php.ini Options  ;
 

Modified: php/php-src/branches/PHP_5_3/php.ini-production
===
--- php/php-src/branches/PHP_5_3/php.ini-production 2011-11-24 12:49:11 UTC 
(rev 319751)
+++ php/php-src/branches/PHP_5_3/php.ini-production 2011-11-24 12:51:28 UTC 
(rev 319752)
@@ -191,6 +191,11 @@
 ;   Development Value: GPCS
 ;   Production Value: GPCS

+;windows.show_crt_warning
+; Default value: 0
+; Development value: 0
+; Production value: 0
+
 
 ; php.ini Options  ;
 

Modified: php/php-src/branches/PHP_5_4/php.ini-development
===
--- php/php-src/branches/PHP_5_4/php.ini-development2011-11-24 12:49:11 UTC 
(rev 319751)
+++ php/php-src/branches/PHP_5_4/php.ini-development2011-11-24 12:51:28 UTC 
(rev 319752)
@@ -176,6 +176,11 @@
 ;   Development Value: GPCS
 ;   Production Value: GPCS

+;windows.show_crt_warning
+; Default value: 0
+; Development value: 0
+; Production value: 0
+
 
 ; php.ini Options  ;
 

Modified: php/php-src/branches/PHP_5_4/php.ini-production
===
--- php/php-src/branches/PHP_5_4/php.ini-production 2011-11-24 12:49:11 UTC 
(rev 319751)
+++ php/php-src/branches/PHP_5_4/php.ini-production 2011-11-24 12:51:28 UTC 
(rev 319752)
@@ -176,6 +176,11 @@
 ;   Development Value: GPCS
 ;   Production Value: GPCS

+;windows.show_crt_warning
+; Default value: 0
+; Development value: 0
+; Production value: 0
+
 
 ; php.ini Options  ;
 

Modified: php/php-src/trunk/php.ini-development
===
--- php/php-src/trunk/php.ini-development   2011-11-24 12:49:11 UTC (rev 
319751)
+++ php/php-src/trunk/php.ini-development   2011-11-24 12:51:28 UTC (rev 
319752)
@@ -176,6 +176,11 @@
 ;   Development Value: GPCS
 ;   Production Value: GPCS

+;windows.show_crt_warning
+; Default value: 0
+; Development value: 0
+; Production value: 0
+
 
 ; php.ini Options  ;
 

Modified: php/php-src/trunk/php.ini-production
===
--- php/php-src/trunk/php.ini-production2011-11-24 12:49:11 UTC (rev 
319751)
+++ php/php-src/trunk/php.ini-production2011-11-24 12:51:28 UTC (rev 
319752)
@@ -176,6 +176,11 @@
 ;   Development Value: GPCS
 ;   Production Value: GPCS

+;windows.show_crt_warning
+; Default value: 0
+; Development value: 0
+; Production value: 0
+
 
 ; php.ini Options  ;
 

-- 
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 configure.in main/php_version.h

2011-11-24 Thread Johannes Schlüter
johannes Thu, 24 Nov 2011 12:57:59 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=319753

Log:
- PHP 5.3.9RC2

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/configure.in
U   php/php-src/branches/PHP_5_3/main/php_version.h

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-11-24 12:51:28 UTC (rev 319752)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-11-24 12:57:59 UTC (rev 319753)
@@ -1,6 +1,6 @@
 PHPNEWS
 |||
-?? ??? 2011, PHP 5.3.9
+24 Nov 2011, PHP 5.3.9RC2

 - Core:
   . Fixed bug #60138 (GC crash with referenced array in RecursiveArrayIterator)

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2011-11-24 12:51:28 UTC (rev 
319752)
+++ php/php-src/branches/PHP_5_3/configure.in   2011-11-24 12:57:59 UTC (rev 
319753)
@@ -42,7 +42,7 @@
 PHP_MAJOR_VERSION=5
 PHP_MINOR_VERSION=3
 PHP_RELEASE_VERSION=9
-PHP_EXTRA_VERSION=RC2-dev
+PHP_EXTRA_VERSION=RC2
 
PHP_VERSION=$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION
 PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 1 + [$]PHP_MINOR_VERSION \* 
100 + [$]PHP_RELEASE_VERSION`


Modified: php/php-src/branches/PHP_5_3/main/php_version.h
===
--- php/php-src/branches/PHP_5_3/main/php_version.h 2011-11-24 12:51:28 UTC 
(rev 319752)
+++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-11-24 12:57:59 UTC 
(rev 319753)
@@ -3,6 +3,6 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 3
 #define PHP_RELEASE_VERSION 9
-#define PHP_EXTRA_VERSION RC2-dev
-#define PHP_VERSION 5.3.9RC2-dev
+#define PHP_EXTRA_VERSION RC2
+#define PHP_VERSION 5.3.9RC2
 #define PHP_VERSION_ID 50309

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

[PHP-CVS] svn: /php/php-src/tags/

2011-11-24 Thread Johannes Schlüter
johannes Thu, 24 Nov 2011 13:00:22 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=319754

Log:
PHP 5.3.9RC2

Changed paths:
A + php/php-src/tags/php_5_3_9RC2/
(from php/php-src/branches/PHP_5_3/:r319753)


Property changes on: php/php-src/tags/php_5_3_9RC2
___
Added: svn:ignore
   + *.gcda
*.gcno
*.la
*.lo
*.ncb
*.opt
*.plg
FBCIndex
FBCLockFolder
deps
libs
Debug
Debug_TS
Makefile
Makefile.fragments
Makefile.objects
Release
Release_TS
Release_TSDbg
Release_TS_inline
Release_inline
ZendEngine1
_libs
acconfig.h
aclocal.m4
autom4te.cache
bsd_converted
buildconf.stamp
buildmk.stamp
confdefs.h
config.cache
config.h.in
config.log
config.nice
config.nice.bat
config.status
config_vars.mk
configuration-parser.c
configuration-parser.h
configuration-parser.output
configuration-scanner.c
configure
configure.bat
configure.js
conftest
conftest.c
debug.log
diff
generated_lists
include
install-sh
internal_functions.c
lcov_data
lcov_html
libs
libtool
meta_cc
meta_ccld
missing
mkinstalldirs
modules
php
php-*.tar.gz
php5.spec
php_lcov.info
php_test_results_*.txt
php_version.h
results.txt
shlibtool
stamp-h
test.php3
tmp-php.ini
want_dependencies
x64

Added: svn:mergeinfo
   + /php/php-src/trunk:284726,305015,305018-305019

-- 
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 configure.in main/php_version.h

2011-11-24 Thread Johannes Schlüter
johannes Thu, 24 Nov 2011 14:00:10 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=319755

Log:
- Back to -dev

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/configure.in
U   php/php-src/branches/PHP_5_3/main/php_version.h

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-11-24 13:00:22 UTC (rev 319754)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-11-24 14:00:10 UTC (rev 319755)
@@ -1,5 +1,7 @@
 PHPNEWS
 |||
+?? ??? 2011, PHP 5.3.9
+
 24 Nov 2011, PHP 5.3.9RC2

 - Core:

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2011-11-24 13:00:22 UTC (rev 
319754)
+++ php/php-src/branches/PHP_5_3/configure.in   2011-11-24 14:00:10 UTC (rev 
319755)
@@ -42,7 +42,7 @@
 PHP_MAJOR_VERSION=5
 PHP_MINOR_VERSION=3
 PHP_RELEASE_VERSION=9
-PHP_EXTRA_VERSION=RC2
+PHP_EXTRA_VERSION=RC3-dev
 
PHP_VERSION=$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION
 PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 1 + [$]PHP_MINOR_VERSION \* 
100 + [$]PHP_RELEASE_VERSION`


Modified: php/php-src/branches/PHP_5_3/main/php_version.h
===
--- php/php-src/branches/PHP_5_3/main/php_version.h 2011-11-24 13:00:22 UTC 
(rev 319754)
+++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-11-24 14:00:10 UTC 
(rev 319755)
@@ -3,6 +3,6 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 3
 #define PHP_RELEASE_VERSION 9
-#define PHP_EXTRA_VERSION RC2
-#define PHP_VERSION 5.3.9RC2
+#define PHP_EXTRA_VERSION RC3-dev
+#define PHP_VERSION 5.3.9RC3-dev
 #define PHP_VERSION_ID 50309

-- 
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/php.ini-development branches/PHP_5_3/php.ini-production branches/PHP_5_4/php.ini-development branches/PHP_5_4/php.ini-production trunk/php.ini-develop

2011-11-24 Thread Christopher Jones


Can you move it out of the The following are all the settings which are 
different in either the production
or development versions of the INIs with respect to PHP's default behavior 
section and also add some inline comments?

Thanks.

On 11/24/11 4:51 AM, Pierre Joye wrote:

pajoye   Thu, 24 Nov 2011 12:51:28 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=319752

Log:
- add crt warning ini

Changed paths:
 U   php/php-src/branches/PHP_5_3/php.ini-development
 U   php/php-src/branches/PHP_5_3/php.ini-production
 U   php/php-src/branches/PHP_5_4/php.ini-development
 U   php/php-src/branches/PHP_5_4/php.ini-production
 U   php/php-src/trunk/php.ini-development
 U   php/php-src/trunk/php.ini-production

Modified: php/php-src/branches/PHP_5_3/php.ini-development
===
--- php/php-src/branches/PHP_5_3/php.ini-development2011-11-24 12:49:11 UTC 
(rev 319751)
+++ php/php-src/branches/PHP_5_3/php.ini-development2011-11-24 12:51:28 UTC 
(rev 319752)
@@ -191,6 +191,11 @@
  ;   Development Value: GPCS
  ;   Production Value: GPCS

+;windows.show_crt_warning
+; Default value: 0
+; Development value: 0
+; Production value: 0
+
  
  ; php.ini Options  ;
  

Modified: php/php-src/branches/PHP_5_3/php.ini-production
===
--- php/php-src/branches/PHP_5_3/php.ini-production 2011-11-24 12:49:11 UTC 
(rev 319751)
+++ php/php-src/branches/PHP_5_3/php.ini-production 2011-11-24 12:51:28 UTC 
(rev 319752)
@@ -191,6 +191,11 @@
  ;   Development Value: GPCS
  ;   Production Value: GPCS

+;windows.show_crt_warning
+; Default value: 0
+; Development value: 0
+; Production value: 0
+
  
  ; php.ini Options  ;
  

Modified: php/php-src/branches/PHP_5_4/php.ini-development
===
--- php/php-src/branches/PHP_5_4/php.ini-development2011-11-24 12:49:11 UTC 
(rev 319751)
+++ php/php-src/branches/PHP_5_4/php.ini-development2011-11-24 12:51:28 UTC 
(rev 319752)
@@ -176,6 +176,11 @@
  ;   Development Value: GPCS
  ;   Production Value: GPCS

+;windows.show_crt_warning
+; Default value: 0
+; Development value: 0
+; Production value: 0
+
  
  ; php.ini Options  ;
  

Modified: php/php-src/branches/PHP_5_4/php.ini-production
===
--- php/php-src/branches/PHP_5_4/php.ini-production 2011-11-24 12:49:11 UTC 
(rev 319751)
+++ php/php-src/branches/PHP_5_4/php.ini-production 2011-11-24 12:51:28 UTC 
(rev 319752)
@@ -176,6 +176,11 @@
  ;   Development Value: GPCS
  ;   Production Value: GPCS

+;windows.show_crt_warning
+; Default value: 0
+; Development value: 0
+; Production value: 0
+
  
  ; php.ini Options  ;
  

Modified: php/php-src/trunk/php.ini-development
===
--- php/php-src/trunk/php.ini-development   2011-11-24 12:49:11 UTC (rev 
319751)
+++ php/php-src/trunk/php.ini-development   2011-11-24 12:51:28 UTC (rev 
319752)
@@ -176,6 +176,11 @@
  ;   Development Value: GPCS
  ;   Production Value: GPCS

+;windows.show_crt_warning
+; Default value: 0
+; Development value: 0
+; Production value: 0
+
  
  ; php.ini Options  ;
  

Modified: php/php-src/trunk/php.ini-production
===
--- php/php-src/trunk/php.ini-production2011-11-24 12:49:11 UTC (rev 
319751)
+++ php/php-src/trunk/php.ini-production2011-11-24 12:51:28 UTC (rev 
319752)
@@ -176,6 +176,11 @@
  ;   Development Value: GPCS
  ;   Production Value: GPCS

+;windows.show_crt_warning
+; Default value: 0
+; Development value: 0
+; Production value: 0
+
  
  ; php.ini Options  ;
  






--
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/date/lib/unixtime2tm.c branches/PHP_5_3/ext/date/tests/bug55253.phpt branches/PHP_5_3/ext/date/tests/bug60236.phpt branches/PHP_

2011-11-24 Thread Derick Rethans
derick   Thu, 24 Nov 2011 17:13:47 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=319767

Log:
- Fixed bug #60236 (TLA timezone dates are not converted properly from
  timestamp).
- Fixed bug #55253 (DateTime::add() and sub() result -1 hour on objects with
  time zone type 2).

And fixed some test cases.

Bugs: https://bugs.php.net/60236 (Assigned) TLA timezone dates are not 
converted properly from timestamp
  https://bugs.php.net/55253 (Open) DateTime::add() and sub() result -1 
hour on objects with time zone type 2
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/date/lib/unixtime2tm.c
U   php/php-src/branches/PHP_5_3/ext/date/tests/bug55253.phpt
A   php/php-src/branches/PHP_5_3/ext/date/tests/bug60236.phpt
U   
php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_get-1.phpt
U   
php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_get-2.phpt
U   php/php-src/branches/PHP_5_3/ext/date/tests/mktime-2.phpt
U   
php/php-src/branches/PHP_5_3/ext/date/tests/rfc-datetime_and_daylight_saving_time-type2.phpt
U   php/php-src/branches/PHP_5_4/ext/date/lib/unixtime2tm.c
U   php/php-src/branches/PHP_5_4/ext/date/tests/bug55253.phpt
A   php/php-src/branches/PHP_5_4/ext/date/tests/bug60236.phpt
U   
php/php-src/branches/PHP_5_4/ext/date/tests/rfc-datetime_and_daylight_saving_time-type2.phpt
U   php/php-src/trunk/ext/date/lib/unixtime2tm.c
U   php/php-src/trunk/ext/date/tests/bug55253.phpt
A   php/php-src/trunk/ext/date/tests/bug60236.phpt
U   
php/php-src/trunk/ext/date/tests/rfc-datetime_and_daylight_saving_time-type2.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2011-11-24 16:39:12 UTC (rev 319766)
+++ php/php-src/branches/PHP_5_3/NEWS	2011-11-24 17:13:47 UTC (rev 319767)
@@ -24,8 +24,14 @@
   . Added .phar to default authorized extensions. (fat)

 - BCmath:
-  . Fixed bug #60377 (bcscale related crashes on 64bits platforms) (shm)
+  . Fixed bug #60377 (bcscale related crashes on 64bits platforms). (shm)

+- Date:
+  . Fixed bug #60236 (TLA timezone dates are not converted properly from
+timestamp). (Derick)
+  . Fixed bug #55253 (DateTime::add() and sub() result -1 hour on objects with
+time zone type 2). (Derick)
+
 - EXIF:
   . Fixed bug #60150 (Integer overflow during the parsing of invalid exif
 header). (Stas, flolechaud at gmail dot com)

Modified: php/php-src/branches/PHP_5_3/ext/date/lib/unixtime2tm.c
===
--- php/php-src/branches/PHP_5_3/ext/date/lib/unixtime2tm.c	2011-11-24 16:39:12 UTC (rev 319766)
+++ php/php-src/branches/PHP_5_3/ext/date/lib/unixtime2tm.c	2011-11-24 17:13:47 UTC (rev 319767)
@@ -146,7 +146,7 @@
 			int z = tm-z;
 			signed int dst = tm-dst;

-			timelib_unixtime2gmt(tm, tm-sse - (tm-z * 60));
+			timelib_unixtime2gmt(tm, tm-sse - (tm-z * 60) + (tm-dst * 3600));

 			tm-z = z;
 			tm-dst = dst;
@@ -184,7 +184,7 @@
 			int z = tm-z;
 			signed int dst = tm-dst;

-			timelib_unixtime2gmt(tm, ts - (tm-z * 60));
+			timelib_unixtime2gmt(tm, ts - (tm-z * 60) + (tm-dst * 3600));

 			tm-z = z;
 			tm-dst = dst;

Modified: php/php-src/branches/PHP_5_3/ext/date/tests/bug55253.phpt
===
--- php/php-src/branches/PHP_5_3/ext/date/tests/bug55253.phpt	2011-11-24 16:39:12 UTC (rev 319766)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/bug55253.phpt	2011-11-24 17:13:47 UTC (rev 319767)
@@ -1,9 +1,7 @@
 --TEST--
-DateTime::add() and sub() result -1 hour on objects with time zone type 2
+Bug #55253: DateTime::add() and sub() result -1 hour on objects with time zone type 2
 --CREDITS--
 Daniel Convissor dani...@php.net
---XFAIL--
-Bug 55253 exists
 --FILE--
 ?php


Added: php/php-src/branches/PHP_5_3/ext/date/tests/bug60236.phpt
===
--- php/php-src/branches/PHP_5_3/ext/date/tests/bug60236.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/bug60236.phpt	2011-11-24 17:13:47 UTC (rev 319767)
@@ -0,0 +1,20 @@
+--TEST--
+Bug #60236: TLA timezone dates are not converted properly from timestamp
+--FILE--
+?php
+$t = new DateTime('2010-07-06 18:38:28 EDT');
+$ts = $t-format('U');
+var_dump($ts);
+$t-setTimestamp($ts);
+var_dump($t);
+?
+--EXPECT--
+string(10) 1278455908
+object(DateTime)#1 (3) {
+  [date]=
+  string(19) 2010-07-06 18:38:28
+  [timezone_type]=
+  int(2)
+  [timezone]=
+  string(3) EDT
+}

Modified: php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_get-1.phpt
===
--- php/php-src/branches/PHP_5_3/ext/date/tests/date_default_timezone_get-1.phpt	2011-11-24 16:39:12 UTC (rev 319766)
+++ 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/intl/common/common_error.c branches/PHP_5_4/ext/intl/idn/idn.c branches/PHP_5_4/ext/intl/php_intl.c branches/PHP_5_4/ext/intl/te

2011-11-24 Thread Gustavo André dos Santos Lopes
cataphract   Thu, 24 Nov 2011 17:54:50 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=319770

Log:
- Support for UTS #46.

Bug: https://bugs.php.net/46 (Closed) a string 0 false or true?
  
Changed paths:
U   php/php-src/branches/PHP_5_4/NEWS
U   php/php-src/branches/PHP_5_4/ext/intl/common/common_error.c
U   php/php-src/branches/PHP_5_4/ext/intl/idn/idn.c
U   php/php-src/branches/PHP_5_4/ext/intl/php_intl.c
A   php/php-src/branches/PHP_5_4/ext/intl/tests/idn_uts46_basic.phpt
A   php/php-src/branches/PHP_5_4/ext/intl/tests/idn_uts46_errors.phpt
U   php/php-src/trunk/ext/intl/common/common_error.c
U   php/php-src/trunk/ext/intl/idn/idn.c
U   php/php-src/trunk/ext/intl/php_intl.c
A   php/php-src/trunk/ext/intl/tests/idn_uts46_basic.phpt
A   php/php-src/trunk/ext/intl/tests/idn_uts46_errors.phpt

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS	2011-11-24 17:37:23 UTC (rev 319769)
+++ php/php-src/branches/PHP_5_4/NEWS	2011-11-24 17:54:50 UTC (rev 319770)
@@ -39,6 +39,7 @@

 - Intl:
   . Fixed memory leak in several Intl locale functions. (Felipe)
+  . Added support for UTS #46. (Gustavo)

 - Mbstring
   . Fixed bug #60306 (Characters lost while converting from cp936 to utf8).

Modified: php/php-src/branches/PHP_5_4/ext/intl/common/common_error.c
===
--- php/php-src/branches/PHP_5_4/ext/intl/common/common_error.c	2011-11-24 17:37:23 UTC (rev 319769)
+++ php/php-src/branches/PHP_5_4/ext/intl/common/common_error.c	2011-11-24 17:54:50 UTC (rev 319770)
@@ -232,7 +232,6 @@
 	INTL_EXPOSE_CONST( U_REGEX_ERROR_LIMIT );

 	/* The error code in the range 0x10400-0x104ff are reserved for IDNA related error codes */
-#if defined(U_IDNA_PROHIBITED_ERROR)
 	INTL_EXPOSE_CONST( U_IDNA_PROHIBITED_ERROR );
 	INTL_EXPOSE_CONST( U_IDNA_ERROR_START );
 	INTL_EXPOSE_CONST( U_IDNA_UNASSIGNED_ERROR );
@@ -242,8 +241,8 @@
 	INTL_EXPOSE_CONST( U_IDNA_VERIFICATION_ERROR );
 	INTL_EXPOSE_CONST( U_IDNA_LABEL_TOO_LONG_ERROR );
 	INTL_EXPOSE_CONST( U_IDNA_ZERO_LENGTH_LABEL_ERROR );
+	INTL_EXPOSE_CONST( U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR );
 	INTL_EXPOSE_CONST( U_IDNA_ERROR_LIMIT );
-#endif

 	/* Aliases for StringPrep */
 	INTL_EXPOSE_CONST( U_STRINGPREP_PROHIBITED_ERROR );

Modified: php/php-src/branches/PHP_5_4/ext/intl/idn/idn.c
===
--- php/php-src/branches/PHP_5_4/ext/intl/idn/idn.c	2011-11-24 17:37:23 UTC (rev 319769)
+++ php/php-src/branches/PHP_5_4/ext/intl/idn/idn.c	2011-11-24 17:54:50 UTC (rev 319770)
@@ -29,14 +29,25 @@
 #include ext/standard/php_string.h

 #include intl_error.h
- #include intl_convert.h
+#include intl_convert.h
 /* }}} */

+#ifdef UIDNA_INFO_INITIALIZER
+#define HAVE_46_API 1 /* has UTS#46 API (introduced in ICU 4.6) */
+#endif
+
+enum {
+	INTL_IDN_VARIANT_2003 = 0,
+	INTL_IDN_VARIANT_UTS46
+};
+
 /* {{{ grapheme_register_constants
  * Register API constants
  */
 void idn_register_constants( INIT_FUNC_ARGS )
 {
+	/* OPTIONS */
+
 	/* Option to prohibit processing of unassigned codepoints in the input and
 	   do not check if the input conforms to STD-3 ASCII rules. */
 	REGISTER_LONG_CONSTANT(IDNA_DEFAULT, UIDNA_DEFAULT, CONST_CS | CONST_PERSISTENT);
@@ -46,6 +57,50 @@

 	/* Option to check if input conforms to STD-3 ASCII rules */
 	REGISTER_LONG_CONSTANT(IDNA_USE_STD3_RULES, UIDNA_USE_STD3_RULES, CONST_CS | CONST_PERSISTENT);
+
+#ifdef HAVE_46_API
+
+	/* Option to check for whether the input conforms to the BiDi rules.
+	 * Ignored by the IDNA2003 implementation. (IDNA2003 always performs a BiDi check.) */
+	REGISTER_LONG_CONSTANT(IDNA_CHECK_BIDI, UIDNA_CHECK_BIDI, CONST_CS | CONST_PERSISTENT);
+
+	/* Option to check for whether the input conforms to the CONTEXTJ rules.
+	 * Ignored by the IDNA2003 implementation. (The CONTEXTJ check is new in IDNA2008.) */
+	REGISTER_LONG_CONSTANT(IDNA_CHECK_CONTEXTJ, UIDNA_CHECK_CONTEXTJ, CONST_CS | CONST_PERSISTENT);
+
+	/* Option for nontransitional processing in ToASCII().
+	 * By default, ToASCII() uses transitional processing.
+	 * Ignored by the IDNA2003 implementation. */
+	REGISTER_LONG_CONSTANT(IDNA_NONTRANSITIONAL_TO_ASCII, UIDNA_NONTRANSITIONAL_TO_ASCII, CONST_CS | CONST_PERSISTENT);
+
+	/* Option for nontransitional processing in ToUnicode().
+	 * By default, ToUnicode() uses transitional processing.
+	 * Ignored by the IDNA2003 implementation. */
+	REGISTER_LONG_CONSTANT(IDNA_NONTRANSITIONAL_TO_UNICODE, UIDNA_NONTRANSITIONAL_TO_UNICODE, CONST_CS | CONST_PERSISTENT);
+#endif
+
+	/* VARIANTS */
+	REGISTER_LONG_CONSTANT(INTL_IDNA_VARIANT_2003, INTL_IDN_VARIANT_2003, CONST_CS | CONST_PERSISTENT);
+#ifdef HAVE_46_API
+	REGISTER_LONG_CONSTANT(INTL_IDNA_VARIANT_UTS46, INTL_IDN_VARIANT_UTS46, CONST_CS | CONST_PERSISTENT);
+#endif
+
+#ifdef HAVE_46_API
+	

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/UPGRADING branches/PHP_5_4/ext/intl/idn/idn.c trunk/ext/intl/idn/idn.c

2011-11-24 Thread Gustavo André dos Santos Lopes
cataphract   Thu, 24 Nov 2011 22:45:50 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=319781

Log:
- Updated UPGRADING, protos and attribution in ext/intl/idn/idn.c

Changed paths:
U   php/php-src/branches/PHP_5_4/UPGRADING
U   php/php-src/branches/PHP_5_4/ext/intl/idn/idn.c
U   php/php-src/trunk/ext/intl/idn/idn.c

Modified: php/php-src/branches/PHP_5_4/UPGRADING
===
--- php/php-src/branches/PHP_5_4/UPGRADING  2011-11-24 21:01:39 UTC (rev 
319780)
+++ php/php-src/branches/PHP_5_4/UPGRADING  2011-11-24 22:45:50 UTC (rev 
319781)
@@ -217,8 +217,8 @@
   to cURL.
 - Added optional argument to debug_backtrace() and debug_print_backtrace()
   to limit the amount of stack frames returned.
-- Fixed crypt_blowfish handling of 8-bit characters. crypt() in Blowfish mode 
now
-  supports hashes marked $2a$, $2x$, $2y$ and $2z$.
+- Fixed crypt_blowfish handling of 8-bit characters. crypt() in Blowfish mode
+  now supports hashes marked $2a$, $2x$, $2y$ and $2z$.
 - mbstring now supports following encodings: Shift_JIS/UTF-8 Emoji,
   JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004),
   MacJapanese (Shift_JIS), gb18030.
@@ -230,7 +230,11 @@
   and true for is_subclass_of() for BC reasons.
 - ob_start() will now treat a chunk size of 1 as meaning 1 byte, rather than
   the previous special case behaviour of treating it as 4096 bytes.
+- idn_to_ascii() and idn_to_utf8() now take two extra parameters, one 
indicating
+  the variant (IDNA 2003 or UTS #46) and another, passed by reference, to 
return
+  details about the operation in case UTS #46 is chosen.

+
 ===
 5. Changes made to existing methods
 ===
@@ -594,6 +598,26 @@
- ZLIB_ENCODING_DEFLATE
- ZLIB_ENCODING_GZIP
- ZLIB_ENCODING_RAW
+   - U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR
+   - IDNA_CHECK_BIDI
+   - IDNA_CHECK_CONTEXTJ
+   - IDNA_NONTRANSITIONAL_TO_ASCII
+   - IDNA_NONTRANSITIONAL_TO_UNICODE
+   - INTL_IDNA_VARIANT_2003
+   - INTL_IDNA_VARIANT_UTS46
+   - IDNA_ERROR_EMPTY_LABEL
+   - IDNA_ERROR_LABEL_TOO_LONG
+   - IDNA_ERROR_DOMAIN_NAME_TOO_LONG
+   - IDNA_ERROR_LEADING_HYPHEN
+   - IDNA_ERROR_TRAILING_HYPHEN
+   - IDNA_ERROR_HYPHEN_3_4
+   - IDNA_ERROR_LEADING_COMBINING_MARK
+   - IDNA_ERROR_DISALLOWED
+   - IDNA_ERROR_PUNYCODE
+   - IDNA_ERROR_LABEL_HAS_DOT
+   - IDNA_ERROR_INVALID_ACE_LABEL
+   - IDNA_ERROR_BIDI
+   - IDNA_ERROR_CONTEXTJ

  c. New classes


Modified: php/php-src/branches/PHP_5_4/ext/intl/idn/idn.c
===
--- php/php-src/branches/PHP_5_4/ext/intl/idn/idn.c 2011-11-24 21:01:39 UTC 
(rev 319780)
+++ php/php-src/branches/PHP_5_4/ext/intl/idn/idn.c 2011-11-24 22:45:50 UTC 
(rev 319781)
@@ -13,6 +13,7 @@
| lice...@php.net so we can mail you a copy immediately.   |
+--+
| Author: Pierre A. Joye pie...@php.net  |
+   | Gustavo Lopes  cataphr...@php.net  |
+--+
  */
 /* $Id$ */
@@ -322,7 +323,7 @@
 #endif
 }

-/* {{{ proto int idn_to_ascii(string domain[, int options])
+/* {{{ proto int idn_to_ascii(string domain[, int options[, int variant[, 
array idna_info]]])
Converts an Unicode domain to ASCII representation, as defined in the IDNA 
RFC */
 PHP_FUNCTION(idn_to_ascii)
 {
@@ -331,7 +332,7 @@
 /* }}} */


-/* {{{ proto int idn_to_utf8(string domain[, int options])
+/* {{{ proto int idn_to_utf8(string domain[, int options[, int variant[, array 
idna_info]]])
Converts an ASCII representation of the domain to Unicode (UTF-8), as 
defined in the IDNA RFC */
 PHP_FUNCTION(idn_to_utf8)
 {

Modified: php/php-src/trunk/ext/intl/idn/idn.c
===
--- php/php-src/trunk/ext/intl/idn/idn.c2011-11-24 21:01:39 UTC (rev 
319780)
+++ php/php-src/trunk/ext/intl/idn/idn.c2011-11-24 22:45:50 UTC (rev 
319781)
@@ -13,6 +13,7 @@
| lice...@php.net so we can mail you a copy immediately.   |
+--+
| Author: Pierre A. Joye pie...@php.net  |
+   | Gustavo Lopes  cataphr...@php.net  |
+--+
  */
 /* $Id$ */
@@ -322,7 +323,7 @@
 #endif
 }

-/* {{{ proto int idn_to_ascii(string domain[, int options])
+/* {{{ proto int idn_to_ascii(string domain[, int options[, int variant[, 
array idna_info]]])
Converts an Unicode domain to ASCII representation, as defined in the IDNA 
RFC */
 

[PHP-CVS] svn: /php/php-src/trunk/ext/pgsql/ config.m4 pgsql.c php_pgsql.h tests/08escape.phpt

2011-11-24 Thread Yasuo Ohgaki
yohgaki  Fri, 25 Nov 2011 02:21:01 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=319788

Log:
add pg_escape_identifier/pg_escape_literal

Changed paths:
U   php/php-src/trunk/ext/pgsql/config.m4
U   php/php-src/trunk/ext/pgsql/pgsql.c
U   php/php-src/trunk/ext/pgsql/php_pgsql.h
U   php/php-src/trunk/ext/pgsql/tests/08escape.phpt

Modified: php/php-src/trunk/ext/pgsql/config.m4
===
--- php/php-src/trunk/ext/pgsql/config.m4   2011-11-25 02:17:33 UTC (rev 
319787)
+++ php/php-src/trunk/ext/pgsql/config.m4   2011-11-25 02:21:01 UTC (rev 
319788)
@@ -94,6 +94,7 @@
   AC_CHECK_LIB(pq, 
pg_encoding_to_char,AC_DEFINE(HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT,1,[Whether 
libpq is compiled with --enable-multibyte]))
   AC_CHECK_LIB(pq, lo_create, AC_DEFINE(HAVE_PG_LO_CREATE,1,[PostgreSQL 8.1 or 
later]))
   AC_CHECK_LIB(pq, lo_import_with_oid, 
AC_DEFINE(HAVE_PG_LO_IMPORT_WITH_OID,1,[PostgreSQL 8.4 or later]))
+  AC_CHECK_LIB(pq, PQescapeLiteral, 
AC_DEFINE(HAVE_PQESCAPELITERAL,1,[PostgreSQL 9.0 or later]))
   LIBS=$old_LIBS
   LDFLAGS=$old_LDFLAGS


Modified: php/php-src/trunk/ext/pgsql/pgsql.c
===
--- php/php-src/trunk/ext/pgsql/pgsql.c 2011-11-25 02:17:33 UTC (rev 319787)
+++ php/php-src/trunk/ext/pgsql/pgsql.c 2011-11-25 02:21:01 UTC (rev 319788)
@@ -422,6 +422,17 @@
 ZEND_END_ARG_INFO()
 #endif

+#if HAVE_PQESCAPE
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_escape_literal, 0, 0, 0)
+   ZEND_ARG_INFO(0, connection)
+   ZEND_ARG_INFO(0, data)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_escape_identifier, 0, 0, 0)
+   ZEND_ARG_INFO(0, connection)
+   ZEND_ARG_INFO(0, data)
+ZEND_END_ARG_INFO()
+#endif
+
 ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_result_error, 0, 0, 1)
ZEND_ARG_INFO(0, result)
 ZEND_END_ARG_INFO()
@@ -652,6 +663,8 @@
PHP_FE(pg_escape_string,arginfo_pg_escape_string)
PHP_FE(pg_escape_bytea, arginfo_pg_escape_bytea)
PHP_FE(pg_unescape_bytea,   arginfo_pg_unescape_bytea)
+   PHP_FE(pg_escape_literal,   arginfo_pg_escape_literal)
+   PHP_FE(pg_escape_identifier,arginfo_pg_escape_identifier)
 #endif
 #if HAVE_PQSETERRORVERBOSITY
PHP_FE(pg_set_error_verbosity,  arginfo_pg_set_error_verbosity)
@@ -815,7 +828,7 @@
TSRMLS_FETCH();
if (! PGG(ignore_notices)) {
notice = (php_pgsql_notice *)emalloc(sizeof(php_pgsql_notice));
-   notice-message = _php_pgsql_trim_message(message, 
notice-len);
+   notice-message = _php_pgsql_trim_message(message, (int 
*)notice-len);
if (PGG(log_notices)) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, %s, 
notice-message);
}
@@ -4200,6 +4213,130 @@
 /* }}} */
 #endif

+#ifdef HAVE_PQESCAPE
+#if !HAVE_PQESCAPELITERAL
+/* emulate libpq's PQescapeInternal() 9.0 or later */
+static char* php_pgsql_PQescapeInternal(PGconn *conn, const char *str, size_t 
len, int escape_literal) {
+   char *result, *rp;
+   const char *s;
+   size_t tmp_len;
+   int input_len = len;
+   char quote_char = escape_literal ? '\'' : '';
+
+   if (!conn) {
+   return NULL;
+   }
+
+   /*
+* NOTE: multibyte strings that could cointain slashes should be 
considered.
+* (e.g. SJIS, BIG5) However, it cannot be done without valid PGconn 
and mbstring.
+* Therefore, this function does not support such encodings currently.
+* FIXME: add encoding check and skip multibyte char bytes if there is 
vaild PGconn.
+*/
+
+   /* allocate enough memory */
+   rp = result = (char *)emalloc(len*2 + 5); /* leading  E needs extra 2 
bytes + quote_chars on both end for 2 bytes + NULL */
+
+   if (escape_literal) {
+   /* check backslashes */
+   tmp_len = strspn(str, \\);
+   if (tmp_len != len) {
+   /* add  E for escaping slashes */
+   *rp++ = ' ';
+   *rp++ = 'E';
+   }
+   }
+   /* open quote */
+   *rp++ = quote_char;
+   for (s = str; s - str  input_len; ++s) {
+   if (*s == quote_char || (escape_literal  *s == '\\')) {
+   *rp++ = *s;
+   *rp++ = *s;
+   } else {
+   *rp++ = *s;
+   }
+   }
+   *rp++ = quote_char;
+   *rp = '\0';
+
+   return result;
+}
+#endif
+
+static void php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAMETERS, int 
escape_literal) {
+   char *from = NULL, *to = NULL, *tmp = NULL;
+   zval *pgsql_link = NULL;
+   PGconn *pgsql;
+   int to_len;
+   int from_len;
+   int id = -1;
+
+   switch (ZEND_NUM_ARGS()) {
+   case 1:
+   if 

[PHP-CVS] svn: /php/php-src/trunk/ NEWS

2011-11-24 Thread Yasuo Ohgaki
yohgaki  Fri, 25 Nov 2011 02:24:37 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=319789

Log:
add pgsql new functions

Changed paths:
U   php/php-src/trunk/NEWS

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2011-11-25 02:21:01 UTC (rev 319788)
+++ php/php-src/trunk/NEWS  2011-11-25 02:24:37 UTC (rev 319789)
@@ -28,4 +28,7 @@
still exists for backward compatibility but is doing nothing). 
(Pierrick)
   . Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick)

+- pgsql
+  . Added pg_escape_literal() and pg_escape_identifier() (Yasuo)
+
  NOTE: Insert NEWS from last stable release here prior to actual release! 


-- 
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/ html.c

2011-11-24 Thread Xinchen Hui
laruence Fri, 25 Nov 2011 07:50:18 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=319801

Log:
warning: suggest parentheses around  within ||

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/html.c

Modified: php/php-src/branches/PHP_5_3/ext/standard/html.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/html.c2011-11-25 06:55:59 UTC 
(rev 319800)
+++ php/php-src/branches/PHP_5_3/ext/standard/html.c2011-11-25 07:50:18 UTC 
(rev 319801)
@@ -1020,8 +1020,8 @@
code = strtol(p + 2, next, 10);
}

-   if (code == '\''  !(quote_style  
ENT_HTML_QUOTE_SINGLE) ||
-   code == ''  !(quote_style  
ENT_HTML_QUOTE_DOUBLE)) {
+   if ((code == '\''  !(quote_style  
ENT_HTML_QUOTE_SINGLE)) ||
+   (code == ''  !(quote_style  
ENT_HTML_QUOTE_DOUBLE))) {
invalid_code = 1;
}


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