Re: [PHP-CVS] com php-src: Fix NEWS: NEWS

2012-03-24 Thread Michael Wallner
Looks like the commit/mail script still does some superfluous html
entitiy encoding:

On 22 March 2012 16:40, Johannes Schluuml;ter johan...@php.net wrote:
 Commit:    1a0b0ead145deb150f9efb6004534018b5af3a35
 Author:    Johannes Schlüter johan...@schlueters.de         Thu, 22 Mar 
 2012 16:40:13 +0100
 Parents:   b4aea52682a6e7a8f0e2a7638ba37145cb6bf16d
 Branches:  PHP-5.3

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



[PHP-CVS] com karma: Check for trivial merge based on the paths array: lib/Git/PostReceiveHook.php

2012-03-24 Thread David Soria Parra
Commit:deed69a3a56adc67972a0f8795eeb539b7d8d6cb
Author:David Soria Parra d...@php.net Sat, 24 Mar 2012 09:30:20 
+0100
Parents:   b2c216852c420a55da06830e3d80759961875815
Branches:  master

Link:   
http://git.php.net/?p=karma.git;a=commitdiff;h=deed69a3a56adc67972a0f8795eeb539b7d8d6cb

Log:
Check for trivial merge based on the paths array

Changed paths:
  M  lib/Git/PostReceiveHook.php


Diff:
deed69a3a56adc67972a0f8795eeb539b7d8d6cb
diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php
index 2a54abc..a7436bd 100644
--- a/lib/Git/PostReceiveHook.php
+++ b/lib/Git/PostReceiveHook.php
@@ -502,7 +502,7 @@ class PostReceiveHook extends ReceiveHook
 $pathsString .= '  ' . $action . '  ' . $path . \n;
 }
 
-$isTrivialMerge = empty($pathsString);
+$isTrivialMerge = count($paths) = 0;
 
 if (!$isTrivialMerge) {


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



[PHP-CVS] com karma: add safety value for reftype: lib/Git/ReceiveHook.php

2012-03-24 Thread Alexander Moskaliov
Commit:31ccabcd4f9c19844192f3b7fa72c2bbaf2ed6b7
Author:Alexander Moskaliov ir...@php.net Sat, 24 Mar 2012 
13:56:57 +0400
Parents:   deed69a3a56adc67972a0f8795eeb539b7d8d6cb
Branches:  master

Link:   
http://git.php.net/?p=karma.git;a=commitdiff;h=31ccabcd4f9c19844192f3b7fa72c2bbaf2ed6b7

Log:
add safety value for reftype

Changed paths:
  M  lib/Git/ReceiveHook.php


Diff:
31ccabcd4f9c19844192f3b7fa72c2bbaf2ed6b7
diff --git a/lib/Git/ReceiveHook.php b/lib/Git/ReceiveHook.php
index e4e879a..1bf4bfa 100644
--- a/lib/Git/ReceiveHook.php
+++ b/lib/Git/ReceiveHook.php
@@ -150,7 +150,7 @@ abstract class ReceiveHook
 $ref['reftype'] = self::REF_TAG;
 } else {
 // not support by this script
-$ref['reftype'] = null;
+$ref['reftype'] = -1;
 }
 
 if ($ref['old'] == \GIT::NULLREV) {


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



[PHP-CVS] com karma: fix one line ref bug: hooks/post-receive

2012-03-24 Thread Alexander Moskaliov
Commit:8e826dd710ddcbc2464f5e978f1f2a4105a66d7d
Author:Alexander Moskaliov ir...@php.net Sat, 24 Mar 2012 
15:03:27 +0400
Parents:   31ccabcd4f9c19844192f3b7fa72c2bbaf2ed6b7
Branches:  master

Link:   
http://git.php.net/?p=karma.git;a=commitdiff;h=8e826dd710ddcbc2464f5e978f1f2a4105a66d7d

Log:
fix one line ref bug

Changed paths:
  M  hooks/post-receive


Diff:
8e826dd710ddcbc2464f5e978f1f2a4105a66d7d
diff --git a/hooks/post-receive b/hooks/post-receive
index 74fce6b..2045e42 100755
--- a/hooks/post-receive
+++ b/hooks/post-receive
@@ -1,5 +1,5 @@
 #!/bin/sh
 in=$(cat)
-[ -f 'hooks/post-receive.mail' ] (echo $in | hooks/post-receive.mail )
-[ -f 'hooks/post-receive.bugsweb' ]  (echo $in | hooks/post-receive.bugsweb )
+[ -f 'hooks/post-receive.mail' ] (echo $in | hooks/post-receive.mail )
+[ -f 'hooks/post-receive.bugsweb' ]  (echo $in | 
hooks/post-receive.bugsweb )
 [ -f 'hooks/post-receive.mirror' ]   hooks/post-receive.mirror


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



[PHP-CVS] com karma: Dont add an additional newline to the input: hooks/post-receive

2012-03-24 Thread David Soria Parra
Commit:fd251cb983a0be8628d4e435aed2775cf37c5f71
Author:David Soria Parra d...@php.net Sat, 24 Mar 2012 12:15:15 
+0100
Parents:   8e826dd710ddcbc2464f5e978f1f2a4105a66d7d
Branches:  master

Link:   
http://git.php.net/?p=karma.git;a=commitdiff;h=fd251cb983a0be8628d4e435aed2775cf37c5f71

Log:
Dont add an additional newline to the input

Changed paths:
  M  hooks/post-receive


Diff:
fd251cb983a0be8628d4e435aed2775cf37c5f71
diff --git a/hooks/post-receive b/hooks/post-receive
index 2045e42..748e80e 100755
--- a/hooks/post-receive
+++ b/hooks/post-receive
@@ -1,5 +1,5 @@
 #!/bin/sh
 in=$(cat)
-[ -f 'hooks/post-receive.mail' ] (echo $in | hooks/post-receive.mail )
-[ -f 'hooks/post-receive.bugsweb' ]  (echo $in | 
hooks/post-receive.bugsweb )
+[ -f 'hooks/post-receive.mail' ] (echo -n $in | 
hooks/post-receive.mail )
+[ -f 'hooks/post-receive.bugsweb' ]  (echo -n $in | 
hooks/post-receive.bugsweb )
 [ -f 'hooks/post-receive.mirror' ]   hooks/post-receive.mirror


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



[PHP-CVS] com php-src: Revert Implemented FR #60738 (Allow 'set_error_handler' to handle NULL): NEWS Zend/tests/bug60738.phpt Zend/zend_builtin_functions.c

2012-03-24 Thread Xinchen Hui
Commit:521ebec3e9bcd4fa75772d2bfa57a733dfe1d5fa
Author:Xinchen Hui larue...@gmail.com Sat, 24 Mar 2012 19:26:02 
+0800
Parents:   2d21149743c8ef52e5fdf62da18a1a903c09670a
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=521ebec3e9bcd4fa75772d2bfa57a733dfe1d5fa

Log:
Revert Implemented FR #60738 (Allow 'set_error_handler' to handle NULL)

This reverts commit fcae164ea63979d7814d7aa114fe8351033e7400.

Bugs:
https://bugs.php.net/60738

Changed paths:
  M  NEWS
  D  Zend/tests/bug60738.phpt
  M  Zend/zend_builtin_functions.c


Diff:
521ebec3e9bcd4fa75772d2bfa57a733dfe1d5fa
diff --git a/NEWS b/NEWS
index 2e1dd7c..fa36358 100644
--- a/NEWS
+++ b/NEWS
@@ -23,8 +23,6 @@ PHP   
 NEWS
   . Fixed bug #60825 (Segfault when running symfony 2 tests).
 (Dmitry, Laruence)
   . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam)
-  . Implemented FR #60738 (Allow 'set_error_handler' to handle NULL).
-(Laruence, Nikita Popov)
   . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)
   . Fixed bug #60227 (header() cannot detect the multi-line header with CR).
 (rui, Gustavo)
diff --git a/Zend/tests/bug60738.phpt b/Zend/tests/bug60738.phpt
deleted file mode 100644
index e0c9793..000
--- a/Zend/tests/bug60738.phpt
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--
-Bug #60738 Allow 'set_error_handler' to handle NULL
---FILE--
-?php
-
-set_error_handler(function() { echo 'Intercepted error!', \n; });
-
-trigger_error('Error!');
-
-set_error_handler(null);
-
-trigger_error('Error!');
-?
---EXPECTF--
-Intercepted error!
-
-Notice: Error! in %s on line %d
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index ce54f4e..8d39a31 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1413,6 +1413,7 @@ ZEND_FUNCTION(trigger_error)
 ZEND_FUNCTION(set_error_handler)
 {
zval *error_handler;
+   zend_bool had_orig_error_handler=0;
char *error_handler_name = NULL;
long error_type = E_ALL | E_STRICT;
 
@@ -1420,41 +1421,38 @@ ZEND_FUNCTION(set_error_handler)
return;
}
 
-   if (IS_NULL != Z_TYPE_P(error_handler)) {
-   zend_bool had_orig_error_handler = 0;
-   if (!zend_is_callable(error_handler, 0, error_handler_name 
TSRMLS_CC)) {
-   zend_error(E_WARNING, %s() expects the argument (%s) 
to be a valid callback,
-   get_active_function_name(TSRMLS_C), 
error_handler_name?error_handler_name:unknown);
-   efree(error_handler_name);
-   return;
-   }
+   if (!zend_is_callable(error_handler, 0, error_handler_name TSRMLS_CC)) 
{
+   zend_error(E_WARNING, %s() expects the argument (%s) to be a 
valid callback,
+  get_active_function_name(TSRMLS_C), 
error_handler_name?error_handler_name:unknown);
efree(error_handler_name);
+   return;
+   }
+   efree(error_handler_name);
 
-   if (EG(user_error_handler)) {
-   had_orig_error_handler = 1;
-   *return_value = *EG(user_error_handler);
-   zval_copy_ctor(return_value);
-   INIT_PZVAL(return_value);
-   
zend_stack_push(EG(user_error_handlers_error_reporting), 
EG(user_error_handler_error_reporting), 
sizeof(EG(user_error_handler_error_reporting)));
-   zend_ptr_stack_push(EG(user_error_handlers), 
EG(user_error_handler));
-   }
-
-   ALLOC_ZVAL(EG(user_error_handler));
-   EG(user_error_handler_error_reporting) = (int)error_type;
-   MAKE_COPY_ZVAL(error_handler, EG(user_error_handler));
-
-   if (!had_orig_error_handler) {
-   RETURN_NULL();
-   }
-   } else { /* unset user-defined handler */
-   if (EG(user_error_handler)) {
-   
zend_stack_push(EG(user_error_handlers_error_reporting), 
EG(user_error_handler_error_reporting), 
sizeof(EG(user_error_handler_error_reporting)));
-   zend_ptr_stack_push(EG(user_error_handlers), 
EG(user_error_handler));
-   }
+   if (EG(user_error_handler)) {
+   had_orig_error_handler = 1;
+   *return_value = *EG(user_error_handler);
+   zval_copy_ctor(return_value);
+   INIT_PZVAL(return_value);
+   zend_stack_push(EG(user_error_handlers_error_reporting), 
EG(user_error_handler_error_reporting), 
sizeof(EG(user_error_handler_error_reporting)));
+   zend_ptr_stack_push(EG(user_error_handlers), 
EG(user_error_handler));
+   }
+   ALLOC_ZVAL(EG(user_error_handler));
 
+   if (!zend_is_true(error_handler)) { /* unset user-defined handler */
+

[PHP-CVS] com php-src: Revert Update NEWS: NEWS

2012-03-24 Thread Xinchen Hui
Commit:5a0b3cc90a5ff059a812d7de27312d07292f1f77
Author:Xinchen Hui larue...@gmail.com Sat, 24 Mar 2012 19:27:00 
+0800
Parents:   872fdd153e69f3028750215f226769f2af399078
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=5a0b3cc90a5ff059a812d7de27312d07292f1f77

Log:
Revert Update NEWS

This reverts commit 88a8085aa3ae4ce3928d0309a3c5530e7483a134.

Changed paths:
  M  NEWS


Diff:
5a0b3cc90a5ff059a812d7de27312d07292f1f77
diff --git a/NEWS b/NEWS
index 753c348..7853ad6 100644
--- a/NEWS
+++ b/NEWS
@@ -33,8 +33,6 @@ PHP   
 NEWS
   . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam)
   . Fixed bug #60717 (Order of traits in use statement can cause a fatal
 error). (Stefan)
-  . Implemented FR #60738 (Allow 'set_error_handler' to handle NULL).
-(Laruence, Nikita Popov)
   . Fixed bug #60573 (type hinting with self keyword causes weird errors).
 (Laruence)
   . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)


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



[PHP-CVS] com php-src: Revert Implemented FR #60738 (Allow 'set_error_handler' to handle NULL): NEWS Zend/tests/bug60738.phpt Zend/zend_builtin_functions.c

2012-03-24 Thread Xinchen Hui
Commit:9c99a89e8e2f740b96e3f8b423c0ce6702cc3be6
Author:Xinchen Hui larue...@gmail.com Sat, 24 Mar 2012 19:26:02 
+0800
Parents:   2d21149743c8ef52e5fdf62da18a1a903c09670a
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=9c99a89e8e2f740b96e3f8b423c0ce6702cc3be6

Log:
Revert Implemented FR #60738 (Allow 'set_error_handler' to handle NULL)

This reverts commit fcae164ea63979d7814d7aa114fe8351033e7400.

Bugs:
https://bugs.php.net/60738

Changed paths:
  M  NEWS
  D  Zend/tests/bug60738.phpt
  M  Zend/zend_builtin_functions.c


Diff:
9c99a89e8e2f740b96e3f8b423c0ce6702cc3be6
diff --git a/NEWS b/NEWS
index 2e1dd7c..fa36358 100644
--- a/NEWS
+++ b/NEWS
@@ -23,8 +23,6 @@ PHP   
 NEWS
   . Fixed bug #60825 (Segfault when running symfony 2 tests).
 (Dmitry, Laruence)
   . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam)
-  . Implemented FR #60738 (Allow 'set_error_handler' to handle NULL).
-(Laruence, Nikita Popov)
   . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)
   . Fixed bug #60227 (header() cannot detect the multi-line header with CR).
 (rui, Gustavo)
diff --git a/Zend/tests/bug60738.phpt b/Zend/tests/bug60738.phpt
deleted file mode 100644
index e0c9793..000
--- a/Zend/tests/bug60738.phpt
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--
-Bug #60738 Allow 'set_error_handler' to handle NULL
---FILE--
-?php
-
-set_error_handler(function() { echo 'Intercepted error!', \n; });
-
-trigger_error('Error!');
-
-set_error_handler(null);
-
-trigger_error('Error!');
-?
---EXPECTF--
-Intercepted error!
-
-Notice: Error! in %s on line %d
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index ce54f4e..8d39a31 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1413,6 +1413,7 @@ ZEND_FUNCTION(trigger_error)
 ZEND_FUNCTION(set_error_handler)
 {
zval *error_handler;
+   zend_bool had_orig_error_handler=0;
char *error_handler_name = NULL;
long error_type = E_ALL | E_STRICT;
 
@@ -1420,41 +1421,38 @@ ZEND_FUNCTION(set_error_handler)
return;
}
 
-   if (IS_NULL != Z_TYPE_P(error_handler)) {
-   zend_bool had_orig_error_handler = 0;
-   if (!zend_is_callable(error_handler, 0, error_handler_name 
TSRMLS_CC)) {
-   zend_error(E_WARNING, %s() expects the argument (%s) 
to be a valid callback,
-   get_active_function_name(TSRMLS_C), 
error_handler_name?error_handler_name:unknown);
-   efree(error_handler_name);
-   return;
-   }
+   if (!zend_is_callable(error_handler, 0, error_handler_name TSRMLS_CC)) 
{
+   zend_error(E_WARNING, %s() expects the argument (%s) to be a 
valid callback,
+  get_active_function_name(TSRMLS_C), 
error_handler_name?error_handler_name:unknown);
efree(error_handler_name);
+   return;
+   }
+   efree(error_handler_name);
 
-   if (EG(user_error_handler)) {
-   had_orig_error_handler = 1;
-   *return_value = *EG(user_error_handler);
-   zval_copy_ctor(return_value);
-   INIT_PZVAL(return_value);
-   
zend_stack_push(EG(user_error_handlers_error_reporting), 
EG(user_error_handler_error_reporting), 
sizeof(EG(user_error_handler_error_reporting)));
-   zend_ptr_stack_push(EG(user_error_handlers), 
EG(user_error_handler));
-   }
-
-   ALLOC_ZVAL(EG(user_error_handler));
-   EG(user_error_handler_error_reporting) = (int)error_type;
-   MAKE_COPY_ZVAL(error_handler, EG(user_error_handler));
-
-   if (!had_orig_error_handler) {
-   RETURN_NULL();
-   }
-   } else { /* unset user-defined handler */
-   if (EG(user_error_handler)) {
-   
zend_stack_push(EG(user_error_handlers_error_reporting), 
EG(user_error_handler_error_reporting), 
sizeof(EG(user_error_handler_error_reporting)));
-   zend_ptr_stack_push(EG(user_error_handlers), 
EG(user_error_handler));
-   }
+   if (EG(user_error_handler)) {
+   had_orig_error_handler = 1;
+   *return_value = *EG(user_error_handler);
+   zval_copy_ctor(return_value);
+   INIT_PZVAL(return_value);
+   zend_stack_push(EG(user_error_handlers_error_reporting), 
EG(user_error_handler_error_reporting), 
sizeof(EG(user_error_handler_error_reporting)));
+   zend_ptr_stack_push(EG(user_error_handlers), 
EG(user_error_handler));
+   }
+   ALLOC_ZVAL(EG(user_error_handler));
 
+   if (!zend_is_true(error_handler)) { /* unset user-defined handler 

[PHP-CVS] com php-src: Merge branch 'PHP-5.3' of ../php-5.3 into PHP-5.4: Zend/zend_builtin_functions.c

2012-03-24 Thread Xinchen Hui
Commit:872fdd153e69f3028750215f226769f2af399078
Author:Xinchen Hui larue...@gmail.com Sat, 24 Mar 2012 19:26:27 
+0800
Parents:   88a8085aa3ae4ce3928d0309a3c5530e7483a134 
9c99a89e8e2f740b96e3f8b423c0ce6702cc3be6
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=872fdd153e69f3028750215f226769f2af399078

Log:
Merge branch 'PHP-5.3' of ../php-5.3 into PHP-5.4

Changed paths:
  MM  Zend/zend_builtin_functions.c

872fdd153e69f3028750215f226769f2af399078
diff --combined Zend/zend_builtin_functions.c
index f8d4674,8d39a31..eab98ed
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@@ -50,12 -50,10 +50,12 @@@ static ZEND_FUNCTION(method_exists)
  static ZEND_FUNCTION(property_exists);
  static ZEND_FUNCTION(class_exists);
  static ZEND_FUNCTION(interface_exists);
 +static ZEND_FUNCTION(trait_exists);
  static ZEND_FUNCTION(function_exists);
  static ZEND_FUNCTION(class_alias);
  #if ZEND_DEBUG
  static ZEND_FUNCTION(leak);
 +static ZEND_FUNCTION(leak_variable);
  #ifdef ZEND_TEST_EXCEPTIONS
  static ZEND_FUNCTION(crash);
  #endif
@@@ -72,7 -70,6 +72,7 @@@ static ZEND_FUNCTION(restore_error_hand
  static ZEND_FUNCTION(set_exception_handler);
  static ZEND_FUNCTION(restore_exception_handler);
  static ZEND_FUNCTION(get_declared_classes);
 +static ZEND_FUNCTION(get_declared_traits);
  static ZEND_FUNCTION(get_declared_interfaces);
  static ZEND_FUNCTION(get_defined_functions);
  static ZEND_FUNCTION(get_defined_vars);
@@@ -143,7 -140,6 +143,7 @@@ ZEND_END_ARG_INFO(
  ZEND_BEGIN_ARG_INFO_EX(arginfo_is_subclass_of, 0, 0, 2)
ZEND_ARG_INFO(0, object)
ZEND_ARG_INFO(0, class_name)
 +  ZEND_ARG_INFO(0, allow_string)
  ZEND_END_ARG_INFO()
  
  ZEND_BEGIN_ARG_INFO_EX(arginfo_get_class_vars, 0, 0, 1)
@@@ -173,11 -169,6 +173,11 @@@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ex
ZEND_ARG_INFO(0, autoload)
  ZEND_END_ARG_INFO()
  
 +ZEND_BEGIN_ARG_INFO_EX(arginfo_trait_exists, 0, 0, 1)
 +  ZEND_ARG_INFO(0, traitname)
 +  ZEND_ARG_INFO(0, autoload)
 +ZEND_END_ARG_INFO()
 +
  ZEND_BEGIN_ARG_INFO_EX(arginfo_function_exists, 0, 0, 1)
ZEND_ARG_INFO(0, function_name)
  ZEND_END_ARG_INFO()
@@@ -188,13 -179,6 +188,13 @@@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_al
ZEND_ARG_INFO(0, autoload)
  ZEND_END_ARG_INFO()
  
 +#if ZEND_DEBUG
 +ZEND_BEGIN_ARG_INFO_EX(arginfo_leak_variable, 0, 0, 1)
 +  ZEND_ARG_INFO(0, variable)
 +  ZEND_ARG_INFO(0, leak_data)
 +ZEND_END_ARG_INFO()
 +#endif
 +
  ZEND_BEGIN_ARG_INFO_EX(arginfo_trigger_error, 0, 0, 1)
ZEND_ARG_INFO(0, message)
ZEND_ARG_INFO(0, error_type)
@@@ -228,11 -212,6 +228,11 @@@ ZEND_END_ARG_INFO(
  
  ZEND_BEGIN_ARG_INFO_EX(arginfo_debug_backtrace, 0, 0, 0)
ZEND_ARG_INFO(0, options)
 +  ZEND_ARG_INFO(0, limit)
 +ZEND_END_ARG_INFO()
 +
 +ZEND_BEGIN_ARG_INFO_EX(arginfo_debug_print_backtrace, 0, 0, 0)
 +  ZEND_ARG_INFO(0, options)
  ZEND_END_ARG_INFO()
  
  ZEND_BEGIN_ARG_INFO_EX(arginfo_extension_loaded, 0, 0, 1)
@@@ -261,12 -240,10 +261,12 @@@ static const zend_function_entry builti
ZEND_FE(property_exists,arginfo_property_exists)
ZEND_FE(class_exists,   arginfo_class_exists)
ZEND_FE(interface_exists,   arginfo_class_exists)
 +  ZEND_FE(trait_exists,   arginfo_trait_exists)
ZEND_FE(function_exists,arginfo_function_exists)
ZEND_FE(class_alias,arginfo_class_alias)
  #if ZEND_DEBUG
ZEND_FE(leak,   NULL)
 +  ZEND_FE(leak_variable,  arginfo_leak_variable)
  #ifdef ZEND_TEST_EXCEPTIONS
ZEND_FE(crash,  NULL)
  #endif
@@@ -285,7 -262,6 +285,7 @@@
ZEND_FE(set_exception_handler,  arginfo_set_exception_handler)
ZEND_FE(restore_exception_handler,  arginfo_zend__void)
ZEND_FE(get_declared_classes,   arginfo_zend__void)
 +  ZEND_FE(get_declared_traits,arginfo_zend__void)
ZEND_FE(get_declared_interfaces,arginfo_zend__void)
ZEND_FE(get_defined_functions,  arginfo_zend__void)
ZEND_FE(get_defined_vars,   arginfo_zend__void)
@@@ -296,7 -272,7 +296,7 @@@
ZEND_FE(get_extension_funcs,arginfo_extension_loaded)
ZEND_FE(get_defined_constants,  arginfo_get_defined_constants)
ZEND_FE(debug_backtrace,arginfo_debug_backtrace)
 -  ZEND_FE(debug_print_backtrace,  arginfo_debug_backtrace)
 +  ZEND_FE(debug_print_backtrace,  arginfo_debug_print_backtrace)
  #if ZEND_DEBUG
ZEND_FE(zend_test_func, NULL)
  #ifdef ZTS
@@@ -706,10 -682,7 +706,10 @@@ repeat
zval_ptr_dtor(val_free);
}
c.flags = case_sensitive; /* non persistent */
 -  c.name = zend_strndup(name, name_len);
 +  c.name = IS_INTERNED(name) ? name : zend_strndup(name, name_len);
 + 

[PHP-CVS] com php-src: Revert Merge from PHP-5.4: Zend/zend_builtin_functions.c

2012-03-24 Thread Xinchen Hui
Commit:2d21149743c8ef52e5fdf62da18a1a903c09670a
Author:Xinchen Hui larue...@gmail.com Sat, 24 Mar 2012 19:25:21 
+0800
Parents:   fcae164ea63979d7814d7aa114fe8351033e7400
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=2d21149743c8ef52e5fdf62da18a1a903c09670a

Log:
Revert Merge from PHP-5.4

This reverts commit 9a87fe1c529eabc7aeec4559d916dda5fda3cdd2.

Changed paths:
  M  Zend/zend_builtin_functions.c


Diff:
2d21149743c8ef52e5fdf62da18a1a903c09670a
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index c4a10fd..ce54f4e 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1488,42 +1488,41 @@ ZEND_FUNCTION(set_exception_handler)
 {
zval *exception_handler;
char *exception_handler_name = NULL;
+   zend_bool had_orig_exception_handler=0;
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, z, 
exception_handler) == FAILURE) {
return;
}
 
if (Z_TYPE_P(exception_handler) != IS_NULL) { /* NULL == unset */
-   zend_bool had_orig_exception_handler = 0;
-
if (!zend_is_callable(exception_handler, 0, 
exception_handler_name TSRMLS_CC)) {
zend_error(E_WARNING, %s() expects the argument (%s) 
to be a valid callback,
-   get_active_function_name(TSRMLS_C), 
exception_handler_name?exception_handler_name:unknown);
+  get_active_function_name(TSRMLS_C), 
exception_handler_name?exception_handler_name:unknown);
efree(exception_handler_name);
return;
}
efree(exception_handler_name);
+   }
 
-   if (EG(user_exception_handler)) {
-   had_orig_exception_handler = 1;
-   *return_value = *EG(user_exception_handler);
-   zval_copy_ctor(return_value);
-   zend_ptr_stack_push(EG(user_exception_handlers), 
EG(user_exception_handler));
-   }
-
-   ALLOC_ZVAL(EG(user_exception_handler));
-   MAKE_COPY_ZVAL(exception_handler, EG(user_exception_handler));
+   if (EG(user_exception_handler)) {
+   had_orig_exception_handler = 1;
+   *return_value = *EG(user_exception_handler);
+   zval_copy_ctor(return_value);
+   zend_ptr_stack_push(EG(user_exception_handlers), 
EG(user_exception_handler));
+   }
+   ALLOC_ZVAL(EG(user_exception_handler));
 
-   if (!had_orig_exception_handler) {
-   RETURN_NULL();
-   }
-   } else {
-   if (EG(user_exception_handler)) {
-   zend_ptr_stack_push(EG(user_exception_handlers), 
EG(user_exception_handler));
-   }
+   if (Z_TYPE_P(exception_handler) == IS_NULL) { /* unset user-defined 
handler */
+   FREE_ZVAL(EG(user_exception_handler));
EG(user_exception_handler) = NULL;
RETURN_TRUE;
}
+
+   MAKE_COPY_ZVAL(exception_handler, EG(user_exception_handler))
+
+   if (!had_orig_exception_handler) {
+   RETURN_NULL();
+   }
 }
 /* }}} */


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



[PHP-CVS] com php-src: Improve set_exception_handler while doing reset: NEWS Zend/zend_builtin_functions.c

2012-03-24 Thread Xinchen Hui
Commit:d8f8e98d8e0493adf1fae622595bd3435bdbf835
Author:Xinchen Hui larue...@gmail.com Sat, 24 Mar 2012 19:38:40 
+0800
Parents:   aa7cdcd13daca902a2b6995ff2e02acc57152cb3
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=d8f8e98d8e0493adf1fae622595bd3435bdbf835

Log:
Improve set_exception_handler while doing reset

Changed paths:
  M  NEWS
  M  Zend/zend_builtin_functions.c


Diff:
d8f8e98d8e0493adf1fae622595bd3435bdbf835
diff --git a/NEWS b/NEWS
index b945eff..9f1d520 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ PHP 
   NEWS
 - General improvements:
   . Drop Windows XP and 2003 support. (Pierre)
   . World domination
+  . Improve set_exception_handler while doing reset.(Laruence)
 
 - cURL:
   . Added support for CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_APPEND, 
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index eab98ed..29f9ed3 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1585,41 +1585,42 @@ ZEND_FUNCTION(set_exception_handler)
 {
zval *exception_handler;
char *exception_handler_name = NULL;
-   zend_bool had_orig_exception_handler=0;
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, z, 
exception_handler) == FAILURE) {
return;
}
 
if (Z_TYPE_P(exception_handler) != IS_NULL) { /* NULL == unset */
+   zend_bool had_orig_exception_handler = 0;
+
if (!zend_is_callable(exception_handler, 0, 
exception_handler_name TSRMLS_CC)) {
zend_error(E_WARNING, %s() expects the argument (%s) 
to be a valid callback,
-  get_active_function_name(TSRMLS_C), 
exception_handler_name?exception_handler_name:unknown);
+   get_active_function_name(TSRMLS_C), 
exception_handler_name?exception_handler_name:unknown);
efree(exception_handler_name);
return;
}
efree(exception_handler_name);
-   }
 
-   if (EG(user_exception_handler)) {
-   had_orig_exception_handler = 1;
-   *return_value = *EG(user_exception_handler);
-   zval_copy_ctor(return_value);
-   zend_ptr_stack_push(EG(user_exception_handlers), 
EG(user_exception_handler));
-   }
-   ALLOC_ZVAL(EG(user_exception_handler));
+   if (EG(user_exception_handler)) {
+   had_orig_exception_handler = 1;
+   *return_value = *EG(user_exception_handler);
+   zval_copy_ctor(return_value);
+   zend_ptr_stack_push(EG(user_exception_handlers), 
EG(user_exception_handler));
+   }
+
+   ALLOC_ZVAL(EG(user_exception_handler));
+   MAKE_COPY_ZVAL(exception_handler, EG(user_exception_handler));
 
-   if (Z_TYPE_P(exception_handler) == IS_NULL) { /* unset user-defined 
handler */
-   FREE_ZVAL(EG(user_exception_handler));
+   if (!had_orig_exception_handler) {
+   RETURN_NULL();
+   }
+   } else {
+   if (EG(user_exception_handler)) {
+   zend_ptr_stack_push(EG(user_exception_handlers), 
EG(user_exception_handler));
+   }
EG(user_exception_handler) = NULL;
RETURN_TRUE;
}
-
-   MAKE_COPY_ZVAL(exception_handler, EG(user_exception_handler))
-
-   if (!had_orig_exception_handler) {
-   RETURN_NULL();
-   }
 }
 /* }}} */


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



[PHP-CVS] com php-src: Implemented FR #60738 (Allow 'set_error_handler' to handle NULL): NEWS Zend/tests/bug60738.phpt Zend/zend_builtin_functions.c

2012-03-24 Thread Xinchen Hui
Commit:6ba2e662e447f369c6e7686e8b39dde033fd5334
Author:Xinchen Hui larue...@gmail.com Sat, 24 Mar 2012 19:41:11 
+0800
Parents:   d8f8e98d8e0493adf1fae622595bd3435bdbf835
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=6ba2e662e447f369c6e7686e8b39dde033fd5334

Log:
Implemented FR #60738 (Allow 'set_error_handler' to handle NULL)

The previous commit was reverted as Stas ask, so only commit this
to Truk now.

Bugs:
https://bugs.php.net/60738

Changed paths:
  M  NEWS
  A  Zend/tests/bug60738.phpt
  M  Zend/zend_builtin_functions.c


Diff:
6ba2e662e447f369c6e7686e8b39dde033fd5334
diff --git a/NEWS b/NEWS
index 9f1d520..089d080 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,10 @@ PHP
NEWS
   . World domination
   . Improve set_exception_handler while doing reset.(Laruence)
 
+- Core:
+  . Implemented FR #60738 (Allow 'set_error_handler' to handle NULL).
+(Laruence, Nikita Popov)
+
 - cURL:
   . Added support for CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPT_APPEND, 
 CURLOPT_DIRLISTONLY, CURLOPT_NEW_DIRECTORY_PERMS, CURLOPT_NEW_FILE_PERMS, 
diff --git a/Zend/tests/bug60738.phpt b/Zend/tests/bug60738.phpt
new file mode 100644
index 000..e0c9793
--- /dev/null
+++ b/Zend/tests/bug60738.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #60738 Allow 'set_error_handler' to handle NULL
+--FILE--
+?php
+
+set_error_handler(function() { echo 'Intercepted error!', \n; });
+
+trigger_error('Error!');
+
+set_error_handler(null);
+
+trigger_error('Error!');
+?
+--EXPECTF--
+Intercepted error!
+
+Notice: Error! in %s on line %d
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 29f9ed3..f8d4674 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1512,7 +1512,6 @@ ZEND_FUNCTION(trigger_error)
 ZEND_FUNCTION(set_error_handler)
 {
zval *error_handler;
-   zend_bool had_orig_error_handler=0;
char *error_handler_name = NULL;
long error_type = E_ALL;
 
@@ -1520,37 +1519,40 @@ ZEND_FUNCTION(set_error_handler)
return;
}
 
-   if (!zend_is_callable(error_handler, 0, error_handler_name TSRMLS_CC)) 
{
-   zend_error(E_WARNING, %s() expects the argument (%s) to be a 
valid callback,
-  get_active_function_name(TSRMLS_C), 
error_handler_name?error_handler_name:unknown);
+   if (IS_NULL != Z_TYPE_P(error_handler)) {
+   zend_bool had_orig_error_handler = 0;
+   if (!zend_is_callable(error_handler, 0, error_handler_name 
TSRMLS_CC)) {
+   zend_error(E_WARNING, %s() expects the argument (%s) 
to be a valid callback,
+   get_active_function_name(TSRMLS_C), 
error_handler_name?error_handler_name:unknown);
+   efree(error_handler_name);
+   return;
+   }
efree(error_handler_name);
-   return;
-   }
-   efree(error_handler_name);
 
-   if (EG(user_error_handler)) {
-   had_orig_error_handler = 1;
-   *return_value = *EG(user_error_handler);
-   zval_copy_ctor(return_value);
-   INIT_PZVAL(return_value);
-   zend_stack_push(EG(user_error_handlers_error_reporting), 
EG(user_error_handler_error_reporting), 
sizeof(EG(user_error_handler_error_reporting)));
-   zend_ptr_stack_push(EG(user_error_handlers), 
EG(user_error_handler));
-   }
-   ALLOC_ZVAL(EG(user_error_handler));
+   if (EG(user_error_handler)) {
+   had_orig_error_handler = 1;
+   *return_value = *EG(user_error_handler);
+   zval_copy_ctor(return_value);
+   INIT_PZVAL(return_value);
+   
zend_stack_push(EG(user_error_handlers_error_reporting), 
EG(user_error_handler_error_reporting), 
sizeof(EG(user_error_handler_error_reporting)));
+   zend_ptr_stack_push(EG(user_error_handlers), 
EG(user_error_handler));
+   }
 
-   if (!zend_is_true(error_handler)) { /* unset user-defined handler */
-   FREE_ZVAL(EG(user_error_handler));
-   EG(user_error_handler) = NULL;
-   RETURN_TRUE;
-   }
+   ALLOC_ZVAL(EG(user_error_handler));
+   EG(user_error_handler_error_reporting) = (int)error_type;
+   MAKE_COPY_ZVAL(error_handler, EG(user_error_handler));
 
-   EG(user_error_handler_error_reporting) = (int)error_type;
-   *EG(user_error_handler) = *error_handler;
-   zval_copy_ctor(EG(user_error_handler));
-   INIT_PZVAL(EG(user_error_handler));
+   if (!had_orig_error_handler) {
+   RETURN_NULL();
+   }
+   } else { /* unset user-defined handler */
+   if (EG(user_error_handler)) {
+ 

Re: [PHP-CVS] com php-src: Fix NEWS: NEWS

2012-03-24 Thread Johannes Schlüter
On Sat, 2012-03-24 at 07:59 +0100, Michael Wallner wrote:
 Looks like the commit/mail script still does some superfluous html
 entitiy encoding:

No it's not the mail script ;-)

master.php.net has filter.default=full_special_chars so when storing my
name it is automatically escaped and the escaped form is stored in the
DB. The mail script simply takes it from there.

I see three ways to fix it:

  * Use special_chars, not full_special_chars a filter, should be
safe enough
  * Use html_entity_decode() in the mail script, this feels like a
hack
  * Store unescaped data in the DB and escape (everywhere) where it
is used (I don't think we can successfully do that)

In my opinion the first option is the best. Could anybody with the
needed powers look into that?

Thanks,
johannes



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



Re: [PHP-CVS] com php-src: Fix NEWS: NEWS

2012-03-24 Thread Alexander Moskaliov
Hi!
Some names (like your) already stored in DB in esacaped variant.
But some other names not escaped in this DB file, but still escaped
after my mail script.
May be by mailing list.

With regards, Alexander Moskaliov
ir...@irker.net



2012/3/24 Johannes Schlüter johan...@php.net:
 On Sat, 2012-03-24 at 07:59 +0100, Michael Wallner wrote:
 Looks like the commit/mail script still does some superfluous html
 entitiy encoding:

 No it's not the mail script ;-)

 master.php.net has filter.default=full_special_chars so when storing my
 name it is automatically escaped and the escaped form is stored in the
 DB. The mail script simply takes it from there.

 I see three ways to fix it:

      * Use special_chars, not full_special_chars a filter, should be
        safe enough
      * Use html_entity_decode() in the mail script, this feels like a
        hack
      * Store unescaped data in the DB and escape (everywhere) where it
        is used (I don't think we can successfully do that)

 In my opinion the first option is the best. Could anybody with the
 needed powers look into that?

 Thanks,
 johannes



 --
 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] com php-src: Revert incorrect fix: NEWS ext/soap/php_http.c

2012-03-24 Thread Ilia Alshanetsky
Commit:8d0760f38a9d3dabb3a31d1d47f85827d27d0db4
Author:Ilia Alshanetsky il...@php.net Sat, 24 Mar 2012 12:27:55 
-0400
Parents:   cb54532b7f63fb9f223e3b39116db86191d6bafe
Branches:  PHP-5.3

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=8d0760f38a9d3dabb3a31d1d47f85827d27d0db4

Log:
Revert incorrect fix

Changed paths:
  M  NEWS
  M  ext/soap/php_http.c


Diff:
8d0760f38a9d3dabb3a31d1d47f85827d27d0db4
diff --git a/NEWS b/NEWS
index fa36358..d278883 100644
--- a/NEWS
+++ b/NEWS
@@ -93,7 +93,6 @@ PHP   
 NEWS
 
 - SOAP
   . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry)
-  . Fixed bug #61423 (gzip compression fails). (Ilia)
   . Fixed bug #60887 (SoapClient ignores user_agent option and sends no
 User-Agent header). (carloschilazo at gmail dot com)
   . Fixed bug #60842, #51775 (Chunked response parsing error when 
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index 610c161..358877d 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -336,7 +336,7 @@ int make_http_soap_request(zval  *this_ptr,
  n = 3;
ZVAL_STRING(func, gzencode, 0);

smart_str_append_const(soap_headers_z,Content-Encoding: gzip\r\n);
-   ZVAL_LONG(params[2], 0x1f);
+   ZVAL_LONG(params[2], 1);
}
if (call_user_function(CG(function_table), 
(zval**)NULL, func, retval, n, params TSRMLS_CC) == SUCCESS 
Z_TYPE(retval) == IS_STRING) {


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: configure.in ext/soap/php_http.c

2012-03-24 Thread Hannes Magnusson
Commit:7a1c76538541e74719faf2311d72a70acd3c01e4
Author:Hannes Magnusson bj...@php.net Sat, 24 Mar 2012 17:20:14 
+0100
Parents:   69b647c43be5729337024abdc6bf8565a1aa9a5b 
4fc4dd8760ddd8a53df9b59921093cc6b523154e
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=7a1c76538541e74719faf2311d72a70acd3c01e4

Log:
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  This is a git checkout
  Revert incorrect fix

Changed paths:
  MM  configure.in
  MM  ext/soap/php_http.c

7a1c76538541e74719faf2311d72a70acd3c01e4
diff --combined configure.in
index 0a6fcd1,d3f96b0..49a88b1
--- a/configure.in
+++ b/configure.in
@@@ -1,6 -1,28 +1,6 @@@
  ## $Id$ -*- autoconf -*-
  dnl ## Process this file with autoconf to produce a configure script.
  
 -divert(1)
 -
 -dnl ## Diversion 1 is the autoconf + automake setup phase. We also
 -dnl ## set the PHP version, deal with platform-specific compile
 -dnl ## options and check for the basic compile tools.
 -
 -dnl ## Diversion 2 is the initial checking of OS features, programs,
 -dnl ## libraries and so on.
 -
 -dnl ## In diversion 3 we check for compile-time options to the PHP
 -dnl ## core and how to deal with different system dependencies. 
 -dnl ## This includes whether debugging or short tags are enabled
 -dnl ## and the default behaviour of php.ini options.
 -dnl ## This is also where an SAPI interface is selected (choosing between
 -dnl ## Apache module, CGI etc.)
 -
 -dnl ## In diversion 4 we check user-configurable general settings.
 -
 -dnl ## In diversion 5 we check which extensions should be compiled.
 -dnl ## All of these are normally in the extension directories.
 -dnl ## Diversion 5 is the last one.  Here we generate files and clean up.
 -
  dnl include Zend specific macro definitions first
  dnl -
  sinclude(Zend/acinclude.m4)
@@@ -8,119 -30,19 +8,119 @@@
  dnl Basic autoconf + automake initialization, generation of config.nice.
  dnl -
  
 -AC_PREREQ(2.13)
 +AC_PREREQ(2.59)
  AC_INIT(README.SVN-RULES)
 +ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
  
  PHP_CONFIG_NICE(config.nice)
  
  PHP_CANONICAL_HOST_TARGET
  
  AC_CONFIG_HEADER(main/php_config.h)
 +AH_TOP([
 +#if defined(__GNUC__)  __GNUC__ = 4
 +# define ZEND_API __attribute__ ((visibility(default)))
 +# define ZEND_DLEXPORT __attribute__ ((visibility(default)))
 +#else
 +# define ZEND_API
 +# define ZEND_DLEXPORT
 +#endif
 +
 +#define ZEND_DLIMPORT
 +
 +#undef uint
 +#undef ulong
 +
 +/* Define if you want to enable memory limit support */
 +#define MEMORY_LIMIT 0
 +])
 +AH_BOTTOM([
 +#ifndef ZEND_ACCONFIG_H_NO_C_PROTOS
 +
 +#ifdef HAVE_STDLIB_H
 +# include stdlib.h
 +#endif
 +
 +#ifdef HAVE_SYS_TYPES_H
 +# include sys/types.h
 +#endif
 +
 +#ifdef HAVE_SYS_SELECT_H
 +#include sys/select.h
 +#endif
 +
 +#ifdef HAVE_IEEEFP_H
 +# include ieeefp.h
 +#endif
 +
 +#ifdef HAVE_STRING_H
 +# include string.h
 +#else
 +# include strings.h
 +#endif
 +
 +#if ZEND_BROKEN_SPRINTF
 +int zend_sprintf(char *buffer, const char *format, ...);
 +#else
 +# define zend_sprintf sprintf
 +#endif
 +
 +#include math.h
 +
 +/* To enable the is_nan, is_infinite and is_finite PHP functions */
 +#ifdef NETWARE
 +  #define HAVE_ISNAN 1
 +  #define HAVE_ISINF 1
 +  #define HAVE_ISFINITE 1
 +#endif
 +
 +#ifndef zend_isnan
 +#ifdef HAVE_ISNAN
 +#define zend_isnan(a) isnan(a)
 +#elif defined(HAVE_FPCLASS)
 +#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
 +#else
 +#define zend_isnan(a) 0
 +#endif
 +#endif
 +
 +#ifdef HAVE_ISINF
 +#define zend_isinf(a) isinf(a)
 +#elif defined(INFINITY)
 +/* Might not work, but is required by ISO C99 */
 +#define zend_isinf(a) (((a)==INFINITY)?1:0)
 +#elif defined(HAVE_FPCLASS)
 +#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
 +#else
 +#define zend_isinf(a) 0
 +#endif
 +
 +#ifdef HAVE_FINITE
 +#define zend_finite(a) finite(a)
 +#elif defined(HAVE_ISFINITE) || defined(isfinite)
 +#define zend_finite(a) isfinite(a)
 +#elif defined(fpclassify)
 +#define zend_finite(a) 
((fpclassify((a))!=FP_INFINITEfpclassify((a))!=FP_NAN)?1:0)
 +#else
 +#define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1)
 +#endif
 +
 +#endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */
 +
 +#ifdef NETWARE
 +#ifdef USE_WINSOCK
 +#/*This detection against winsock is of no use*/ undef HAVE_SOCKLEN_T
 +#/*This detection against winsock is of no use*/ undef HAVE_SYS_SOCKET_H
 +#endif
 +#endif
 +
 +#undef PTHREADS
 +])
  
  PHP_MAJOR_VERSION=5
 -PHP_MINOR_VERSION=3
 -PHP_RELEASE_VERSION=11
 -PHP_EXTRA_VERSION=-dev
 +PHP_MINOR_VERSION=4
 +PHP_RELEASE_VERSION=1
 +PHP_EXTRA_VERSION=RC1-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-CVS] com php-src: This is a git checkout: configure.in

2012-03-24 Thread Hannes Magnusson
Commit:4fc4dd8760ddd8a53df9b59921093cc6b523154e
Author:Hannes Magnusson bj...@php.net Sat, 24 Mar 2012 17:16:50 
+0100
Parents:   8d0760f38a9d3dabb3a31d1d47f85827d27d0db4
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=4fc4dd8760ddd8a53df9b59921093cc6b523154e

Log:
This is a git checkout

Changed paths:
  M  configure.in


Diff:
4fc4dd8760ddd8a53df9b59921093cc6b523154e
diff --git a/configure.in b/configure.in
index 8f579ef..d3f96b0 100644
--- a/configure.in
+++ b/configure.in
@@ -155,7 +155,7 @@ dnl Check if bison generated files exist when bison does 
not..
 case $php_cv_bison_version in
   |invalid[)]
 if ! test -f $abs_srcdir/Zend/zend_language_parser.h || ! test -f 
$abs_srcdir/Zend/zend_language_parser.c ; then
-  AC_MSG_ERROR([bison is required to build PHP/Zend when building a SVN 
checkout!])
+  AC_MSG_ERROR([bison is required to build PHP/Zend when building a GIT 
checkout!])
 fi
 ;;
 esac


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.4': configure.in

2012-03-24 Thread Hannes Magnusson
Commit:54d82a962c635e4b355462c77bfbc244b4351702
Author:Hannes Magnusson bj...@php.net Sat, 24 Mar 2012 17:20:36 
+0100
Parents:   1772a5a2e3c41baf39461e6da236b3289914c07c 
7a1c76538541e74719faf2311d72a70acd3c01e4
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=54d82a962c635e4b355462c77bfbc244b4351702

Log:
Merge branch 'PHP-5.4'

* PHP-5.4:
  This is a git checkout
  Revert incorrect fix

Changed paths:
  MM  configure.in


Diff:
54d82a962c635e4b355462c77bfbc244b4351702
diff --combined configure.in
index 69a13df,49a88b1..37441ee
--- a/configure.in
+++ b/configure.in
@@@ -118,9 -118,9 +118,9 @@@ int zend_sprintf(char *buffer, const ch
  ])
  
  PHP_MAJOR_VERSION=5
 -PHP_MINOR_VERSION=4
 -PHP_RELEASE_VERSION=1
 -PHP_EXTRA_VERSION=RC1-dev
 +PHP_MINOR_VERSION=5
 +PHP_RELEASE_VERSION=0
 +PHP_EXTRA_VERSION=-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`
  
@@@ -233,7 -233,7 +233,7 @@@ dnl Check if bison generated files exis
  case $php_cv_bison_version in
|invalid[)]
  if ! test -f $abs_srcdir/Zend/zend_language_parser.h || ! test -f 
$abs_srcdir/Zend/zend_language_parser.c ; then
-   AC_MSG_ERROR([bison is required to build PHP/Zend when building a SVN 
checkout!])
+   AC_MSG_ERROR([bison is required to build PHP/Zend when building a GIT 
checkout!])
  fi
  ;;
  esac
@@@ -784,7 -784,7 +784,7 @@@ if test $PHP_GCOV = yes; the
  AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. 
You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
fi

 -  ltp_version_list=1.5 1.6 1.7
 +  ltp_version_list=1.5 1.6 1.7 1.9
  
AC_CHECK_PROG(LTP, lcov, lcov)
AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
@@@ -1587,9 -1587,9 +1587,9 @@@ cat 
  X
fi
  
 -  if test $PHP_SAPI = apache2handler || test $PHP_SAPI = 
apache2filter; then
 -if test $APACHE_VERSION -ge 2004001; then
 -  if test -z $APACHE_THREADED_MPM; then
 +if test $PHP_SAPI = apache2handler || test $PHP_SAPI = 
apache2filter; then
 +  if test $APACHE_VERSION -ge 2004001; then
 +if test -z $APACHE_THREADED_MPM; then
  cat X
  ++
  |*** WARNING *** |
@@@ -1598,9 -1598,9 +1598,9 @@@
  | If you change Apache to use a threaded MPM you must reconfigure|
  | PHP with --enable-maintainer-zts   |
  X
 +fi
fi
  fi
 -  fi
  
# Warn about linking Apache with libpthread if oci8 extension is enabled on 
linux.
if test $PHP_OCI8 != no; then


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



[PHP-CVS] com php-src: Fix test on FreeBSD and other systems that have /etc/services: ext/standard/tests/general_functions/getservbyport_basic.phpt

2012-03-24 Thread Hannes Magnusson
Commit:948d326b294becccf1e1a34851bce380f2381b96
Author:Hannes Magnusson bj...@php.net Sat, 24 Mar 2012 17:58:40 
+0100
Parents:   4fc4dd8760ddd8a53df9b59921093cc6b523154e
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=948d326b294becccf1e1a34851bce380f2381b96

Log:
Fix test on FreeBSD and other systems that have /etc/services

Changed paths:
  M  ext/standard/tests/general_functions/getservbyport_basic.phpt


Diff:
948d326b294becccf1e1a34851bce380f2381b96
diff --git a/ext/standard/tests/general_functions/getservbyport_basic.phpt 
b/ext/standard/tests/general_functions/getservbyport_basic.phpt
index 1695455..b9e0f83 100644
--- a/ext/standard/tests/general_functions/getservbyport_basic.phpt
+++ b/ext/standard/tests/general_functions/getservbyport_basic.phpt
@@ -7,8 +7,9 @@ Michele Orselli (m...@ideato.it)
 Simone Gentili (sensora...@gmail.com)
 --FILE--
 ?php
-   if(stristr(PHP_OS, linux)) $file = /etc/services;
-   elseif(stristr(PHP_OS, Darwin)) $file = /etc/services;
+   if (file_exists(/etc/services)) {
+   $file = /etc/services;
+   }
elseif(substr(PHP_OS,0,3) == WIN) $file = 
C:/WINDOWS/system32/drivers/etc/services;
else die(PHP_OS.  unsupported);


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



Re: [PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: configure.in ext/soap/php_http.c

2012-03-24 Thread Hannes Magnusson
On Sat, Mar 24, 2012 at 17:20, Hannes Magnusson bj...@php.net wrote:
 Commit:    7a1c76538541e74719faf2311d72a70acd3c01e4
 Author:    Hannes Magnusson bj...@php.net         Sat, 24 Mar 2012 17:20:14 
 +0100
 Parents:   69b647c43be5729337024abdc6bf8565a1aa9a5b 
 4fc4dd8760ddd8a53df9b59921093cc6b523154e
 Branches:  PHP-5.4 master

 Link:       
 http://git.php.net/?p=php-src.git;a=commitdiff;h=7a1c76538541e74719faf2311d72a70acd3c01e4

 Log:
 Merge branch 'PHP-5.3' into PHP-5.4

 * PHP-5.3:
  This is a git checkout
  Revert incorrect fix

 Changed paths:
  MM  configure.in
  MM  ext/soap/php_http.c


I only touched bison error message line in configure.in.. I don't know
where the rest of the billion line changes from configure.in came from
(I did as the workflow wiki recommends; git merge --no-ff --log
PHP-5.3).
As for the revert incorrect fix commit, it looks like ilia only
reverted it in the 5.3 branch, forgetting the others -  don't know if
that was intentional?

I'm a bit unsure if I fckd stuff up here, if the mails are just weird
(and the attached gigantic patch), or the wiki is simply wrong.

David  Alexendar, could you please check it out?

-Hannes

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



[PHP-CVS] com php-src: Remove unused variable: ext/pdo_mysql/mysql_statement.c

2012-03-24 Thread Pierrick Charron
Commit:da2da13f935b2775635cd21b47a78fbf025a462d
Author:Pierrick Charron pierr...@webstart.fr Sat, 24 Mar 2012 
17:49:58 -0400
Parents:   948d326b294becccf1e1a34851bce380f2381b96
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=da2da13f935b2775635cd21b47a78fbf025a462d

Log:
Remove unused variable

Changed paths:
  M  ext/pdo_mysql/mysql_statement.c


Diff:
da2da13f935b2775635cd21b47a78fbf025a462d
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c
index c4d322f..115e74c 100755
--- a/ext/pdo_mysql/mysql_statement.c
+++ b/ext/pdo_mysql/mysql_statement.c
@@ -322,7 +322,6 @@ static int pdo_mysql_stmt_execute(pdo_stmt_t *stmt 
TSRMLS_DC) /* {{{ */
 {
pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt-driver_data;
pdo_mysql_db_handle *H = S-H;
-   my_ulonglong row_count;
PDO_DBG_ENTER(pdo_mysql_stmt_execute);
PDO_DBG_INF_FMT(stmt=%p, S-stmt);


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/pdo_mysql/mysql_statement.c

2012-03-24 Thread Pierrick Charron
Commit:7f05a39fce42029c126d6dc315ffdad43d27c8e9
Author:Pierrick Charron pierr...@php.net Sat, 24 Mar 2012 
17:59:46 -0400
Parents:   10809686f0dbcbbf0eb06c968d65e0febe1dc034 
da2da13f935b2775635cd21b47a78fbf025a462d
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=7f05a39fce42029c126d6dc315ffdad43d27c8e9

Log:
Merge branch 'PHP-5.3' into PHP-5.4

Changed paths:
  MM  ext/pdo_mysql/mysql_statement.c


Diff:
7f05a39fce42029c126d6dc315ffdad43d27c8e9
diff --combined ext/pdo_mysql/mysql_statement.c
index 20e67e4,115e74c..0c2689f
--- a/ext/pdo_mysql/mysql_statement.c
+++ b/ext/pdo_mysql/mysql_statement.c
@@@ -59,10 -59,12 +59,10 @@@ static int pdo_mysql_stmt_dtor(pdo_stmt
pefree(S-einfo.errmsg, stmt-dbh-is_persistent);
S-einfo.errmsg = NULL;
}
 -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND
if (S-stmt) {
pdo_mysql_stmt_close(S-stmt);
S-stmt = NULL;
}
 -#endif /* HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND */
  
  #ifndef PDO_USE_MYSQLND
if (S-params) {
@@@ -75,6 -77,9 +75,6 @@@
efree(S-in_length);
}
  
 -#endif /* PDO_USE_MYSQLND */
 -
 -#ifdef HAVE_MYSQL_STMT_PREPARE
if (S-bound_result) 
{
int i;
@@@ -86,9 -91,10 +86,9 @@@
efree(S-out_null);
efree(S-out_length);
}
 -#endif /* HAVE_MYSQL_STMT_PREPARE */
 +#endif
  
  
 -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND
if (S-H-server) {
while (mysql_more_results(S-H-server)) {
MYSQL_RES *res;
@@@ -101,8 -107,8 +101,8 @@@
mysql_free_result(res);
}
}
 -  }   
 -#endif /* HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND */
 +  }
 +
  #if PDO_USE_MYSQLND
if (!S-stmt  S-current_data) {
mnd_free(S-current_data);
@@@ -158,7 -164,7 +158,7 @@@ static int pdo_mysql_fill_stmt_from_res
  }
  /* }}} */
  
 -#ifdef HAVE_MYSQL_STMT_PREPARE
 +#ifndef PDO_USE_MYSQLND
  static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt 
TSRMLS_DC) /* {{{ */
  {
pdo_mysql_stmt *S = stmt-driver_data;
@@@ -316,13 -322,14 +316,12 @@@ static int pdo_mysql_stmt_execute(pdo_s
  {
pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt-driver_data;
pdo_mysql_db_handle *H = S-H;
PDO_DBG_ENTER(pdo_mysql_stmt_execute);
PDO_DBG_INF_FMT(stmt=%p, S-stmt);
  
if (S-stmt) {
PDO_DBG_RETURN(pdo_mysql_stmt_execute_prepared(stmt));
}
 -#endif

/* ensure that we free any previous unfetched results */
if (S-result) {
@@@ -341,6 -348,7 +340,6 @@@
  
  static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
  {
 -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND
pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt-driver_data;
pdo_mysql_db_handle *H = S-H;
long row_count;
@@@ -402,7 -410,7 +401,7 @@@
  #endif
  
  /* ensure that we free any previous unfetched results */
 -#if HAVE_MYSQL_STMT_PREPARE
 +#ifndef PDO_USE_MYSQLND
if (S-stmt) {
stmt-column_count = (int)mysql_num_fields(S-result);
mysql_stmt_free_result(S-stmt);
@@@ -424,6 -432,10 +423,6 @@@
} else {
PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt TSRMLS_CC));
}
 -#else
 -  strcpy(stmt-error_code, HYC00);
 -  PDO_DBG_RETURN(0);
 -#endif /* HAVE_MYSQL_STMT_PREPARE */
  }
  /* }}} */
  
@@@ -445,6 -457,7 +444,6 @@@ static int pdo_mysql_stmt_param_hook(pd
  #ifndef PDO_USE_MYSQLND
PDO_MYSQL_PARAM_BIND *b;
  #endif
 -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND
pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt-driver_data; 
  
PDO_DBG_ENTER(pdo_mysql_stmt_param_hook);
@@@ -576,7 -589,7 +575,7 @@@
break;
}
}
 -#endif /* HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND */
 +
PDO_DBG_RETURN(1);
  }
  /* }}} */
@@@ -597,6 -610,7 +596,6 @@@ static int pdo_mysql_stmt_fetch(pdo_stm
PDO_DBG_RETURN(1);
}
  #else
 -# if HAVE_MYSQL_STMT_PREPARE
int ret;

if (S-stmt) {
@@@ -617,6 -631,7 +616,6 @@@
  
PDO_DBG_RETURN(1);
}
 -# endif /* HAVE_MYSQL_STMT_PREPARE */
  #endif /* PDO_USE_MYSQLND */

if (!S-result) {
@@@ -707,12 -722,15 +706,12 @@@ static int pdo_mysql_stmt_get_col(pdo_s
}
  
/* With mysqlnd data is stored inside mysqlnd, not S-current_data */
 -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND
if (!S-stmt) {
if (S-current_data == NULL || !S-result) {
PDO_DBG_RETURN(0);
}
 -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND
}
 -#endif
 +
if (colno = stmt-column_count) {
/* error invalid column */

Re: [PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/pdo_mysql/mysql_statement.c

2012-03-24 Thread Pierrick Charron
Hmmm I think I have the same issue as Hannes. All those changes are not the
one I did on the 5.3 branch.
Any clue on how to deal with that ?

Thanks
Pierrick

On 24 March 2012 17:59, Pierrick Charron pierr...@php.net wrote:

 Commit:7f05a39fce42029c126d6dc315ffdad43d27c8e9
 Author:Pierrick Charron pierr...@php.net Sat, 24 Mar 2012
 17:59:46 -0400
 Parents:   10809686f0dbcbbf0eb06c968d65e0febe1dc034
 da2da13f935b2775635cd21b47a78fbf025a462d
 Branches:  PHP-5.4 master

 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=7f05a39fce42029c126d6dc315ffdad43d27c8e9

 Log:
 Merge branch 'PHP-5.3' into PHP-5.4

 Changed paths:
  MM  ext/pdo_mysql/mysql_statement.c


 Diff:
 7f05a39fce42029c126d6dc315ffdad43d27c8e9
 diff --combined ext/pdo_mysql/mysql_statement.c
 index 20e67e4,115e74c..0c2689f
 --- a/ext/pdo_mysql/mysql_statement.c
 +++ b/ext/pdo_mysql/mysql_statement.c
 @@@ -59,10 -59,12 +59,10 @@@ static int pdo_mysql_stmt_dtor(pdo_stmt
pefree(S-einfo.errmsg, stmt-dbh-is_persistent);
S-einfo.errmsg = NULL;
}
  -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND
if (S-stmt) {
pdo_mysql_stmt_close(S-stmt);
S-stmt = NULL;
}
  -#endif /* HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND */

  #ifndef PDO_USE_MYSQLND
if (S-params) {
 @@@ -75,6 -77,9 +75,6 @@@
efree(S-in_length);
}

  -#endif /* PDO_USE_MYSQLND */
  -
  -#ifdef HAVE_MYSQL_STMT_PREPARE
if (S-bound_result)
{
int i;
 @@@ -86,9 -91,10 +86,9 @@@
efree(S-out_null);
efree(S-out_length);
}
  -#endif /* HAVE_MYSQL_STMT_PREPARE */
  +#endif


  -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND
if (S-H-server) {
while (mysql_more_results(S-H-server)) {
MYSQL_RES *res;
 @@@ -101,8 -107,8 +101,8 @@@
mysql_free_result(res);
}
}
  -  }
  -#endif /* HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND */
  +  }
  +
  #if PDO_USE_MYSQLND
if (!S-stmt  S-current_data) {
mnd_free(S-current_data);
 @@@ -158,7 -164,7 +158,7 @@@ static int pdo_mysql_fill_stmt_from_res
  }
  /* }}} */

  -#ifdef HAVE_MYSQL_STMT_PREPARE
  +#ifndef PDO_USE_MYSQLND
  static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt
 TSRMLS_DC) /* {{{ */
  {
pdo_mysql_stmt *S = stmt-driver_data;
 @@@ -316,13 -322,14 +316,12 @@@ static int pdo_mysql_stmt_execute(pdo_s
  {
pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt-driver_data;
pdo_mysql_db_handle *H = S-H;
PDO_DBG_ENTER(pdo_mysql_stmt_execute);
PDO_DBG_INF_FMT(stmt=%p, S-stmt);

if (S-stmt) {
PDO_DBG_RETURN(pdo_mysql_stmt_execute_prepared(stmt));
}
  -#endif

/* ensure that we free any previous unfetched results */
if (S-result) {
 @@@ -341,6 -348,7 +340,6 @@@

  static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt TSRMLS_DC) /* {{{
 */
  {
  -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND
pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt-driver_data;
pdo_mysql_db_handle *H = S-H;
long row_count;
 @@@ -402,7 -410,7 +401,7 @@@
  #endif

  /* ensure that we free any previous unfetched results */
  -#if HAVE_MYSQL_STMT_PREPARE
  +#ifndef PDO_USE_MYSQLND
if (S-stmt) {
stmt-column_count = (int)mysql_num_fields(S-result);
mysql_stmt_free_result(S-stmt);
 @@@ -424,6 -432,10 +423,6 @@@
} else {
PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt
 TSRMLS_CC));
}
  -#else
  -  strcpy(stmt-error_code, HYC00);
  -  PDO_DBG_RETURN(0);
  -#endif /* HAVE_MYSQL_STMT_PREPARE */
  }
  /* }}} */

 @@@ -445,6 -457,7 +444,6 @@@ static int pdo_mysql_stmt_param_hook(pd
  #ifndef PDO_USE_MYSQLND
PDO_MYSQL_PARAM_BIND *b;
  #endif
  -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND
pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt-driver_data;

PDO_DBG_ENTER(pdo_mysql_stmt_param_hook);
 @@@ -576,7 -589,7 +575,7 @@@
break;
}
}
  -#endif /* HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND */
  +
PDO_DBG_RETURN(1);
  }
  /* }}} */
 @@@ -597,6 -610,7 +596,6 @@@ static int pdo_mysql_stmt_fetch(pdo_stm
PDO_DBG_RETURN(1);
}
  #else
  -# if HAVE_MYSQL_STMT_PREPARE
int ret;

if (S-stmt) {
 @@@ -617,6 -631,7 +616,6 @@@

PDO_DBG_RETURN(1);
}
  -# endif /* HAVE_MYSQL_STMT_PREPARE */
  #endif /* PDO_USE_MYSQLND */

if (!S-result) {
 @@@ -707,12 -722,15 +706,12 @@@ static int pdo_mysql_stmt_get_col(pdo_s
}

/* With mysqlnd data is stored inside mysqlnd, not S-current_data
 */
  -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND
if (!S-stmt) {
if (S-current_data == NULL || !S-result) {
   

Re: [PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/pdo_mysql/mysql_statement.c

2012-03-24 Thread Pierrick Charron
I looked at the git log/diff and I think there is a problem with the
mailing system. It did not send the diff from the good parent for the merge.

Pierrick

On 24 March 2012 18:07, Pierrick Charron pierr...@php.net wrote:

 Hmmm I think I have the same issue as Hannes. All those changes are not
 the one I did on the 5.3 branch.
 Any clue on how to deal with that ?

 Thanks
 Pierrick


 On 24 March 2012 17:59, Pierrick Charron pierr...@php.net wrote:

 Commit:7f05a39fce42029c126d6dc315ffdad43d27c8e9
 Author:Pierrick Charron pierr...@php.net Sat, 24 Mar 2012
 17:59:46 -0400
 Parents:   10809686f0dbcbbf0eb06c968d65e0febe1dc034
 da2da13f935b2775635cd21b47a78fbf025a462d
 Branches:  PHP-5.4 master

 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=7f05a39fce42029c126d6dc315ffdad43d27c8e9

 Log:
 Merge branch 'PHP-5.3' into PHP-5.4

 Changed paths:
  MM  ext/pdo_mysql/mysql_statement.c


 Diff:
 7f05a39fce42029c126d6dc315ffdad43d27c8e9
 diff --combined ext/pdo_mysql/mysql_statement.c
 index 20e67e4,115e74c..0c2689f
 --- a/ext/pdo_mysql/mysql_statement.c
 +++ b/ext/pdo_mysql/mysql_statement.c
 @@@ -59,10 -59,12 +59,10 @@@ static int pdo_mysql_stmt_dtor(pdo_stmt
pefree(S-einfo.errmsg, stmt-dbh-is_persistent);
S-einfo.errmsg = NULL;
}
  -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND
if (S-stmt) {
pdo_mysql_stmt_close(S-stmt);
S-stmt = NULL;
}
  -#endif /* HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND */

  #ifndef PDO_USE_MYSQLND
if (S-params) {
 @@@ -75,6 -77,9 +75,6 @@@
efree(S-in_length);
}

  -#endif /* PDO_USE_MYSQLND */
  -
  -#ifdef HAVE_MYSQL_STMT_PREPARE
if (S-bound_result)
{
int i;
 @@@ -86,9 -91,10 +86,9 @@@
efree(S-out_null);
efree(S-out_length);
}
  -#endif /* HAVE_MYSQL_STMT_PREPARE */
  +#endif


  -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND
if (S-H-server) {
while (mysql_more_results(S-H-server)) {
MYSQL_RES *res;
 @@@ -101,8 -107,8 +101,8 @@@
mysql_free_result(res);
}
}
  -  }
  -#endif /* HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND */
  +  }
  +
  #if PDO_USE_MYSQLND
if (!S-stmt  S-current_data) {
mnd_free(S-current_data);
 @@@ -158,7 -164,7 +158,7 @@@ static int pdo_mysql_fill_stmt_from_res
  }
  /* }}} */

  -#ifdef HAVE_MYSQL_STMT_PREPARE
  +#ifndef PDO_USE_MYSQLND
  static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt
 TSRMLS_DC) /* {{{ */
  {
pdo_mysql_stmt *S = stmt-driver_data;
 @@@ -316,13 -322,14 +316,12 @@@ static int pdo_mysql_stmt_execute(pdo_s
  {
pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt-driver_data;
pdo_mysql_db_handle *H = S-H;
PDO_DBG_ENTER(pdo_mysql_stmt_execute);
PDO_DBG_INF_FMT(stmt=%p, S-stmt);

if (S-stmt) {
PDO_DBG_RETURN(pdo_mysql_stmt_execute_prepared(stmt));
}
  -#endif

/* ensure that we free any previous unfetched results */
if (S-result) {
 @@@ -341,6 -348,7 +340,6 @@@

  static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt TSRMLS_DC) /* {{{
 */
  {
  -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND
pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt-driver_data;
pdo_mysql_db_handle *H = S-H;
long row_count;
 @@@ -402,7 -410,7 +401,7 @@@
  #endif

  /* ensure that we free any previous unfetched results */
  -#if HAVE_MYSQL_STMT_PREPARE
  +#ifndef PDO_USE_MYSQLND
if (S-stmt) {
stmt-column_count = (int)mysql_num_fields(S-result);
mysql_stmt_free_result(S-stmt);
 @@@ -424,6 -432,10 +423,6 @@@
} else {
PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt
 TSRMLS_CC));
}
  -#else
  -  strcpy(stmt-error_code, HYC00);
  -  PDO_DBG_RETURN(0);
  -#endif /* HAVE_MYSQL_STMT_PREPARE */
  }
  /* }}} */

 @@@ -445,6 -457,7 +444,6 @@@ static int pdo_mysql_stmt_param_hook(pd
  #ifndef PDO_USE_MYSQLND
PDO_MYSQL_PARAM_BIND *b;
  #endif
  -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND
pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt-driver_data;

PDO_DBG_ENTER(pdo_mysql_stmt_param_hook);
 @@@ -576,7 -589,7 +575,7 @@@
break;
}
}
  -#endif /* HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND */
  +
PDO_DBG_RETURN(1);
  }
  /* }}} */
 @@@ -597,6 -610,7 +596,6 @@@ static int pdo_mysql_stmt_fetch(pdo_stm
PDO_DBG_RETURN(1);
}
  #else
  -# if HAVE_MYSQL_STMT_PREPARE
int ret;

if (S-stmt) {
 @@@ -617,6 -631,7 +616,6 @@@

PDO_DBG_RETURN(1);
}
  -# endif /* HAVE_MYSQL_STMT_PREPARE */
  #endif /* PDO_USE_MYSQLND */

if (!S-result) {
 @@@ -707,12 -722,15 +706,12 @@@ static int