[PHP-CVS] com php-src: Fixed bug #61423 (gzip compression fails).: ext/soap/php_http.c

2012-04-03 Thread Ilia Alshanetsky
Commit:9c5ae9954f40c82ee98038ce3e528185090e4ba1
Author:Ilia Alshanetsky il...@php.net Tue, 3 Apr 2012 08:47:00 
-0400
Parents:   827c446b62ecab6e92b93a9184ba28e581b4d882
Branches:  PHP-5.4

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

Log:
Fixed bug #61423 (gzip compression fails).

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

Changed paths:
  M  ext/soap/php_http.c


Diff:
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index a156488..69deccd 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], 1);
+   ZVAL_LONG(params[2], 0x1f);
}
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: 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: BFN: NEWS

2012-03-22 Thread Ilia Alshanetsky
Commit:2630bc6e5fd523bc10c5b3bc064f58a03a846c89
Author:Ilia Alshanetsky ili...@php.net Thu, 22 Mar 2012 09:15:40 
-0400
Parents:   30f6a9ba485c3b91b14a8ec8c575106f1effec38
Branches:  master

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

Log:
BFN

Changed paths:
  M  NEWS


Diff:
2630bc6e5fd523bc10c5b3bc064f58a03a846c89
diff --git a/NEWS b/NEWS
index cc2de2e..c0ba091 100644
--- a/NEWS
+++ b/NEWS
@@ -69,6 +69,7 @@ PHP   
 NEWS
 SessionHandler::write()). (Ilia)
 
 - SOAP
+  . 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


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



[PHP-CVS] com php-src: Fixed bug #61423 (gzip compression fails).: NEWS ext/soap/php_http.c

2012-03-22 Thread Ilia Alshanetsky
Commit:b4aea52682a6e7a8f0e2a7638ba37145cb6bf16d
Author:Ilia Alshanetsky ili...@php.net Thu, 22 Mar 2012 09:13:45 
-0400
Parents:   672fe54a00a97509c1ea08c450fe1597201c354d
Branches:  master

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

Log:
Fixed bug #61423 (gzip compression fails).

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

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


Diff:
b4aea52682a6e7a8f0e2a7638ba37145cb6bf16d
diff --git a/NEWS b/NEWS
index fa156b9..59d2aad 100644
--- a/NEWS
+++ b/NEWS
@@ -90,6 +90,7 @@ 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 358877d..610c161 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], 1);
+   ZVAL_LONG(params[2], 0x1f);
}
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: Fixed bug #61423 (gzip compression fails).: ext/soap/php_http.c

2012-03-22 Thread Ilia Alshanetsky
Commit:f9f631fb765dc08e3d62073b6eb35ce1b11db0e4
Author:Ilia Alshanetsky il...@php.net Thu, 22 Mar 2012 09:46:33 
-0400
Parents:   2630bc6e5fd523bc10c5b3bc064f58a03a846c89
Branches:  master

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

Log:
Fixed bug #61423 (gzip compression fails).

Conflicts:

NEWS

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

Changed paths:
  M  ext/soap/php_http.c


Diff:
f9f631fb765dc08e3d62073b6eb35ce1b11db0e4
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index a156488..69deccd 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], 1);
+   ZVAL_LONG(params[2], 0x1f);
}
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: Fixed bug #61461 (missing checks around malloc() calls).: NEWS sapi/cli/php_cli_server.c

2012-03-21 Thread Ilia Alshanetsky
Commit:9dcfb8c73fd639485182497ae5a8fc7d7ca7eb11
Author:Ilia Alshanetsky ili...@php.net Tue, 20 Mar 2012 21:07:08 
-0400
Parents:   f3f76e5e8af265cd59d8edb7fb0827be6abc9a5a
Branches:  PHP-5.4

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

Log:
Fixed bug #61461 (missing checks around malloc() calls).

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

Changed paths:
  M  NEWS
  M  sapi/cli/php_cli_server.c


Diff:
9dcfb8c73fd639485182497ae5a8fc7d7ca7eb11
diff --git a/NEWS b/NEWS
index ae0d190..af4f4c9 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ PHP 
   NEWS
 ?? ??? 2012, PHP 5.4.1 RC1
 
 - CLI Server:
+  . Fixed bug #61461 (missing checks around malloc() calls). (Ilia)
   . Implemented FR #60850 (Built in web server does not set 
 $_SERVER['SCRIPT_FILENAME'] when using router). (Laruence)
   . Connection: close instead of Connection: closed (Gustavo)
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 88f5d78..79ccea3 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -1281,6 +1281,10 @@ static void 
php_cli_server_request_translate_vpath(php_cli_server_request *reque
size_t prev_patch_len;
int  is_static_file = 0;
 
+   if (!buf) {
+   return;
+   }
+
memmove(p, document_root, document_root_len);
p += document_root_len;
vpath = p;
@@ -1536,6 +1540,9 @@ static int 
php_cli_server_client_read_request_on_body(php_http_parser *parser, c
php_cli_server_client *client = parser-data;
if (!client-request.content) {
client-request.content = pemalloc(parser-content_length, 1);
+   if (!client-request.content) {
+   return -1;
+   }
client-request.content_len = 0;
}
memmove(client-request.content + client-request.content_len, at, 
length);
@@ -1606,6 +1613,9 @@ static int 
php_cli_server_client_read_request(php_cli_server_client *client, cha
}
if (client-current_header_name) {
char *header_name = 
safe_pemalloc(client-current_header_name_len, 1, 1, 1);
+   if (!header_name) {
+   return -1;
+   }
memmove(header_name, client-current_header_name, 
client-current_header_name_len);
client-current_header_name = header_name;
client-current_header_name_allocated = 1;


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



[PHP-CVS] [git] commit php-src.git:

2012-03-19 Thread Ilia Alshanetsky
Commit: 4b6d10a06ac2f01c4b4229f03b7bb11d7e530437
Author: Ilia Alshanetsky(ili...@php.net) Mon, 19 Mar 2012 13:16:14 -0400
Committer: Ilia Alshanetsky(ili...@php.net)  Mon, 19 Mar 2012 13:16:14 -0400
Parents: ae5e8ad9c3e1594bdd56db302347e34456c9478c 
5709f7dd5bd6874257f7b0f49f90fc1ff627a918

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

Log:
Merge branch '54'

* 54:
  add note about corrected tiger hash output
  Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c).
  MFH: 7dcada1 for 5.4
  MFH: 45a6f8d for 5.4.

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

Changed paths:


Diff:
4b6d10a06ac2f01c4b4229f03b7bb11d7e530437


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



[PHP-CVS] [git] branch php-src.git: update branch master

2012-03-19 Thread Ilia Alshanetsky
Branch master in php-src.git was updated
Date: Mon, 19 Mar 2012 20:55:37 +

Link: 
http://git.php.net/?p=php-src.git;a=log;h=4b6d10a06ac2f01c4b4229f03b7bb11d7e530437;hp=ae5e8ad9c3e1594bdd56db302347e34456c9478c


Log:
Commit: 4b6d10a06ac2f01c4b4229f03b7bb11d7e530437
Author: Ilia Alshanetsky(ili...@php.net) Mon, 19 Mar 2012 13:16:14 -0400
Committer: Ilia Alshanetsky(ili...@php.net)  Mon, 19 Mar 2012 13:16:14 -0400
Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=4b6d10a06ac2f01c4b4229f03b7bb11d7e530437
Shortlog: Merge branch '54'

Commit: 5709f7dd5bd6874257f7b0f49f90fc1ff627a918
Author: Ilia Alshanetsky(ili...@php.net) Mon, 19 Mar 2012 13:10:53 -0400
Committer: Ilia Alshanetsky(ili...@php.net)  Mon, 19 Mar 2012 13:10:53 -0400
Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=5709f7dd5bd6874257f7b0f49f90fc1ff627a918
Shortlog: Merge branch '53' into 54

Commit: 867d980574ec8086cc40634fbd62af257504b8ea
Author: Michael Wallner(m...@php.net) Mon, 19 Mar 2012 20:15:54 +0100
Committer: Michael Wallner(m...@php.net)  Mon, 19 Mar 2012 20:15:54 +0100
Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=867d980574ec8086cc40634fbd62af257504b8ea
Shortlog: add note about corrected tiger hash output

Commit: f5f5ca5d77cfe47b9556b3cc37fbf9605b822e5c
Author: Gustavo André dos Santos Lopes(cataphr...@php.net) Mon, 19 Mar 
2012 17:50:13 +
Committer: Gustavo André dos Santos Lopes(cataphr...@php.net)  Mon, 19 Mar 
2012 17:50:13 +
Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=f5f5ca5d77cfe47b9556b3cc37fbf9605b822e5c
Shortlog: Merge branch 'PHP-5.4' of git.php.net:/php-src into 5.4

Commit: edb57810a707e92b3fdb03fcf36fee53e1f69fd3
Author: Ilia Alshanetsky(ili...@php.net) Mon, 19 Mar 2012 13:10:23 -0400
Committer: Ilia Alshanetsky(ili...@php.net)  Mon, 19 Mar 2012 13:10:23 -0400
Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=edb57810a707e92b3fdb03fcf36fee53e1f69fd3
Shortlog: Fixed bug #61430 (Transposed memset() params in 
sapi/fpm/fpm/fpm_shm.c).

Commit: cfdd6c5788afc6fb907f6f518dceab4fd82c922e
Author: Gustavo André dos Santos Lopes(cataphr...@php.net) Sun, 5 Feb 
2012 14:57:57 +
Committer: Gustavo André dos Santos Lopes(cataphr...@php.net)  Mon, 19 Mar 
2012 16:36:21 +
Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=cfdd6c5788afc6fb907f6f518dceab4fd82c922e
Shortlog: MFH: 7dcada1 for 5.4

Commit: 9a460497da3cc2b755f4628350756427fc0a1051
Author: Gustavo André dos Santos Lopes(cataphr...@php.net) Mon, 19 Mar 
2012 16:28:10 +
Committer: Gustavo André dos Santos Lopes(cataphr...@php.net)  Mon, 19 Mar 
2012 16:34:31 +
Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=9a460497da3cc2b755f4628350756427fc0a1051
Shortlog: MFH: 45a6f8d for 5.4.




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



[PHP-CVS] [git] commit php-src.git: NEWS

2012-03-19 Thread Ilia Alshanetsky
Commit: 5709f7dd5bd6874257f7b0f49f90fc1ff627a918
Author: Ilia Alshanetsky(ili...@php.net) Mon, 19 Mar 2012 13:10:53 -0400
Committer: Ilia Alshanetsky(ili...@php.net)  Mon, 19 Mar 2012 13:10:53 -0400
Parents: 867d980574ec8086cc40634fbd62af257504b8ea 
edb57810a707e92b3fdb03fcf36fee53e1f69fd3

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

Log:
Merge branch '53' into 54

* 53:
  Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c).

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

Changed paths:
  MM  NEWS

5709f7dd5bd6874257f7b0f49f90fc1ff627a918
diff --combined NEWS
index 1b9b4cf,a2d7c05..ae0d190
--- a/NEWS
+++ b/NEWS
@@@ -1,43 -1,38 +1,47 @@@
  PHP
NEWS
  
|||
 -?? ??? 2012, PHP 5.3.11
 +?? ??? 2012, PHP 5.4.1 RC1
 +
 +- CLI Server:
 +  . Implemented FR #60850 (Built in web server does not set 
 +$_SERVER['SCRIPT_FILENAME'] when using router). (Laruence)
 +  . Connection: close instead of Connection: closed (Gustavo)
  
  - Core:
 -  . Fixed bug #61273 (call_user_func_array with more than 16333 arguments
 +  . Fixed bug #61374 (html_entity_decode tries to decode code points that 
don't
 +exist in ISO-8859-1). (Gustavo)
 +  . Fixed bug #61273 (call_user_func_array with more than 16333 arguments 
  leaks / crashes). (Laruence)
 +  . Fixed bug #61225 (Incorrect lexing of 0b00*+NUM). (Pierrick)
. Fixed bug #61165 (Segfault - strip_tags()). (Laruence)
 -  . Improved max_input_vars directive to check nested variables (Dmitry).
 -  . Fixed bug #61095 (Incorect lexing of 0x00*+NUM). (Etienne)
 +  . Fixed bug #61106 (Segfault when using header_register_callback). (Nikita
 +Popov)
. Fixed bug #61087 (Memory leak in parse_ini_file when specifying
  invalid scanner mode). (Nikic, Laruence)
. Fixed bug #61072 (Memory leak when restoring an exception handler).
  (Nikic, Laruence)
. Fixed bug #61058 (array_fill leaks if start index is PHP_INT_MAX).
 -  (Laruence)
 -  . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical
 -  vars). (Laruence)
 -  . Fix bug #60895 (Possible invalid handler usage in windows random
 -functions). (Pierre)
 -  . Fixed bug #60825 (Segfault when running symfony 2 tests).
 -(Dmitry, Laruence)
 +(Laruence)
 +  . Fixed bug #61052 (Missing error check in trait 'insteadof' clause). 
(Stefan)
 +  . Fixed bug #61011 (Crash when an exception is thrown by __autoload
 +accessing a static property). (Laruence)
 +  . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical 
 +vars). (Laruence)
 +  . Fixed bug #60978 (exit code incorrect). (Laruence)
 +  . Fixed bug #60911 (Confusing error message when extending traits). (Stefan)
. Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam)
 +  . Fixed bug #60717 (Order of traits in use statement can cause a fatal
 +error). (Stefan)
 +  . Fixed bug #60573 (type hinting with self keyword causes weird errors).
 +(Laruence)
. Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)
 -  . Fixed bug #60227 (header() cannot detect the multi-line header with CR).
 -(rui, Gustavo)
 -  . Fixed bug #60222 (time_nanosleep() does validate input params). (Ilia)
. Fixed bug #52719 (array_walk_recursive crashes if third param of the
  function is by reference). (Nikita Popov)
 -  . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry)
  
+ - FPM
+   . Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c).
+ (michaelhood at gmail dot com, Ilia)
+ 
  - Ibase
. Fixed bug #60947 (Segmentation fault while executing ibase_db_info).
  (Ilia)
@@@ -45,504 -40,97 +49,504 @@@
  - Installation
. Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones)
  
 -- Fileinfo
 -  . Fixed bug #61173 (Unable to detect error from finfo constructor). 
(Gustavo)
 -
 -- Firebird Database extension (ibase):
 -  . Fixed bug #60802 (ibase_trans() gives segfault when passing params).
 +- mbstring:
 +  . MFH mb_ereg_replace_callback() for security enhancements. (Rui)
  
  - mysqli
. Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes).
  
 +- mysqlnd
 +  . Fixed bug #60948 (mysqlnd FTBFS when -Wformat-security is enabled).
 +(Johannes)
 +
 +- Readline:
 +  . Fixed bug #61088 (Memory leak in readline_callback_handler_install).
 +(Nikic, Laruence)
 +
 +- Session
 +  . Fixed bug #60634 (Segmentation fault when trying to die() in 
 +SessionHandler::write()). (Ilia)
 +
 +- SOAP
 +  . 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 
 +chunksize length line is  10 bytes). (Ilia)
 +
 +- PDO
 +  . Fixed bug #61292 (Segfault while calling

[PHP-CVS] [git] commit php-src.git: NEWS sapi/fpm/fpm/fpm_shm.c

2012-03-19 Thread Ilia Alshanetsky
Commit: edb57810a707e92b3fdb03fcf36fee53e1f69fd3
Author: Ilia Alshanetsky(ili...@php.net) Mon, 19 Mar 2012 13:10:23 -0400
Committer: Ilia Alshanetsky(ili...@php.net)  Mon, 19 Mar 2012 13:10:23 -0400
Parents: bcd19cf6491030f3bfd14d769011ba8f20d99333

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

Log:
Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c).

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

Changed paths:
  M  NEWS
  M  sapi/fpm/fpm/fpm_shm.c


Diff:
edb57810a707e92b3fdb03fcf36fee53e1f69fd3
diff --git a/NEWS b/NEWS
index 7563155..a2d7c05 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,10 @@ PHP  
  NEWS
 function is by reference). (Nikita Popov)
   . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry)
 
+- FPM
+  . Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c).
+(michaelhood at gmail dot com, Ilia)
+
 - Ibase
   . Fixed bug #60947 (Segmentation fault while executing ibase_db_info).
 (Ilia)
diff --git a/sapi/fpm/fpm/fpm_shm.c b/sapi/fpm/fpm/fpm_shm.c
index 6acbddf..9226adf 100644
--- a/sapi/fpm/fpm/fpm_shm.c
+++ b/sapi/fpm/fpm/fpm_shm.c
@@ -35,7 +35,7 @@ void *fpm_shm_alloc(size_t size) /* {{{ */
return NULL;
}
 
-   memset(mem, size, 0);
+   memset(mem, 0, size);
fpm_shm_size += size;
return mem;
 }


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



[PHP-CVS] [git] branch php-src.git: create branch 53

2012-03-19 Thread Ilia Alshanetsky
Branch 53 in php-src.git was created
Date: Mon, 19 Mar 2012 21:02:58 +

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


Log:



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



[PHP-CVS] [git] branch php-src.git: update branch PHP-5.3

2012-03-19 Thread Ilia Alshanetsky
Branch PHP-5.3 in php-src.git was updated
Date: Mon, 19 Mar 2012 21:06:39 +

Link: 
http://git.php.net/?p=php-src.git;a=log;h=edb57810a707e92b3fdb03fcf36fee53e1f69fd3;hp=bcd19cf6491030f3bfd14d769011ba8f20d99333


Log:
Commit: edb57810a707e92b3fdb03fcf36fee53e1f69fd3
Author: Ilia Alshanetsky(ili...@php.net) Mon, 19 Mar 2012 13:10:23 -0400
Committer: Ilia Alshanetsky(ili...@php.net)  Mon, 19 Mar 2012 13:10:23 -0400
Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=edb57810a707e92b3fdb03fcf36fee53e1f69fd3
Shortlog: Fixed bug #61430 (Transposed memset() params in 
sapi/fpm/fpm/fpm_shm.c).




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



[PHP-CVS] [git] branch php-src.git: update branch PHP-5.4

2012-03-19 Thread Ilia Alshanetsky
Branch PHP-5.4 in php-src.git was updated
Date: Mon, 19 Mar 2012 21:09:58 +

Link: 
http://git.php.net/?p=php-src.git;a=log;h=69a016b50431a1dca2c42efceac5ce92803d7f67;hp=260e77709ddfe9e72e2b7f11393673b6ee18a7f9


Log:
Commit: 69a016b50431a1dca2c42efceac5ce92803d7f67
Author: Ilia Alshanetsky(ili...@php.net) Mon, 19 Mar 2012 13:49:23 -0400
Committer: Ilia Alshanetsky(ili...@php.net)  Mon, 19 Mar 2012 13:49:23 -0400
Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=69a016b50431a1dca2c42efceac5ce92803d7f67
Shortlog: Merge branch 'PHP-5.4' of http://git.php.net/repository/php-src into 
54

Commit: 5709f7dd5bd6874257f7b0f49f90fc1ff627a918
Author: Ilia Alshanetsky(ili...@php.net) Mon, 19 Mar 2012 13:10:53 -0400
Committer: Ilia Alshanetsky(ili...@php.net)  Mon, 19 Mar 2012 13:10:53 -0400
Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=5709f7dd5bd6874257f7b0f49f90fc1ff627a918
Shortlog: Merge branch '53' into 54

Commit: edb57810a707e92b3fdb03fcf36fee53e1f69fd3
Author: Ilia Alshanetsky(ili...@php.net) Mon, 19 Mar 2012 13:10:23 -0400
Committer: Ilia Alshanetsky(ili...@php.net)  Mon, 19 Mar 2012 13:10:23 -0400
Link: 
http://git.php.net/?p=php-src.git;a=commitdiff;h=edb57810a707e92b3fdb03fcf36fee53e1f69fd3
Shortlog: Fixed bug #61430 (Transposed memset() params in 
sapi/fpm/fpm/fpm_shm.c).




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



[PHP-CVS] [git] commit php-src.git:

2012-03-19 Thread Ilia Alshanetsky
Commit: 69a016b50431a1dca2c42efceac5ce92803d7f67
Author: Ilia Alshanetsky(ili...@php.net) Mon, 19 Mar 2012 13:49:23 -0400
Committer: Ilia Alshanetsky(ili...@php.net)  Mon, 19 Mar 2012 13:49:23 -0400
Parents: 5709f7dd5bd6874257f7b0f49f90fc1ff627a918 
260e77709ddfe9e72e2b7f11393673b6ee18a7f9

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

Log:
Merge branch 'PHP-5.4' of http://git.php.net/repository/php-src into 54

* 'PHP-5.4' of http://git.php.net/repository/php-src:
  fix tests failing due to corrected hash tiger

Changed paths:


Diff:
69a016b50431a1dca2c42efceac5ce92803d7f67


--
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_4/ NEWS

2012-03-17 Thread Ilia Alshanetsky
iliaaSat, 17 Mar 2012 17:51:51 +

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

Log:
Fixed typo

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

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2012-03-17 10:37:21 UTC (rev 324322)
+++ php/php-src/branches/PHP_5_4/NEWS   2012-03-17 17:51:51 UTC (rev 324323)
@@ -12,7 +12,7 @@
 exist in ISO-8859-1). (Gustavo)
   . Fixed bug #61273 (call_user_func_array with more than 16333 arguments
 leaks / crashes). (Laruence)
-  . Fixed bug #61225 (Incorect lexing of 0b00*+NUM). (Pierrick)
+  . Fixed bug #61225 (Incorrect lexing of 0b00*+NUM). (Pierrick)
   . Fixed bug #61165 (Segfault - strip_tags()). (Laruence)
   . Fixed bug #61106 (Segfault when using header_register_callback). (Nikita
 Popov)

-- 
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/interbase/ibase_service.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/interbase/ibase_service.c trunk/ext/interbase/ibase_service

2012-03-15 Thread Ilia Alshanetsky
iliaaThu, 15 Mar 2012 19:59:26 +

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

Log:
Fixed bug #60947 (Segmentation fault while executing ibase_db_info)

Bug: https://bugs.php.net/60947 (Assigned) Segmentation fault while executing 
ibase_db_info
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/interbase/ibase_service.c
U   php/php-src/branches/PHP_5_4/NEWS
U   php/php-src/branches/PHP_5_4/ext/interbase/ibase_service.c
U   php/php-src/trunk/ext/interbase/ibase_service.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2012-03-15 16:04:07 UTC (rev 324280)
+++ php/php-src/branches/PHP_5_3/NEWS   2012-03-15 19:59:26 UTC (rev 324281)
@@ -29,6 +29,10 @@
 function is by reference). (Nikita Popov)
   . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry)

+- Ibase
+  . Fixed bug #60947 (Segmentation fault while executing ibase_db_info).
+(Ilia)
+
 - Installation
   . Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones)


Modified: php/php-src/branches/PHP_5_3/ext/interbase/ibase_service.c
===
--- php/php-src/branches/PHP_5_3/ext/interbase/ibase_service.c  2012-03-15 
16:04:07 UTC (rev 324280)
+++ php/php-src/branches/PHP_5_3/ext/interbase/ibase_service.c  2012-03-15 
19:59:26 UTC (rev 324281)
@@ -321,6 +321,7 @@
heap_p = heap_buf + res_size;
}
result += 2;
+   *(result+line_len) = 0;
snprintf(heap_p, heap_buf_size - (heap_buf - 
heap_p), %s\n, result);
heap_p += line_len +2;
goto query_loop; /* repeat until result is 
exhausted */

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2012-03-15 16:04:07 UTC (rev 324280)
+++ php/php-src/branches/PHP_5_4/NEWS   2012-03-15 19:59:26 UTC (rev 324281)
@@ -38,6 +38,10 @@
   . Fixed bug #52719 (array_walk_recursive crashes if third param of the
 function is by reference). (Nikita Popov)

+- Ibase
+  . Fixed bug #60947 (Segmentation fault while executing ibase_db_info).
+(Ilia)
+
 - Installation
   . Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones)


Modified: php/php-src/branches/PHP_5_4/ext/interbase/ibase_service.c
===
--- php/php-src/branches/PHP_5_4/ext/interbase/ibase_service.c  2012-03-15 
16:04:07 UTC (rev 324280)
+++ php/php-src/branches/PHP_5_4/ext/interbase/ibase_service.c  2012-03-15 
19:59:26 UTC (rev 324281)
@@ -321,6 +321,7 @@
heap_p = heap_buf + res_size;
}
result += 2;
+   *(result+line_len) = 0;
snprintf(heap_p, heap_buf_size - (heap_buf - 
heap_p), %s\n, result);
heap_p += line_len +2;
goto query_loop; /* repeat until result is 
exhausted */

Modified: php/php-src/trunk/ext/interbase/ibase_service.c
===
--- php/php-src/trunk/ext/interbase/ibase_service.c 2012-03-15 16:04:07 UTC 
(rev 324280)
+++ php/php-src/trunk/ext/interbase/ibase_service.c 2012-03-15 19:59:26 UTC 
(rev 324281)
@@ -321,6 +321,7 @@
heap_p = heap_buf + res_size;
}
result += 2;
+   *(result+line_len) = 0;
snprintf(heap_p, heap_buf_size - (heap_buf - 
heap_p), %s\n, result);
heap_p += line_len +2;
goto query_loop; /* repeat until result is 
exhausted */

-- 
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/pdo_odbc/odbc_stmt.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/pdo_odbc/odbc_stmt.c trunk/ext/pdo_odbc/odbc_stmt.c

2012-03-14 Thread Ilia Alshanetsky
iliaaWed, 14 Mar 2012 20:20:33 +

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

Log:
Fixed bug #61212 (PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO).

Bug: https://bugs.php.net/61212 (Open) PDO ODBC Segfaults on 
SQL_SUCESS_WITH_INFO
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/pdo_odbc/odbc_stmt.c
U   php/php-src/branches/PHP_5_4/NEWS
U   php/php-src/branches/PHP_5_4/ext/pdo_odbc/odbc_stmt.c
U   php/php-src/trunk/ext/pdo_odbc/odbc_stmt.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2012-03-14 20:08:14 UTC (rev 324250)
+++ php/php-src/branches/PHP_5_3/NEWS   2012-03-14 20:20:33 UTC (rev 324251)
@@ -47,6 +47,9 @@
   . Fixed bug #61194 (PDO should export compression flag with myslqnd).
 (Johannes)

+- PDO_odbc
+  . Fixed bug #61212 (PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO). (Ilia)
+
 - PDO_pgsql
   . Fixed bug #61267 (pdo_pgsql's PDO::exec() returns the number of SELECTed
 rows on postgresql = 9). (ben dot pineau at gmail dot com)

Modified: php/php-src/branches/PHP_5_3/ext/pdo_odbc/odbc_stmt.c
===
--- php/php-src/branches/PHP_5_3/ext/pdo_odbc/odbc_stmt.c   2012-03-14 
20:08:14 UTC (rev 324250)
+++ php/php-src/branches/PHP_5_3/ext/pdo_odbc/odbc_stmt.c   2012-03-14 
20:20:33 UTC (rev 324251)
@@ -637,12 +637,14 @@

if (C-fetched_len != SQL_NO_TOTAL) {
/* use size suggested by the driver, if it 
knows it */
-   alloced = C-fetched_len + 1;
+   buf = emalloc(C-fetched_len + 1);
+   memcpy(buf, C-data, C-fetched_len);
+   buf[C-fetched_len] = 0;
+   used = C-fetched_len;
+   } else {
+   buf = estrndup(C-data, 256);
+   used = 255; /* not 256; the driver NUL 
terminated the buffer */
}
-
-   buf = emalloc(alloced);
-   memcpy(buf, C-data, 256);
-   used = 255; /* not 256; the driver NUL terminated the 
buffer */

do {
C-fetched_len = 0;

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2012-03-14 20:08:14 UTC (rev 324250)
+++ php/php-src/branches/PHP_5_4/NEWS   2012-03-14 20:20:33 UTC (rev 324251)
@@ -75,6 +75,9 @@
   . Fixed bug #61194 (PDO should export compression flag with myslqnd).
 (Johannes)

+- PDO_odbc
+  . Fixed bug #61212 (PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO). (Ilia)
+
 - Phar
   . Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL
 bytes). (Nikita Popov)

Modified: php/php-src/branches/PHP_5_4/ext/pdo_odbc/odbc_stmt.c
===
--- php/php-src/branches/PHP_5_4/ext/pdo_odbc/odbc_stmt.c   2012-03-14 
20:08:14 UTC (rev 324250)
+++ php/php-src/branches/PHP_5_4/ext/pdo_odbc/odbc_stmt.c   2012-03-14 
20:20:33 UTC (rev 324251)
@@ -637,12 +637,14 @@

if (C-fetched_len != SQL_NO_TOTAL) {
/* use size suggested by the driver, if it 
knows it */
-   alloced = C-fetched_len + 1;
+   buf = emalloc(C-fetched_len + 1);
+   memcpy(buf, C-data, C-fetched_len);
+   buf[C-fetched_len] = 0;
+   used = C-fetched_len;
+   } else {
+   buf = estrndup(C-data, 256);
+   used = 255; /* not 256; the driver NUL 
terminated the buffer */
}
-
-   buf = emalloc(alloced);
-   memcpy(buf, C-data, 256);
-   used = 255; /* not 256; the driver NUL terminated the 
buffer */

do {
C-fetched_len = 0;

Modified: php/php-src/trunk/ext/pdo_odbc/odbc_stmt.c
===
--- php/php-src/trunk/ext/pdo_odbc/odbc_stmt.c  2012-03-14 20:08:14 UTC (rev 
324250)
+++ php/php-src/trunk/ext/pdo_odbc/odbc_stmt.c  2012-03-14 20:20:33 UTC (rev 
324251)
@@ -637,12 +637,14 @@

if (C-fetched_len != SQL_NO_TOTAL) {
/* use size suggested by the driver, if it 
knows it */
-   alloced = C-fetched_len + 1;
+   buf = emalloc(C-fetched_len + 1);
+   

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/basic_functions.c branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt branches/PHP_5_4/NEWS branches/PHP_5_4/ext/sta

2012-03-12 Thread Ilia Alshanetsky
iliaaMon, 12 Mar 2012 16:53:07 +

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

Log:
Fixed bug #60222 (time_nanosleep() does validate input params).

Bug: https://bugs.php.net/60222 (Open) time_nanosleep won't throw a warning for 
negative second
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c
A   php/php-src/branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt
U   php/php-src/branches/PHP_5_4/NEWS
U   php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c
A   php/php-src/branches/PHP_5_4/ext/standard/tests/time/bug60222.phpt
U   php/php-src/trunk/ext/standard/basic_functions.c
A   php/php-src/trunk/ext/standard/tests/time/bug60222.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2012-03-12 16:19:10 UTC (rev 324162)
+++ php/php-src/branches/PHP_5_3/NEWS   2012-03-12 16:53:07 UTC (rev 324163)
@@ -24,6 +24,7 @@
   . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)
   . Fixed bug #60227 (header() cannot detect the multi-line header with CR).
 (rui, Gustavo)
+  . Fixed bug #60222 (time_nanosleep() does validate input params). (Ilia)
   . Fixed bug #52719 (array_walk_recursive crashes if third param of the
 function is by reference). (Nikita Popov)
   . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry)

Modified: php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c 2012-03-12 
16:19:10 UTC (rev 324162)
+++ php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c 2012-03-12 
16:53:07 UTC (rev 324163)
@@ -4497,6 +4497,15 @@
return;
}

+   if (tv_sec  0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, The seconds value 
must be greater than 0);
+   RETURN_FALSE;
+   }
+   if (tv_nsec  0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, The nanoseconds 
value must be greater than 0);
+   RETURN_FALSE;
+   }
+
php_req.tv_sec = (time_t) tv_sec;
php_req.tv_nsec = tv_nsec;
if (!nanosleep(php_req, php_rem)) {

Added: php/php-src/branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt  
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt  
2012-03-12 16:53:07 UTC (rev 324163)
@@ -0,0 +1,15 @@
+--TEST--
+Bug #60222 (time_nanosleep() does validate input params)
+--FILE--
+?php
+   var_dump(time_nanosleep(-1, 0));
+   var_dump(time_nanosleep(0, -1));
+?
+===DONE===
+--EXPECTF--
+Warning: time_nanosleep(): The seconds value must be greater than 0 in %s on 
line %d
+bool(false)
+
+Warning: time_nanosleep(): The nanoseconds value must be greater than 0 in %s 
on line %d
+bool(false)
+===DONE===

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2012-03-12 16:19:10 UTC (rev 324162)
+++ php/php-src/branches/PHP_5_4/NEWS   2012-03-12 16:53:07 UTC (rev 324163)
@@ -87,6 +87,7 @@
 - Standard:
   . Fixed memory leak in substr_replace. (Pierrick)
   . Make max_file_uploads ini directive settable outside of php.ini (Rasmus)
+  . Fixed bug #60222 (time_nanosleep() does validate input params). (Ilia)
   . Fixed bug #60106 (stream_socket_server silently truncates long unix socket
 paths). (Ilia)


Modified: php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c 2012-03-12 
16:19:10 UTC (rev 324162)
+++ php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c 2012-03-12 
16:53:07 UTC (rev 324163)
@@ -4432,6 +4432,15 @@
return;
}

+   if (tv_sec  0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, The seconds value 
must be greater than 0);
+   RETURN_FALSE;
+   }
+   if (tv_nsec  0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, The nanoseconds 
value must be greater than 0);
+   RETURN_FALSE;
+   }
+
php_req.tv_sec = (time_t) tv_sec;
php_req.tv_nsec = tv_nsec;
if (!nanosleep(php_req, php_rem)) {

Added: php/php-src/branches/PHP_5_4/ext/standard/tests/time/bug60222.phpt
===
--- php/php-src/branches/PHP_5_4/ext/standard/tests/time/bug60222.phpt  
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/standard/tests/time/bug60222.phpt  

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug60569.phpt branches/PHP_5_3/Zend/zend_exceptions.c branches/PHP_5_4/NEWS branches/PHP_5_4/Zend/tests/bug60569.phpt bra

2012-03-11 Thread Ilia Alshanetsky
iliaaSun, 11 Mar 2012 18:15:13 +

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

Log:
Fixed bug #60569 (Nullbyte truncates Exception $message).

Bug: https://bugs.php.net/60569 (Open) Nullbyte truncates Exception $message.
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
A   php/php-src/branches/PHP_5_3/Zend/tests/bug60569.phpt
U   php/php-src/branches/PHP_5_3/Zend/zend_exceptions.c
U   php/php-src/branches/PHP_5_4/NEWS
A   php/php-src/branches/PHP_5_4/Zend/tests/bug60569.phpt
U   php/php-src/branches/PHP_5_4/Zend/zend_exceptions.c
A   php/php-src/trunk/Zend/tests/bug60569.phpt
U   php/php-src/trunk/Zend/zend_exceptions.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2012-03-11 15:56:56 UTC (rev 324111)
+++ php/php-src/branches/PHP_5_3/NEWS   2012-03-11 18:15:13 UTC (rev 324112)
@@ -21,6 +21,7 @@
   . Fixed bug #60825 (Segfault when running symfony 2 tests).
 (Dmitry, Laruence)
   . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam)
+  . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)
   . Fixed bug #60227 (header() cannot detect the multi-line header with CR).
 (rui, Gustavo)
   . Fixed bug #52719 (array_walk_recursive crashes if third param of the

Added: php/php-src/branches/PHP_5_3/Zend/tests/bug60569.phpt
===
(Binary files differ)


Property changes on: php/php-src/branches/PHP_5_3/Zend/tests/bug60569.phpt
___
Added: svn:mime-type
   + application/octet-stream

Modified: php/php-src/branches/PHP_5_3/Zend/zend_exceptions.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_exceptions.c 2012-03-11 15:56:56 UTC 
(rev 324111)
+++ php/php-src/branches/PHP_5_3/Zend/zend_exceptions.c 2012-03-11 18:15:13 UTC 
(rev 324112)
@@ -192,7 +192,7 @@
object = getThis();

if (message) {
-   zend_update_property_string(default_exception_ce, object, 
message, sizeof(message)-1, message TSRMLS_CC);
+   zend_update_property_stringl(default_exception_ce, object, 
message, sizeof(message)-1, message, message_len TSRMLS_CC);
}

if (code) {

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2012-03-11 15:56:56 UTC (rev 324111)
+++ php/php-src/branches/PHP_5_4/NEWS   2012-03-11 18:15:13 UTC (rev 324112)
@@ -32,6 +32,7 @@
 error). (Stefan)
   . Fixed bug #60573 (type hinting with self keyword causes weird errors).
 (Laruence)
+  . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)
   . Fixed bug #52719 (array_walk_recursive crashes if third param of the
 function is by reference). (Nikita Popov)


Added: php/php-src/branches/PHP_5_4/Zend/tests/bug60569.phpt
===
(Binary files differ)


Property changes on: php/php-src/branches/PHP_5_4/Zend/tests/bug60569.phpt
___
Added: svn:mime-type
   + application/octet-stream

Modified: php/php-src/branches/PHP_5_4/Zend/zend_exceptions.c
===
--- php/php-src/branches/PHP_5_4/Zend/zend_exceptions.c 2012-03-11 15:56:56 UTC 
(rev 324111)
+++ php/php-src/branches/PHP_5_4/Zend/zend_exceptions.c 2012-03-11 18:15:13 UTC 
(rev 324112)
@@ -205,7 +205,7 @@
object = getThis();

if (message) {
-   zend_update_property_string(default_exception_ce, object, 
message, sizeof(message)-1, message TSRMLS_CC);
+   zend_update_property_stringl(default_exception_ce, object, 
message, sizeof(message)-1, message, message_len TSRMLS_CC);
}

if (code) {

Added: php/php-src/trunk/Zend/tests/bug60569.phpt
===
(Binary files differ)


Property changes on: php/php-src/trunk/Zend/tests/bug60569.phpt
___
Added: svn:mime-type
   + application/octet-stream

Modified: php/php-src/trunk/Zend/zend_exceptions.c
===
--- php/php-src/trunk/Zend/zend_exceptions.c2012-03-11 15:56:56 UTC (rev 
324111)
+++ php/php-src/trunk/Zend/zend_exceptions.c2012-03-11 18:15:13 UTC (rev 
324112)
@@ -205,7 +205,7 @@
object = getThis();

if (message) {
-   zend_update_property_string(default_exception_ce, object, 
message, sizeof(message)-1, message TSRMLS_CC);
+   zend_update_property_stringl(default_exception_ce, object, 
message, sizeof(message)-1, message, message_len 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/session/session.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/session/session.c trunk/ext/session/session.c

2012-03-07 Thread Ilia Alshanetsky
iliaaThu, 08 Mar 2012 03:31:46 +

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

Log:
Fixed bug #60634 (Segmentation fault when trying to die() in 
SessionHandler::write())

Bug: https://bugs.php.net/60634 (Assigned) Segmentation fault when trying to 
die() in SessionHandler::write()
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/session/session.c
U   php/php-src/branches/PHP_5_4/NEWS
U   php/php-src/branches/PHP_5_4/ext/session/session.c
U   php/php-src/trunk/ext/session/session.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2012-03-07 19:47:18 UTC (rev 324008)
+++ php/php-src/branches/PHP_5_3/NEWS   2012-03-08 03:31:46 UTC (rev 324009)
@@ -52,6 +52,7 @@
   . Fixed bug #60811 (php-fpm compilation problem). (rasmus)

 - SOAP
+  . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry)
   . Fixed bug #60887 (SoapClient ignores user_agent option and sends no
 User-Agent header). (carloschilazo at gmail dot com)

@@ -61,9 +62,6 @@
 - PDO_Sqlite extension:
   . Add createCollation support. (Damien)

-- SOAP:
-  . Fixed basic HTTP authentication for WSDL sub requests. (Dmitry)
-
 - Reflection:
   . Fixed bug #60968 (Late static binding doesn't work with
 ReflectionMethod::invokeArgs()). (Laruence)
@@ -71,6 +69,8 @@
 - Session:
   . Fixed bug #60860 (session.save_handler=user without defined function core
 dumps). (Felipe)
+  . Fixed bug #60634 (Segmentation fault when trying to die() in
+SessionHandler::write()). (Ilia)

 - Streams:
   . Fixed bug #61115 (stream related segfault on fatal error in

Modified: php/php-src/branches/PHP_5_3/ext/session/session.c
===
--- php/php-src/branches/PHP_5_3/ext/session/session.c  2012-03-07 19:47:18 UTC 
(rev 324008)
+++ php/php-src/branches/PHP_5_3/ext/session/session.c  2012-03-08 03:31:46 UTC 
(rev 324009)
@@ -1512,9 +1512,7 @@
 {
if (PS(session_status) == php_session_active) {
PS(session_status) = php_session_none;
-   zend_try {
-   php_session_save_current_state(TSRMLS_C);
-   } zend_end_try();
+   php_session_save_current_state(TSRMLS_C);
}
 }
 /* }}} */
@@ -2167,7 +2165,9 @@
 {
int i;

-   php_session_flush(TSRMLS_C);
+   zend_try {
+   php_session_flush(TSRMLS_C);
+   } zend_end_try();
php_rshutdown_session_globals(TSRMLS_C);

/* this should NOT be done in php_rshutdown_session_globals() */

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2012-03-07 19:47:18 UTC (rev 324008)
+++ php/php-src/branches/PHP_5_4/NEWS   2012-03-08 03:31:46 UTC (rev 324009)
@@ -44,6 +44,10 @@
   . Fixed bug #60948 (mysqlnd FTBFS when -Wformat-security is enabled).
 (Johannes)

+- Session
+  . Fixed bug #60634 (Segmentation fault when trying to die() in
+SessionHandler::write()). (Ilia)
+
 - SOAP
   . Fixed bug #60887 (SoapClient ignores user_agent option and sends no
 User-Agent header). (carloschilazo at gmail dot com)

Modified: php/php-src/branches/PHP_5_4/ext/session/session.c
===
--- php/php-src/branches/PHP_5_4/ext/session/session.c  2012-03-07 19:47:18 UTC 
(rev 324008)
+++ php/php-src/branches/PHP_5_4/ext/session/session.c  2012-03-08 03:31:46 UTC 
(rev 324009)
@@ -1450,9 +1450,7 @@
 {
if (PS(session_status) == php_session_active) {
PS(session_status) = php_session_none;
-   zend_try {
-   php_session_save_current_state(TSRMLS_C);
-   } zend_end_try();
+   php_session_save_current_state(TSRMLS_C);
}
 }
 /* }}} */
@@ -2142,7 +2140,9 @@
 {
int i;

-   php_session_flush(TSRMLS_C);
+   zend_try {
+   php_session_flush(TSRMLS_C);
+   } zend_end_try();
php_rshutdown_session_globals(TSRMLS_C);

/* this should NOT be done in php_rshutdown_session_globals() */

Modified: php/php-src/trunk/ext/session/session.c
===
--- php/php-src/trunk/ext/session/session.c 2012-03-07 19:47:18 UTC (rev 
324008)
+++ php/php-src/trunk/ext/session/session.c 2012-03-08 03:31:46 UTC (rev 
324009)
@@ -1450,9 +1450,7 @@
 {
if (PS(session_status) == php_session_active) {
PS(session_status) = php_session_none;
-   zend_try {
-   php_session_save_current_state(TSRMLS_C);
-   } zend_end_try();
+   php_session_save_current_state(TSRMLS_C);
}
 }
 /* }}} */
@@ -2142,7 +2140,9 @@
 {
int i;

-   

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt branches/PHP_5_3/main/streams/xp_socket.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/st

2012-03-04 Thread Ilia Alshanetsky
The operation can continue on-successfully so E_NOTICE seemed
appropriate, I don't see a problem with escalating this to E_WARNING.

On Sat, Mar 3, 2012 at 9:34 PM, Laruence larue...@php.net wrote:
 Hi:
   is a WARNING better?  :)

 thanks

 On Sun, Mar 4, 2012 at 4:36 AM, Ilia Alshanetsky il...@php.net wrote:
 iliaa                                    Sat, 03 Mar 2012 20:36:14 +

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

 Log:
 Fixed bug #60106 (stream_socket_server silently truncates long unix socket 
 paths)

 Bug: https://bugs.php.net/60106 (Open) stream_socket_server + long unix 
 socket path = 'Unknown error'

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    A   php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt
    U   php/php-src/branches/PHP_5_3/main/streams/xp_socket.c
    U   php/php-src/branches/PHP_5_4/NEWS
    A   php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug60106.phpt
    U   php/php-src/branches/PHP_5_4/main/streams/xp_socket.c
    A   php/php-src/trunk/ext/standard/tests/streams/bug60106.phpt
    U   php/php-src/trunk/main/streams/xp_socket.c


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



 --
 Laruence  Xinchen Hui
 http://www.laruence.com/

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



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt branches/PHP_5_3/main/streams/xp_socket.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/standa

2012-03-03 Thread Ilia Alshanetsky
iliaaSat, 03 Mar 2012 20:36:14 +

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

Log:
Fixed bug #60106 (stream_socket_server silently truncates long unix socket 
paths)

Bug: https://bugs.php.net/60106 (Open) stream_socket_server + long unix socket 
path = 'Unknown error'
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
A   php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt
U   php/php-src/branches/PHP_5_3/main/streams/xp_socket.c
U   php/php-src/branches/PHP_5_4/NEWS
A   php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug60106.phpt
U   php/php-src/branches/PHP_5_4/main/streams/xp_socket.c
A   php/php-src/trunk/ext/standard/tests/streams/bug60106.phpt
U   php/php-src/trunk/main/streams/xp_socket.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2012-03-03 15:08:21 UTC (rev 323851)
+++ php/php-src/branches/PHP_5_3/NEWS	2012-03-03 20:36:14 UTC (rev 323852)
@@ -62,6 +62,8 @@
 - Streams:
   . Fixed bug #61115 (stream related segfault on fatal error in
 php_stream_context_link). (Gustavo)
+  . Fixed bug #60106 (stream_socket_server silently truncates long unix
+socket paths). (Ilia)
   . Further fix for bug #60455 (stream_get_line misbehaves if EOF is not
 detected together with the last read). (Gustavo)
   . Fixed bug #60817 (stream_get_line() reads from stream even when there is

Added: php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt	2012-03-03 20:36:14 UTC (rev 323852)
@@ -0,0 +1,14 @@
+--TEST--
+Bug#60106 (stream_socket_server silently truncates long unix socket paths)
+--FILE--
+?php
+	error_reporting(E_ALL | E_NOTICE);
+	stream_socket_server(unix:///tmp/ . str_repeat(a, 4096));
+?
+===DONE===
+--EXPECTF--
+Notice: stream_socket_server(): socket path exceeded the maximum allowed length of %d bytes and was truncated in %s on line %d
+
+Warning: stream_socket_server(): unable to connect to unix:///tmp/aaa in %s on line %d
+===DONE===
+

Modified: php/php-src/branches/PHP_5_3/main/streams/xp_socket.c
===
--- php/php-src/branches/PHP_5_3/main/streams/xp_socket.c	2012-03-03 15:08:21 UTC (rev 323851)
+++ php/php-src/branches/PHP_5_3/main/streams/xp_socket.c	2012-03-03 20:36:14 UTC (rev 323852)
@@ -514,6 +514,7 @@
 		 * BUT, to get into this branch of code, the name is too long,
 		 * so we don't care. */
 		xparam-inputs.namelen = sizeof(unix_addr-sun_path) - 1;
+		php_error_docref(NULL TSRMLS_CC, E_NOTICE, socket path exceeded the maximum allowed length of %ld bytes and was truncated, sizeof(unix_addr-sun_path));
 	}

 	memcpy(unix_addr-sun_path, xparam-inputs.name, xparam-inputs.namelen);

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS	2012-03-03 15:08:21 UTC (rev 323851)
+++ php/php-src/branches/PHP_5_4/NEWS	2012-03-03 20:36:14 UTC (rev 323852)
@@ -45,6 +45,7 @@
 - Standard:
   . Fixed memory leak in substr_replace. (Pierrick)
   . Make max_file_uploads ini directive settable outside of php.ini (Rasmus)
+  . Fixed bug #60106 (stream_socket_server silently truncates long unix socket paths). (Ilia)

 - XMLRPC:
   . Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikita Popov)

Added: php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug60106.phpt
===
--- php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug60106.phpt	(rev 0)
+++ 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/logical_filters.c branches/PHP_5_3/ext/filter/tests/bug55478.phpt branches/PHP_5_4/ext/filter/logical_filters.c branches/

2011-12-04 Thread Ilia Alshanetsky
iliaaSun, 04 Dec 2011 14:52:40 +

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

Log:
Fixed Bug #55478 (FILTER_VALIDATE_EMAIL fails with internationalized
domain name addresses containing 1 -).

Bug: https://bugs.php.net/55478 (Open) FILTER_VALIDATE_EMAIL fails with valid 
addresses containing -- twice
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c
A   php/php-src/branches/PHP_5_3/ext/filter/tests/bug55478.phpt
U   php/php-src/branches/PHP_5_4/ext/filter/logical_filters.c
A   php/php-src/branches/PHP_5_4/ext/filter/tests/bug55478.phpt
U   php/php-src/trunk/ext/filter/logical_filters.c
A   php/php-src/trunk/ext/filter/tests/bug55478.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2011-12-04 14:13:16 UTC (rev 320368)
+++ php/php-src/branches/PHP_5_3/NEWS	2011-12-04 14:52:40 UTC (rev 320369)
@@ -1,6 +1,9 @@
 PHPNEWS
 |||
 ?? ??? 2011, PHP 5.3.9
+- Filter:
+  . Fixed Bug #55478 (FILTER_VALIDATE_EMAIL fails with internationalized
+domain name addresses containing 1 -). (Ilia)

 24 Nov 2011, PHP 5.3.9RC2


Modified: php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c
===
--- php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c	2011-12-04 14:13:16 UTC (rev 320368)
+++ php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c	2011-12-04 14:52:40 UTC (rev 320369)
@@ -522,7 +522,7 @@
 	 * Feel free to use and redistribute this code. But please keep this copyright notice.
 	 *
 	 */
-	const char regexp[] = /^(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){255,})(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){65,}@)(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22))(?:\\.(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-[a-z0-9]+)*\\.){1,126}){1,}(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-[a-z0-9]+)*)|(?:\\[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\\.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\\]))$/iD;
+	const char regexp[] = /^(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){255,})(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){65,}@)(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22))(?:\\.(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-+[a-z0-9]+)*\\.){1,126}){1,}(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-+[a-z0-9]+)*)|(?:\\[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\\.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\\]))$/iD;

 	pcre   *re = NULL;
 	pcre_extra *pcre_extra = NULL;

Added: php/php-src/branches/PHP_5_3/ext/filter/tests/bug55478.phpt
===
--- php/php-src/branches/PHP_5_3/ext/filter/tests/bug55478.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/filter/tests/bug55478.phpt	2011-12-04 14:52:40 UTC (rev 320369)
@@ -0,0 +1,11 @@
+--TEST--
+Bug #55478 (FILTER_VALIDATE_EMAIL fails with internationalized domain name addresses containing 1 -)
+--SKIPIF--
+?php if (!extension_loaded(filter)) die(skip); ?
+--FILE--
+?php
+$email_address = t...@xn--example--7za.de; // example-ä.de
+var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));
+?
+--EXPECT--
+string(24) 

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pgsql/pgsql.c branches/PHP_5_3/ext/pgsql/tests/bug60244.phpt branches/PHP_5_4/ext/pgsql/pgsql.c branches/PHP_5_4/ext/pgsql/t

2011-11-16 Thread Ilia Alshanetsky
Previous, missing news entry.

On Tue, Nov 15, 2011 at 1:06 PM, Felipe Pena felipe...@gmail.com wrote:
 2011/11/15 Ilia Alshanetsky il...@php.net:
 iliaa                                    Tue, 15 Nov 2011 18:02:58 +

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

 Log:
 Fixed bug #60244 (pg_fetch_* functions do not validate that row param is 0).

 Bug: https://bugs.php.net/60244 (Open) pg_fetch_* functions behave strangely 
 with row = -1

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c
    A   php/php-src/branches/PHP_5_3/ext/pgsql/tests/bug60244.phpt
    U   php/php-src/branches/PHP_5_4/ext/pgsql/pgsql.c
    A   php/php-src/branches/PHP_5_4/ext/pgsql/tests/bug60244.phpt
    U   php/php-src/trunk/ext/pgsql/pgsql.c
    A   php/php-src/trunk/ext/pgsql/tests/bug60244.phpt


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


 There is change in NEWS that seems accidentaly:

 +- Json:
 +  . Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects
 +    with numeric string properties). (Ilia, dchurch at sciencelogic dot com)
 +

 --
 Regards,
 Felipe Pena

 --
 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/NEWS branches/PHP_5_3/ext/pgsql/pgsql.c branches/PHP_5_3/ext/pgsql/tests/bug60244.phpt branches/PHP_5_4/ext/pgsql/pgsql.c branches/PHP_5_4/ext/pgsql/tests

2011-11-15 Thread Ilia Alshanetsky
iliaaTue, 15 Nov 2011 18:02:58 +

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

Log:
Fixed bug #60244 (pg_fetch_* functions do not validate that row param is 0).

Bug: https://bugs.php.net/60244 (Open) pg_fetch_* functions behave strangely 
with row = -1
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c
A   php/php-src/branches/PHP_5_3/ext/pgsql/tests/bug60244.phpt
U   php/php-src/branches/PHP_5_4/ext/pgsql/pgsql.c
A   php/php-src/branches/PHP_5_4/ext/pgsql/tests/bug60244.phpt
U   php/php-src/trunk/ext/pgsql/pgsql.c
A   php/php-src/trunk/ext/pgsql/tests/bug60244.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2011-11-15 17:55:33 UTC (rev 319258)
+++ php/php-src/branches/PHP_5_3/NEWS	2011-11-15 18:02:58 UTC (rev 319259)
@@ -29,6 +29,10 @@
 - Phar:
   . Fixed bug #60261 (NULL pointer dereference in phar). (Felipe)

+- Postgres:
+  . Fixed bug #60244 (pg_fetch_* functions do not validate that row param
+is 0). (Ilia)
+
 - SOAP
   . Fixed bug #44686 (SOAP-ERROR: Parsing WSDL with references). (Dmitry)

@@ -83,6 +87,10 @@
   . Fixed bug #48476 (cloning extended DateTime class without calling
 parent::__constr crashed PHP). (Hannes)

+- Json:
+  . Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects
+with numeric string properties). (Ilia, dchurch at sciencelogic dot com)
+
 - MySQL:
   . Fixed bug #0 (mysql.trace_mode miscounts result sets). (Johannes)


Modified: php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c
===
--- php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c	2011-11-15 17:55:33 UTC (rev 319258)
+++ php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c	2011-11-15 18:02:58 UTC (rev 319259)
@@ -2452,6 +2452,10 @@
 	} else {
 		convert_to_long(zrow);
 		row = Z_LVAL_P(zrow);
+		if (row  0) {
+			php_error_docref(NULL TSRMLS_CC, E_WARNING, The row parameter must be greater or equal to zero);
+			RETURN_FALSE;
+		}
 	}
 	use_row = ZEND_NUM_ARGS()  1  row != -1;

@@ -4798,10 +4802,24 @@
 	if (result_type  PGSQL_NUM) {
 		add_index_string(return_value, 0, pgsql_notify-relname, 1);
 		add_index_long(return_value, 1, pgsql_notify-be_pid);
+#if HAVE_PQPROTOCOLVERSION  HAVE_PQPARAMETERSTATUS
+		if (PQprotocolVersion(pgsql) = 3  atof(PQparameterStatus(pgsql, server_version)) = 9.0) {
+#else
+		if (atof(PG_VERSION) = 9.0) {
+#endif
+			add_index_string(return_value, 2, pgsql_notify-extra, 1);
+		}
 	}
 	if (result_type  PGSQL_ASSOC) {
 		add_assoc_string(return_value, message, pgsql_notify-relname, 1);
 		add_assoc_long(return_value, pid, pgsql_notify-be_pid);
+#if HAVE_PQPROTOCOLVERSION  HAVE_PQPARAMETERSTATUS
+		if (PQprotocolVersion(pgsql) = 3  atof(PQparameterStatus(pgsql, server_version)) = 9.0) {
+#else
+		if (atof(PG_VERSION) = 9.0) {
+#endif
+			add_assoc_string(return_value, payload, pgsql_notify-extra, 1);
+		}
 	}
 	PQfreemem(pgsql_notify);
 }

Added: php/php-src/branches/PHP_5_3/ext/pgsql/tests/bug60244.phpt
===
--- php/php-src/branches/PHP_5_3/ext/pgsql/tests/bug60244.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/pgsql/tests/bug60244.phpt	2011-11-15 18:02:58 UTC (rev 319259)
@@ -0,0 +1,57 @@
+--TEST--
+Bug #60244 (pg_fetch_* functions do not validate that row param is 0)
+--SKIPIF--
+?php
+include(skipif.inc);
+?
+--FILE--
+?php
+
+include 'config.inc';
+
+$db = pg_connect($conn_str);
+$result = pg_query(select 'a' union select 'b');
+
+var_dump(pg_fetch_array($result, -1));
+var_dump(pg_fetch_assoc($result, -1));
+var_dump(pg_fetch_object($result, -1));
+var_dump(pg_fetch_row($result, -1));
+
+var_dump(pg_fetch_array($result, 0));
+var_dump(pg_fetch_assoc($result, 0));
+var_dump(pg_fetch_object($result, 0));
+var_dump(pg_fetch_row($result, 0));
+
+pg_close($db);
+
+?
+--EXPECTF--
+Warning: pg_fetch_array(): The row parameter must be greater or equal to zero in %sbug60244.php on line %d
+bool(false)
+
+Warning: pg_fetch_assoc(): The row parameter must be greater or equal to zero in %sbug60244.php on line %d
+bool(false)
+
+Warning: pg_fetch_object(): The row parameter must be greater or equal to zero in %sbug60244.php on line %d
+bool(false)
+
+Warning: pg_fetch_row(): The row parameter must be greater or equal to zero in %sbug60244.php on line %d
+bool(false)
+array(2) {
+  [0]=
+  string(1) a
+  [?column?]=
+  string(1) a
+}
+array(1) {
+  [?column?]=
+  string(1) a
+}
+object(stdClass)#1 (1) {
+  [?column?]=
+  string(1) a
+}
+array(1) {
+  [0]=
+  string(1) a
+}

Modified: php/php-src/branches/PHP_5_4/ext/pgsql/pgsql.c
===
--- php/php-src/branches/PHP_5_4/ext/pgsql/pgsql.c	2011-11-15 17:55:33 UTC (rev 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/json/json.c branches/PHP_5_3/ext/json/tests/bug55543.phpt branches/PHP_5_4/ext/json/json.c branches/PHP_5_4/ext/json/tests/bug55543.phpt trunk/ext/jso

2011-10-17 Thread Ilia Alshanetsky
iliaaMon, 17 Oct 2011 23:51:25 +

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

Log:
Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects with 
numeric string properties)

Bug: https://bugs.php.net/55543 (Open) json_encode with JSON_NUMERIC_CHECK 
fails on objects with numeric string props
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/json/json.c
A   php/php-src/branches/PHP_5_3/ext/json/tests/bug55543.phpt
U   php/php-src/branches/PHP_5_4/ext/json/json.c
A   php/php-src/branches/PHP_5_4/ext/json/tests/bug55543.phpt
U   php/php-src/trunk/ext/json/json.c
A   php/php-src/trunk/ext/json/tests/bug55543.phpt

Modified: php/php-src/branches/PHP_5_3/ext/json/json.c
===
--- php/php-src/branches/PHP_5_3/ext/json/json.c2011-10-17 22:13:28 UTC 
(rev 318177)
+++ php/php-src/branches/PHP_5_3/ext/json/json.c2011-10-17 23:51:25 UTC 
(rev 318178)
@@ -238,7 +238,7 @@
need_comma = 1;
}

-   json_escape_string(buf, key, 
key_len - 1, options TSRMLS_CC);
+   json_escape_string(buf, key, 
key_len - 1, options  ~PHP_JSON_NUMERIC_CHECK TSRMLS_CC);
smart_str_appendc(buf, ':');

php_json_encode(buf, *data, 
options TSRMLS_CC);

Added: php/php-src/branches/PHP_5_3/ext/json/tests/bug55543.phpt
===
--- php/php-src/branches/PHP_5_3/ext/json/tests/bug55543.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/json/tests/bug55543.phpt   2011-10-17 
23:51:25 UTC (rev 318178)
@@ -0,0 +1,13 @@
+--TEST--
+Bug #55543 (json_encode() with JSON_NUMERIC_CHECK  numeric string properties)
+--SKIPIF--
+?php if (!extension_loaded(json)) print skip; ?
+--FILE--
+?php
+$a = new stdClass;
+$a-{1} = 5;
+
+var_dump(json_encode($a, JSON_NUMERIC_CHECK));
+?
+--EXPECT--
+string(7) {1:5}

Modified: php/php-src/branches/PHP_5_4/ext/json/json.c
===
--- php/php-src/branches/PHP_5_4/ext/json/json.c2011-10-17 22:13:28 UTC 
(rev 318177)
+++ php/php-src/branches/PHP_5_4/ext/json/json.c2011-10-17 23:51:25 UTC 
(rev 318178)
@@ -297,7 +297,7 @@

json_pretty_print_indent(buf, 
options TSRMLS_CC);

-   json_escape_string(buf, key, 
key_len - 1, options TSRMLS_CC);
+   json_escape_string(buf, key, 
key_len - 1, options  ~PHP_JSON_NUMERIC_CHECK TSRMLS_CC);
smart_str_appendc(buf, ':');

json_pretty_print_char(buf, 
options, ' ' TSRMLS_CC);

Added: php/php-src/branches/PHP_5_4/ext/json/tests/bug55543.phpt
===
--- php/php-src/branches/PHP_5_4/ext/json/tests/bug55543.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/json/tests/bug55543.phpt   2011-10-17 
23:51:25 UTC (rev 318178)
@@ -0,0 +1,13 @@
+--TEST--
+Bug #55543 (json_encode() with JSON_NUMERIC_CHECK  numeric string properties)
+--SKIPIF--
+?php if (!extension_loaded(json)) print skip; ?
+--FILE--
+?php
+$a = new stdClass;
+$a-{1} = 5;
+
+var_dump(json_encode($a, JSON_NUMERIC_CHECK));
+?
+--EXPECT--
+string(7) {1:5}

Modified: php/php-src/trunk/ext/json/json.c
===
--- php/php-src/trunk/ext/json/json.c   2011-10-17 22:13:28 UTC (rev 318177)
+++ php/php-src/trunk/ext/json/json.c   2011-10-17 23:51:25 UTC (rev 318178)
@@ -297,7 +297,7 @@

json_pretty_print_indent(buf, 
options TSRMLS_CC);

-   json_escape_string(buf, key, 
key_len - 1, options TSRMLS_CC);
+   json_escape_string(buf, key, 
key_len - 1, options  ~PHP_JSON_NUMERIC_CHECK TSRMLS_CC);
smart_str_appendc(buf, ':');

json_pretty_print_char(buf, 
options, ' ' TSRMLS_CC);

Added: php/php-src/trunk/ext/json/tests/bug55543.phpt
===
--- php/php-src/trunk/ext/json/tests/bug55543.phpt  
(rev 0)
+++ php/php-src/trunk/ext/json/tests/bug55543.phpt  2011-10-17 23:51:25 UTC 
(rev 318178)
@@ -0,0 +1,13 @@
+--TEST--
+Bug #55543 (json_encode() with JSON_NUMERIC_CHECK  numeric string properties)
+--SKIPIF--
+?php if 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/configure.in branches/PHP_5_4/configure.in trunk/configure.in

2011-10-14 Thread Ilia Alshanetsky
iliaaFri, 14 Oct 2011 12:43:27 +

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

Log:
Fixed bug #60019 (Function time_nanosleep() is undefined on OS X).

Bug: https://bugs.php.net/60019 (Open) Function time_nanosleep() is undefined 
on OS X
  
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_4/configure.in
U   php/php-src/trunk/configure.in

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-10-14 11:41:36 UTC (rev 318105)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-10-14 12:43:27 UTC (rev 318106)
@@ -3,6 +3,7 @@
 ?? ??? 2011, PHP 5.3.9

 - Core:
+  . Fixed bug #60019 (Function time_nanosleep() is undefined on OS X). (Ilia)
   . Fixed bug #55798 (serialize followed by unserialize with numeric object
 prop. gives integer prop). (Gustavo)
   . Fixed bug #55749 (TOCTOU issue in getenv() on Windows builds). (Pierre)

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2011-10-14 11:41:36 UTC (rev 
318105)
+++ php/php-src/branches/PHP_5_3/configure.in   2011-10-14 12:43:27 UTC (rev 
318106)
@@ -608,6 +608,7 @@
 vsnprintf \
 vasprintf \
 asprintf \
+nanosleep \
 )

 dnl Some systems (like OpenSolaris) do not have nanosleep in libc

Modified: php/php-src/branches/PHP_5_4/configure.in
===
--- php/php-src/branches/PHP_5_4/configure.in   2011-10-14 11:41:36 UTC (rev 
318105)
+++ php/php-src/branches/PHP_5_4/configure.in   2011-10-14 12:43:27 UTC (rev 
318106)
@@ -684,6 +684,7 @@
 vsnprintf \
 vasprintf \
 asprintf \
+nanosleep \
 )

 dnl Some systems (like OpenSolaris) do not have nanosleep in libc

Modified: php/php-src/trunk/configure.in
===
--- php/php-src/trunk/configure.in  2011-10-14 11:41:36 UTC (rev 318105)
+++ php/php-src/trunk/configure.in  2011-10-14 12:43:27 UTC (rev 318106)
@@ -684,6 +684,7 @@
 vsnprintf \
 vasprintf \
 asprintf \
+nanosleep \
 )

 dnl Some systems (like OpenSolaris) do not have nanosleep in libc

-- 
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/sysvshm/sysvshm.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/sysvshm/sysvshm.c trunk/ext/sysvshm/sysvshm.c

2011-10-03 Thread Ilia Alshanetsky
iliaaMon, 03 Oct 2011 18:17:12 +

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

Log:
Fixed bug #55750 (memory copy issue in sysvshm extension).

Bug: https://bugs.php.net/55750 (Open) memory copy issue in sysvshm extension
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/sysvshm/sysvshm.c
U   php/php-src/branches/PHP_5_4/NEWS
U   php/php-src/branches/PHP_5_4/ext/sysvshm/sysvshm.c
U   php/php-src/trunk/ext/sysvshm/sysvshm.c

Modified: php/php-src/branches/PHP_5_3/ext/sysvshm/sysvshm.c
===
--- php/php-src/branches/PHP_5_3/ext/sysvshm/sysvshm.c  2011-10-03 17:01:17 UTC 
(rev 317672)
+++ php/php-src/branches/PHP_5_3/ext/sysvshm/sysvshm.c  2011-10-03 18:17:12 UTC 
(rev 317673)
@@ -424,7 +424,7 @@
ptr-free += chunk_ptr-next;
ptr-end -= chunk_ptr-next;
if (memcpy_len  0) {
-   memcpy(chunk_ptr, next_chunk_ptr, memcpy_len);
+   memmove(chunk_ptr, next_chunk_ptr, memcpy_len);
}
return 0;
 }

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS   2011-10-03 17:01:17 UTC (rev 317672)
+++ php/php-src/branches/PHP_5_4/NEWS   2011-10-03 18:17:12 UTC (rev 317673)
@@ -15,6 +15,10 @@
   . Fixed bug #55825 (Missing initial value of static locals in trait methods).
 (Laruence)

+- Sysvshm
+  . Fixed bug #55750 (memory copy issue in sysvshm extension).
+(Ilia, jeffhuang at gmail dot com)
+
 - Zlib:
   . Fixed bug #55544 (ob_gzhandler always conflicts with
 zlib.output_compression). (Mike)

Modified: php/php-src/branches/PHP_5_4/ext/sysvshm/sysvshm.c
===
--- php/php-src/branches/PHP_5_4/ext/sysvshm/sysvshm.c  2011-10-03 17:01:17 UTC 
(rev 317672)
+++ php/php-src/branches/PHP_5_4/ext/sysvshm/sysvshm.c  2011-10-03 18:17:12 UTC 
(rev 317673)
@@ -424,7 +424,7 @@
ptr-free += chunk_ptr-next;
ptr-end -= chunk_ptr-next;
if (memcpy_len  0) {
-   memcpy(chunk_ptr, next_chunk_ptr, memcpy_len);
+   memmove(chunk_ptr, next_chunk_ptr, memcpy_len);
}
return 0;
 }

Modified: php/php-src/trunk/ext/sysvshm/sysvshm.c
===
--- php/php-src/trunk/ext/sysvshm/sysvshm.c 2011-10-03 17:01:17 UTC (rev 
317672)
+++ php/php-src/trunk/ext/sysvshm/sysvshm.c 2011-10-03 18:17:12 UTC (rev 
317673)
@@ -424,7 +424,7 @@
ptr-free += chunk_ptr-next;
ptr-end -= chunk_ptr-next;
if (memcpy_len  0) {
-   memcpy(chunk_ptr, next_chunk_ptr, memcpy_len);
+   memmove(chunk_ptr, next_chunk_ptr, memcpy_len);
}
return 0;
 }

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/zip/php_zip.c trunk/ext/zip/php_zip.c

2011-09-21 Thread Ilia Alshanetsky
iliaaWed, 21 Sep 2011 19:08:30 +

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

Log:
Removed unreachable code (stream == NULL check is done already)

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/zip/php_zip.c
U   php/php-src/trunk/ext/zip/php_zip.c

Modified: php/php-src/branches/PHP_5_4/ext/zip/php_zip.c
===
--- php/php-src/branches/PHP_5_4/ext/zip/php_zip.c  2011-09-21 19:05:21 UTC 
(rev 317118)
+++ php/php-src/branches/PHP_5_4/ext/zip/php_zip.c  2011-09-21 19:08:30 UTC 
(rev 317119)
@@ -272,14 +272,6 @@
}

n = 0;
-   if (stream == NULL) {
-   int ret = zip_fclose(zf);
-   efree(fullpath);
-   efree(file_basename);
-   efree(file_dirname_fullpath);
-   free(new_state.cwd);
-   return 0;
-   }

while ((n=zip_fread(zf, b, sizeof(b)))  0) {
php_stream_write(stream, b, n);

Modified: php/php-src/trunk/ext/zip/php_zip.c
===
--- php/php-src/trunk/ext/zip/php_zip.c 2011-09-21 19:05:21 UTC (rev 317118)
+++ php/php-src/trunk/ext/zip/php_zip.c 2011-09-21 19:08:30 UTC (rev 317119)
@@ -272,14 +272,6 @@
}

n = 0;
-   if (stream == NULL) {
-   int ret = zip_fclose(zf);
-   efree(fullpath);
-   efree(file_basename);
-   efree(file_dirname_fullpath);
-   free(new_state.cwd);
-   return 0;
-   }

while ((n=zip_fread(zf, b, sizeof(b)))  0) {
php_stream_write(stream, b, n);

-- 
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_4/ext/pdo/pdo_stmt.c trunk/ext/pdo/pdo_stmt.c

2011-09-13 Thread Ilia Alshanetsky
iliaaTue, 13 Sep 2011 16:36:29 +

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

Log:
Improve parameter handling cod

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c
U   php/php-src/trunk/ext/pdo/pdo_stmt.c

Modified: php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c
===
--- php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c 2011-09-13 16:21:24 UTC 
(rev 31)
+++ php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c 2011-09-13 16:36:29 UTC 
(rev 316667)
@@ -1333,16 +1333,15 @@
long how = PDO_FETCH_CLASS;
long ori = PDO_FETCH_ORI_NEXT;
long off = 0;
-   char *class_name;
+   char *class_name = NULL;
int class_name_len;
zend_class_entry *old_ce;
-   zval *old_ctor_args, *ctor_args;
+   zval *old_ctor_args, *ctor_args = NULL;
int error = 0, old_arg_count;

PHP_STMT_GET_OBJ;

-   if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |sz,
-   class_name, class_name_len, ctor_args)) {
+   if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s!a, 
class_name, class_name_len, ctor_args)) {
RETURN_FALSE;
}

@@ -1357,17 +1356,8 @@
old_arg_count = stmt-fetch.cls.fci.param_count;

do_fetch_opt_finish(stmt, 0 TSRMLS_CC);
-
-   switch(ZEND_NUM_ARGS()) {
-   case 0:
-   stmt-fetch.cls.ce = zend_standard_class_def;
-   break;
-   case 2:
-   if (Z_TYPE_P(ctor_args) != IS_NULL  Z_TYPE_P(ctor_args) != 
IS_ARRAY) {
-   pdo_raise_impl_error(stmt-dbh, stmt, HY000, 
ctor_args must be either NULL or an array TSRMLS_CC);
-   error = 1;
-   break;
-   }
+
+   if (ctor_args) {
if (Z_TYPE_P(ctor_args) == IS_ARRAY  
zend_hash_num_elements(Z_ARRVAL_P(ctor_args))) {
ALLOC_ZVAL(stmt-fetch.cls.ctor_args);
*stmt-fetch.cls.ctor_args = *ctor_args;
@@ -1375,15 +1365,16 @@
} else {
stmt-fetch.cls.ctor_args = NULL;
}
-   /* no break */
-   case 1:
+   }
+   if (class_name  !error) {
stmt-fetch.cls.ce = zend_fetch_class(class_name, 
class_name_len, ZEND_FETCH_CLASS_AUTO TSRMLS_CC);

if (!stmt-fetch.cls.ce) {
pdo_raise_impl_error(stmt-dbh, stmt, HY000, Could 
not find user-supplied class TSRMLS_CC);
error = 1;
-   break;
}
+   } else if (!error) {
+   stmt-fetch.cls.ce = zend_standard_class_def;
}

if (!error  !do_fetch(stmt, TRUE, return_value, how, ori, off, 0 
TSRMLS_CC)) {

Modified: php/php-src/trunk/ext/pdo/pdo_stmt.c
===
--- php/php-src/trunk/ext/pdo/pdo_stmt.c2011-09-13 16:21:24 UTC (rev 
31)
+++ php/php-src/trunk/ext/pdo/pdo_stmt.c2011-09-13 16:36:29 UTC (rev 
316667)
@@ -1333,16 +1333,15 @@
long how = PDO_FETCH_CLASS;
long ori = PDO_FETCH_ORI_NEXT;
long off = 0;
-   char *class_name;
+   char *class_name = NULL;
int class_name_len;
zend_class_entry *old_ce;
-   zval *old_ctor_args, *ctor_args;
+   zval *old_ctor_args, *ctor_args = NULL;
int error = 0, old_arg_count;

PHP_STMT_GET_OBJ;

-   if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |sz,
-   class_name, class_name_len, ctor_args)) {
+   if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s!a, 
class_name, class_name_len, ctor_args)) {
RETURN_FALSE;
}

@@ -1357,17 +1356,8 @@
old_arg_count = stmt-fetch.cls.fci.param_count;

do_fetch_opt_finish(stmt, 0 TSRMLS_CC);
-
-   switch(ZEND_NUM_ARGS()) {
-   case 0:
-   stmt-fetch.cls.ce = zend_standard_class_def;
-   break;
-   case 2:
-   if (Z_TYPE_P(ctor_args) != IS_NULL  Z_TYPE_P(ctor_args) != 
IS_ARRAY) {
-   pdo_raise_impl_error(stmt-dbh, stmt, HY000, 
ctor_args must be either NULL or an array TSRMLS_CC);
-   error = 1;
-   break;
-   }
+
+   if (ctor_args) {
if (Z_TYPE_P(ctor_args) == IS_ARRAY  
zend_hash_num_elements(Z_ARRVAL_P(ctor_args))) {
ALLOC_ZVAL(stmt-fetch.cls.ctor_args);
*stmt-fetch.cls.ctor_args = *ctor_args;
@@ -1375,15 +1365,16 @@
} else {
stmt-fetch.cls.ctor_args = NULL;
}
-   /* no break */
-   case 1:
+   }
+   if (class_name  !error) {
stmt-fetch.cls.ce = zend_fetch_class(class_name, 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/base64.c branches/PHP_5_3/ext/standard/tests/url/bug55273.phpt branches/PHP_5_4/ext/standard/base64.c branches/PHP_5_4/

2011-09-12 Thread Ilia Alshanetsky
iliaaMon, 12 Sep 2011 17:20:24 +

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

Log:
Fixed bug #55273 (base64_decode() with strict rejects whitespace after pad)

Bug: https://bugs.php.net/55273 (Open) base64_decode with strict rejects 
whitespace after pad
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/base64.c
A   php/php-src/branches/PHP_5_3/ext/standard/tests/url/bug55273.phpt
U   php/php-src/branches/PHP_5_4/ext/standard/base64.c
A   php/php-src/branches/PHP_5_4/ext/standard/tests/url/bug55273.phpt
U   php/php-src/trunk/ext/standard/base64.c
A   php/php-src/trunk/ext/standard/tests/url/bug55273.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-09-12 17:09:58 UTC (rev 316559)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-09-12 17:20:24 UTC (rev 316560)
@@ -12,6 +12,8 @@
 condition. (Gustavo)
   . Fixed bug #55504 (Content-Type header is not parsed correctly on
 HTTP POST request). (Hannes)
+  . Fixed bug #55273 (base64_decode() with strict rejects whitespace after
+pad). (Ilia)

 - Curl:
   . Fixed bug #54798 (Segfault when CURLOPT_STDERR file pointer is closed

Modified: php/php-src/branches/PHP_5_3/ext/standard/base64.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/base64.c  2011-09-12 17:09:58 UTC 
(rev 316559)
+++ php/php-src/branches/PHP_5_3/ext/standard/base64.c  2011-09-12 17:20:24 UTC 
(rev 316560)
@@ -153,6 +153,14 @@
while ((ch = *current++) != '\0'  length--  0) {
if (ch == base64_pad) {
if (*current != '='  ((i % 4) == 1 || (strict  
length  0))) {
+   if ((i % 4) != 1) {
+   while (isspace(*(++current))) {
+   continue;
+   }
+   if (*current == '\0') {
+   continue;
+   }
+   }
efree(result);
return NULL;
}

Added: php/php-src/branches/PHP_5_3/ext/standard/tests/url/bug55273.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/url/bug55273.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/url/bug55273.phpt   
2011-09-12 17:20:24 UTC (rev 316560)
@@ -0,0 +1,25 @@
+--TEST--
+Bug #55273 (base64_decode() with strict rejects whitespace after pad)
+--FILE--
+?php
+function test($s) {
+   $v = chunk_split(base64_encode($s));
+   $r = base64_decode($v, True);
+   var_dump($v, $r);
+}
+
+test('PHP');
+test('PH');
+test('P');
+
+?
+--EXPECT--
+string(6) UEhQ
+
+string(3) PHP
+string(6) UEg=
+
+string(2) PH
+string(6) UA==
+
+string(1) P

Modified: php/php-src/branches/PHP_5_4/ext/standard/base64.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/base64.c  2011-09-12 17:09:58 UTC 
(rev 316559)
+++ php/php-src/branches/PHP_5_4/ext/standard/base64.c  2011-09-12 17:20:24 UTC 
(rev 316560)
@@ -153,6 +153,14 @@
while ((ch = *current++) != '\0'  length--  0) {
if (ch == base64_pad) {
if (*current != '='  ((i % 4) == 1 || (strict  
length  0))) {
+   if ((i % 4) != 1) {
+   while (isspace(*(++current))) {
+   continue;
+   }
+   if (*current == '\0') {
+   continue;
+   }
+   }
efree(result);
return NULL;
}

Added: php/php-src/branches/PHP_5_4/ext/standard/tests/url/bug55273.phpt
===
--- php/php-src/branches/PHP_5_4/ext/standard/tests/url/bug55273.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/standard/tests/url/bug55273.phpt   
2011-09-12 17:20:24 UTC (rev 316560)
@@ -0,0 +1,25 @@
+--TEST--
+Bug #55273 (base64_decode() with strict rejects whitespace after pad)
+--FILE--
+?php
+function test($s) {
+   $v = chunk_split(base64_encode($s));
+   $r = base64_decode($v, True);
+   var_dump($v, $r);
+}
+
+test('PHP');
+test('PH');
+test('P');
+
+?
+--EXPECT--
+string(6) UEhQ
+
+string(3) PHP
+string(6) UEg=
+
+string(2) PH
+string(6) UA==
+
+string(1) P


[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/curl/tests/curl_basic_008.phpt branches/PHP_5_4/ext/curl/tests/curl_basic_010.phpt trunk/ext/curl/tests/curl_basic_008.phpt trunk/ext/curl/tests/curl_

2011-09-07 Thread Ilia Alshanetsky
iliaaWed, 07 Sep 2011 15:31:48 +

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

Log:
Fixed tests (skip when catch-all DNS such as openDNS is being used)

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/curl/tests/curl_basic_008.phpt
U   php/php-src/branches/PHP_5_4/ext/curl/tests/curl_basic_010.phpt
U   php/php-src/trunk/ext/curl/tests/curl_basic_008.phpt
U   php/php-src/trunk/ext/curl/tests/curl_basic_010.phpt

Modified: php/php-src/branches/PHP_5_4/ext/curl/tests/curl_basic_008.phpt
===
--- php/php-src/branches/PHP_5_4/ext/curl/tests/curl_basic_008.phpt 
2011-09-07 15:28:12 UTC (rev 316364)
+++ php/php-src/branches/PHP_5_4/ext/curl/tests/curl_basic_008.phpt 
2011-09-07 15:31:48 UTC (rev 316365)
@@ -3,7 +3,13 @@
 --CREDITS--
 TestFest 2009 - AFUP - Perrick Penet perr...@noparking.net
 --SKIPIF--
-?php if (!extension_loaded(curl)) print skip; ?
+?php
+   if (!extension_loaded(curl)) print skip;
+   $addr = www..uniqid()...uniqid();
+   if (gethostbyname($addr) != $addr) {
+   print skip catch all dns;
+   }
+?
 --FILE--
 ?php


Modified: php/php-src/branches/PHP_5_4/ext/curl/tests/curl_basic_010.phpt
===
--- php/php-src/branches/PHP_5_4/ext/curl/tests/curl_basic_010.phpt 
2011-09-07 15:28:12 UTC (rev 316364)
+++ php/php-src/branches/PHP_5_4/ext/curl/tests/curl_basic_010.phpt 
2011-09-07 15:31:48 UTC (rev 316365)
@@ -3,7 +3,13 @@
 --CREDITS--
 TestFest 2009 - AFUP - Perrick Penet perr...@noparking.net
 --SKIPIF--
-?php if (!extension_loaded(curl)) print skip; ?
+?php
+   if (!extension_loaded(curl)) print skip;
+   $addr = www..uniqid()...uniqid();
+   if (gethostbyname($addr) != $addr) {
+   print skip catch all dns;
+   }
+?
 --FILE--
 ?php


Modified: php/php-src/trunk/ext/curl/tests/curl_basic_008.phpt
===
--- php/php-src/trunk/ext/curl/tests/curl_basic_008.phpt2011-09-07 
15:28:12 UTC (rev 316364)
+++ php/php-src/trunk/ext/curl/tests/curl_basic_008.phpt2011-09-07 
15:31:48 UTC (rev 316365)
@@ -3,7 +3,13 @@
 --CREDITS--
 TestFest 2009 - AFUP - Perrick Penet perr...@noparking.net
 --SKIPIF--
-?php if (!extension_loaded(curl)) print skip; ?
+?php
+   if (!extension_loaded(curl)) print skip;
+   $addr = www..uniqid()...uniqid();
+   if (gethostbyname($addr) != $addr) {
+   print skip catch all dns;
+   }
+?
 --FILE--
 ?php


Modified: php/php-src/trunk/ext/curl/tests/curl_basic_010.phpt
===
--- php/php-src/trunk/ext/curl/tests/curl_basic_010.phpt2011-09-07 
15:28:12 UTC (rev 316364)
+++ php/php-src/trunk/ext/curl/tests/curl_basic_010.phpt2011-09-07 
15:31:48 UTC (rev 316365)
@@ -3,7 +3,13 @@
 --CREDITS--
 TestFest 2009 - AFUP - Perrick Penet perr...@noparking.net
 --SKIPIF--
-?php if (!extension_loaded(curl)) print skip; ?
+?php
+   if (!extension_loaded(curl)) print skip;
+   $addr = www..uniqid()...uniqid();
+   if (gethostbyname($addr) != $addr) {
+   print skip catch all dns;
+   }
+?
 --FILE--
 ?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/ NEWS configure.in main/php_version.h

2011-08-17 Thread Ilia Alshanetsky
iliaaWed, 17 Aug 2011 13:30:04 +

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

Log:
5.3.7

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-08-17 12:29:24 UTC (rev 315065)
+++ php/php-src/branches/PHP_5_3/NEWS	2011-08-17 13:30:04 UTC (rev 315066)
@@ -1,113 +1,12 @@
 PHPNEWS
 |||
-?? Aug 2011, PHP 5.3.7
-
-11 Aug 2011, PHP 5.3.7 RC5
+18 Aug 2011, PHP 5.3.7
 - Upgraded bundled SQLite to version 3.7.7.1. (Scott)
+- Upgraded bundled PCRE to version 8.12. (Scott)

-- Core
-  . Fixed bug #55399 (parse_url() incorrectly treats ':' as a valid path).
-(Ilia)
-
-- Imap extension:
-  . Fixed bug #55313 (Number of retries not set when params specified).
-(kevin at kevinlocke dot name)
-
-- MySQLi extension:
-  . Fixed bug #55283 (SSL options set by mysqli_ssl_set ignored for MySQLi
-persistent connections). (Andrey)
-
-- SOAP
-  . Fixed bug #55323 (SoapClient segmentation fault when XSD_TYPEKIND_EXTENSION
-contains itself). (Dmitry)
-
-
-28 Jul 2011, PHP 5.3.7 RC4
-- Improved core functions:
-  . Updated crypt_blowfish to 1.2. ((CVE-2011-2483) (Solar Designer)
-
-- OpenSSL
-  . openssl_encrypt()/openssl_decrypt() truncated keys of variable length
-ciphers to the OpenSSL default for the algorithm. (Scott)
-  . On blocking SSL sockets respect the timeout option where possible.
-(Scott)
-
-- Core
-  . Fixed bug #55339 (Segfault with allow_call_time_pass_reference = Off).
-(Dmitry)
-  . Fix bug #55295 [NEW]: popen_ex on windows, fixed possible heap overflow
-(Pierre)
-  . Fixed bug #50816 (Using class constants in array definition fails).
-(Pierrick, Dmitry)
-
-14 Jul 2011, PHP 5.3.7 RC3
 - Zend Engine:
   . Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even
 though the class has none). (Felipe)
-
-- Core
-  . Removed warning when argument of is_a() or is_subclass_of() is not
-a known class. (Stas)
-  . Fixed bug #55258 (Windows Version Detecting Error).
-( xiaomao5 at live dot com, Pierre)
-  . Fixed bug #55187 (readlink returns weird characters when false result).
-   (Pierre)
-  . Fixed bug #55014 (Compile failure due to improper use of ctime_r()). (Ilia)
-  . Fixed bug #54332 (Crash in zend_mm_check_ptr // Heap corruption). (Dmitry)
-  . Fixed bug #54204 (Can't set a value with a PATH section in php.ini).
-(Pierre)
-  . Fixed bug #54305 (Crash in gc_remove_zval_from_buffer). (Dmitry)
-  . Fixed bug #53727 (Inconsistent behavior of is_subclass_of with interfaces)
-(Ralph Schindler, Dmitry)
-  . Fixed buffer overflow on overlog salt in crypt(). (Clément LECIGNE, Stas)
-  . Fixed bug #52935 (call exit in user_error_handler cause stream relate
-core). (Gustavo)
-
-
-- MCrypt
-  . Change E_ERROR to E_WARNING in mcrypt_create_iv when not enough data
-has been fetched (Windows). (Pierre)
-  . Fixed bug #55169 (mcrypt_create_iv always fails to gather sufficient random
-data on Windows). (Pierre)
-
-- PDO DBlib:
-  . Fixed bug #54329 (MSSql extension memory leak).
-(dotslashpok at gmail dot com)
-
-30 Jun 2011, PHP 5.3.7 RC2
-- Core:
-  . Fixed crash in error_log(). (Felipe) Reported by Mateusz Kocielski.
-  . Fixed bug #55082 (var_export() doesn't escape properties properly).
-(Gustavo)
-
-- DateTime extension:
-  . Fixed bug where the DateTime object got changed while using date_diff().
-(Derick)
-
-- DBA extension:
-  . Supress warning on non-existent file open with Berkeley DB 5.2 (Chris Jones)
-
-- PDO ODBC driver:
-  . Fixed data type usage in 64bit. (leocsilva at gmail dot com)
-
-- PHP-FPM SAPI:
-  . Implemented FR #54499 (FPM ping and status_path should handle HEAD request). (fat)
-  . Implemented FR #54172 (Overriding the pid file location of php-fpm). (fat)
-  . Fixed missing Expires and Cache-Control headers for ping and status pages.
-(fat)
-  . Fixed memory leak. (fat) Reported and fixed by Giovanni Giacobbi.
-  . Fixed wrong value of log_level when invoking fpm with -tt. (fat)
-
-- SPL extension:
-  . Fixed bug #54971 (Wrong result when using iterator_to_array with use_keys
-on true). (Pierrick)
-
-16 Jun 2011, PHP 5.3.7 RC1
-- Upgraded bundled SQLite to version 3.7.6.3. (Scott)
-- Upgraded bundled PCRE to version 8.12. (Scott)
-- Increased the backtrack limit from 10 to 100 (Rasmus)
-
-- Zend Engine:
   . Fixed bug #55007 (compiler fail after previous fail). (Felipe)
   . Fixed bug #54910 (Crash when calling call_user_func with unknown function
 name). (Dmitry)
@@ -119,45 +18,72 @@
 (Tony, Dmitry)
   . Fixed bug 

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

2011-08-17 Thread Ilia Alshanetsky
iliaaWed, 17 Aug 2011 13:30:46 +

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

Log:
5.3.7

Changed paths:
A + php/php-src/tags/php_5_3_7/
(from php/php-src/branches/PHP_5_3/:r315066)


Property changes on: php/php-src/tags/php_5_3_7
___
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-08-17 Thread Ilia Alshanetsky
iliaaWed, 17 Aug 2011 14:28:24 +

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

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-08-17 14:21:18 UTC (rev 315070)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-08-17 14:28:24 UTC (rev 315071)
@@ -1,5 +1,7 @@
 PHPNEWS
 |||
+?? ??? 2011, PHP 5.3.8
+
 18 Aug 2011, PHP 5.3.7
 - Upgraded bundled SQLite to version 3.7.7.1. (Scott)
 - Upgraded bundled PCRE to version 8.12. (Scott)

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2011-08-17 14:21:18 UTC (rev 
315070)
+++ php/php-src/branches/PHP_5_3/configure.in   2011-08-17 14:28:24 UTC (rev 
315071)
@@ -41,8 +41,8 @@

 PHP_MAJOR_VERSION=5
 PHP_MINOR_VERSION=3
-PHP_RELEASE_VERSION=7
-PHP_EXTRA_VERSION=
+PHP_RELEASE_VERSION=8
+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`


Modified: php/php-src/branches/PHP_5_3/main/php_version.h
===
--- php/php-src/branches/PHP_5_3/main/php_version.h 2011-08-17 14:21:18 UTC 
(rev 315070)
+++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-08-17 14:28:24 UTC 
(rev 315071)
@@ -2,7 +2,7 @@
 /* edit configure.in to change version number */
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 3
-#define PHP_RELEASE_VERSION 7
-#define PHP_EXTRA_VERSION 
-#define PHP_VERSION 5.3.7
-#define PHP_VERSION_ID 50307
+#define PHP_RELEASE_VERSION 8
+#define PHP_EXTRA_VERSION -dev
+#define PHP_VERSION 5.3.8-dev
+#define PHP_VERSION_ID 50308

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/tests/url/bug55399.phpt branches/PHP_5_3/ext/standard/url.c branches/PHP_5_4/ext/standard/tests/url/bug55399.phpt trunk/ext/standard/tests/ur

2011-08-11 Thread Ilia Alshanetsky
iliaaThu, 11 Aug 2011 13:01:52 +

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

Log:
Fixed bug #55399 (parse_url() incorrectly treats ':' as a valid path)

Bug: https://bugs.php.net/55399 (Assigned) parse_url() returning inccorrect 
value
  
Changed paths:
A   php/php-src/branches/PHP_5_3/ext/standard/tests/url/bug55399.phpt
U   php/php-src/branches/PHP_5_3/ext/standard/url.c
A   php/php-src/branches/PHP_5_4/ext/standard/tests/url/bug55399.phpt
A   php/php-src/trunk/ext/standard/tests/url/bug55399.phpt
U   php/php-src/trunk/ext/standard/url.c

Added: php/php-src/branches/PHP_5_3/ext/standard/tests/url/bug55399.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/url/bug55399.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/url/bug55399.phpt   
2011-08-11 13:01:52 UTC (rev 314783)
@@ -0,0 +1,10 @@
+--TEST--
+Bug #55399 (parse_url() incorrectly treats ':' as a valid path)
+--FILE--
+?php
+
+var_dump(parse_url(:));
+
+?
+--EXPECT--
+bool(false)

Modified: php/php-src/branches/PHP_5_3/ext/standard/url.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/url.c 2011-08-11 12:34:51 UTC 
(rev 314782)
+++ php/php-src/branches/PHP_5_3/ext/standard/url.c 2011-08-11 13:01:52 UTC 
(rev 314783)
@@ -197,6 +197,10 @@
efree(ret);
return NULL;
}
+   } else if (p == pp  *pp == '\0') {
+   STR_FREE(ret-scheme);
+   efree(ret);
+   return NULL;
} else {
goto just_path;
}

Added: php/php-src/branches/PHP_5_4/ext/standard/tests/url/bug55399.phpt
===
--- php/php-src/branches/PHP_5_4/ext/standard/tests/url/bug55399.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/standard/tests/url/bug55399.phpt   
2011-08-11 13:01:52 UTC (rev 314783)
@@ -0,0 +1,10 @@
+--TEST--
+Bug #55399 (parse_url() incorrectly treats ':' as a valid path)
+--FILE--
+?php
+
+var_dump(parse_url(:));
+
+?
+--EXPECT--
+bool(false)

Added: php/php-src/trunk/ext/standard/tests/url/bug55399.phpt
===
--- php/php-src/trunk/ext/standard/tests/url/bug55399.phpt  
(rev 0)
+++ php/php-src/trunk/ext/standard/tests/url/bug55399.phpt  2011-08-11 
13:01:52 UTC (rev 314783)
@@ -0,0 +1,10 @@
+--TEST--
+Bug #55399 (parse_url() incorrectly treats ':' as a valid path)
+--FILE--
+?php
+
+var_dump(parse_url(:));
+
+?
+--EXPECT--
+bool(false)

Modified: php/php-src/trunk/ext/standard/url.c
===
--- php/php-src/trunk/ext/standard/url.c2011-08-11 12:34:51 UTC (rev 
314782)
+++ php/php-src/trunk/ext/standard/url.c2011-08-11 13:01:52 UTC (rev 
314783)
@@ -197,6 +197,10 @@
efree(ret);
return NULL;
}
+   } else if (p == pp  *pp == '\0') {
+   STR_FREE(ret-scheme);
+   efree(ret);
+   return NULL;
} else {
goto just_path;
}

-- 
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_4/ext/standard/ url.c

2011-08-11 Thread Ilia Alshanetsky
iliaaThu, 11 Aug 2011 13:02:16 +

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

Log:
Missing file relating to previous commit

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/standard/url.c

Modified: php/php-src/branches/PHP_5_4/ext/standard/url.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/url.c 2011-08-11 13:01:52 UTC 
(rev 314783)
+++ php/php-src/branches/PHP_5_4/ext/standard/url.c 2011-08-11 13:02:16 UTC 
(rev 314784)
@@ -197,6 +197,10 @@
efree(ret);
return NULL;
}
+   } else if (p == pp  *pp == '\0') {
+   STR_FREE(ret-scheme);
+   efree(ret);
+   return NULL;
} else {
goto just_path;
}

-- 
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-08-11 Thread Ilia Alshanetsky
iliaaThu, 11 Aug 2011 13:02:49 +

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

Log:
5.3.7RC5

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-08-11 13:02:16 UTC (rev 314784)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-08-11 13:02:49 UTC (rev 314785)
@@ -1,8 +1,12 @@
 PHPNEWS
 |||
-?? ??? , PHP 5.3.7
+11 Aug 2011, PHP 5.3.7 RC5
 - Upgraded bundled SQLite to version 3.7.7.1. (Scott)

+- Core
+  . Fixed bug #55399 (parse_url() incorrectly treats ':' as a valid path).
+(Ilia)
+
 - Imap extension:
   . Fixed bug #55313 (Number of retries not set when params specified).
 (kevin at kevinlocke dot name)

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2011-08-11 13:02:16 UTC (rev 
314784)
+++ php/php-src/branches/PHP_5_3/configure.in   2011-08-11 13:02:49 UTC (rev 
314785)
@@ -42,7 +42,7 @@
 PHP_MAJOR_VERSION=5
 PHP_MINOR_VERSION=3
 PHP_RELEASE_VERSION=7
-PHP_EXTRA_VERSION=RC5-dev
+PHP_EXTRA_VERSION=RC5
 
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-08-11 13:02:16 UTC 
(rev 314784)
+++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-08-11 13:02:49 UTC 
(rev 314785)
@@ -3,6 +3,6 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 3
 #define PHP_RELEASE_VERSION 7
-#define PHP_EXTRA_VERSION RC5-dev
-#define PHP_VERSION 5.3.7RC5-dev
+#define PHP_EXTRA_VERSION RC5
+#define PHP_VERSION 5.3.7RC5
 #define PHP_VERSION_ID 50307

-- 
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-08-11 Thread Ilia Alshanetsky
iliaaThu, 11 Aug 2011 13:07:23 +

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

Log:
5.3.7RC5

Changed paths:
A + php/php-src/tags/php_5_3_7RC5/
(from php/php-src/branches/PHP_5_3/:r314785)


Property changes on: php/php-src/tags/php_5_3_7RC5
___
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-08-11 Thread Ilia Alshanetsky
iliaaThu, 11 Aug 2011 14:35:08 +

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

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-08-11 13:07:23 UTC (rev 314786)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-08-11 14:35:08 UTC (rev 314787)
@@ -1,5 +1,7 @@
 PHPNEWS
 |||
+?? Aug 2011, PHP 5.3.7
+
 11 Aug 2011, PHP 5.3.7 RC5
 - Upgraded bundled SQLite to version 3.7.7.1. (Scott)


Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2011-08-11 13:07:23 UTC (rev 
314786)
+++ php/php-src/branches/PHP_5_3/configure.in   2011-08-11 14:35:08 UTC (rev 
314787)
@@ -42,7 +42,7 @@
 PHP_MAJOR_VERSION=5
 PHP_MINOR_VERSION=3
 PHP_RELEASE_VERSION=7
-PHP_EXTRA_VERSION=RC5
+PHP_EXTRA_VERSION=RC6-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-08-11 13:07:23 UTC 
(rev 314786)
+++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-08-11 14:35:08 UTC 
(rev 314787)
@@ -3,6 +3,6 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 3
 #define PHP_RELEASE_VERSION 7
-#define PHP_EXTRA_VERSION RC5
-#define PHP_VERSION 5.3.7RC5
+#define PHP_EXTRA_VERSION RC6-dev
+#define PHP_VERSION 5.3.7RC6-dev
 #define PHP_VERSION_ID 50307

-- 
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/sqlite3/sqlite3.c branches/PHP_5_4/ext/sqlite3/sqlite3.c trunk/ext/sqlite3/sqlite3.c

2011-08-10 Thread Ilia Alshanetsky
iliaaWed, 10 Aug 2011 15:30:07 +

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

Log:
Fixed memset usage (identified by coverity)

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c
U   php/php-src/branches/PHP_5_4/ext/sqlite3/sqlite3.c
U   php/php-src/trunk/ext/sqlite3/sqlite3.c

Modified: php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c
===
--- php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c  2011-08-10 14:56:59 UTC 
(rev 314748)
+++ php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c  2011-08-10 15:30:07 UTC 
(rev 314749)
@@ -2006,7 +2006,7 @@

/* Allocate memory for it */
intern = emalloc(sizeof(php_sqlite3_db_object));
-   memset(intern-zo, 0, sizeof(php_sqlite3_db_object));
+   memset(intern, 0, sizeof(php_sqlite3_db_object));
intern-exception = 0;

/* Need to keep track of things to free */
@@ -2030,7 +2030,7 @@

/* Allocate memory for it */
intern = emalloc(sizeof(php_sqlite3_stmt));
-   memset(intern-zo, 0, sizeof(php_sqlite3_stmt));
+   memset(intern, 0, sizeof(php_sqlite3_stmt));

intern-db_obj_zval = NULL;

@@ -2052,7 +2052,7 @@

/* Allocate memory for it */
intern = emalloc(sizeof(php_sqlite3_result));
-   memset(intern-zo, 0, sizeof(php_sqlite3_result));
+   memset(intern, 0, sizeof(php_sqlite3_result));

intern-complete = 0;
intern-is_prepared_statement = 0;

Modified: php/php-src/branches/PHP_5_4/ext/sqlite3/sqlite3.c
===
--- php/php-src/branches/PHP_5_4/ext/sqlite3/sqlite3.c  2011-08-10 14:56:59 UTC 
(rev 314748)
+++ php/php-src/branches/PHP_5_4/ext/sqlite3/sqlite3.c  2011-08-10 15:30:07 UTC 
(rev 314749)
@@ -2002,7 +2002,7 @@

/* Allocate memory for it */
intern = emalloc(sizeof(php_sqlite3_db_object));
-   memset(intern-zo, 0, sizeof(php_sqlite3_db_object));
+   memset(intern, 0, sizeof(php_sqlite3_db_object));
intern-exception = 0;

/* Need to keep track of things to free */
@@ -2025,7 +2025,7 @@

/* Allocate memory for it */
intern = emalloc(sizeof(php_sqlite3_stmt));
-   memset(intern-zo, 0, sizeof(php_sqlite3_stmt));
+   memset(intern, 0, sizeof(php_sqlite3_stmt));

intern-db_obj_zval = NULL;

@@ -2046,7 +2046,7 @@

/* Allocate memory for it */
intern = emalloc(sizeof(php_sqlite3_result));
-   memset(intern-zo, 0, sizeof(php_sqlite3_result));
+   memset(intern, 0, sizeof(php_sqlite3_result));

intern-complete = 0;
intern-is_prepared_statement = 0;

Modified: php/php-src/trunk/ext/sqlite3/sqlite3.c
===
--- php/php-src/trunk/ext/sqlite3/sqlite3.c 2011-08-10 14:56:59 UTC (rev 
314748)
+++ php/php-src/trunk/ext/sqlite3/sqlite3.c 2011-08-10 15:30:07 UTC (rev 
314749)
@@ -2002,7 +2002,7 @@

/* Allocate memory for it */
intern = emalloc(sizeof(php_sqlite3_db_object));
-   memset(intern-zo, 0, sizeof(php_sqlite3_db_object));
+   memset(intern, 0, sizeof(php_sqlite3_db_object));
intern-exception = 0;

/* Need to keep track of things to free */
@@ -2025,7 +2025,7 @@

/* Allocate memory for it */
intern = emalloc(sizeof(php_sqlite3_stmt));
-   memset(intern-zo, 0, sizeof(php_sqlite3_stmt));
+   memset(intern, 0, sizeof(php_sqlite3_stmt));

intern-db_obj_zval = NULL;

@@ -2046,7 +2046,7 @@

/* Allocate memory for it */
intern = emalloc(sizeof(php_sqlite3_result));
-   memset(intern-zo, 0, sizeof(php_sqlite3_result));
+   memset(intern, 0, sizeof(php_sqlite3_result));

intern-complete = 0;
intern-is_prepared_statement = 0;

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/dns.c branches/PHP_5_4/ext/standard/dns.c trunk/ext/standard/dns.c

2011-08-10 Thread Ilia Alshanetsky
iliaaWed, 10 Aug 2011 15:59:32 +

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

Log:
Fix win32 build

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/dns.c
U   php/php-src/branches/PHP_5_4/ext/standard/dns.c
U   php/php-src/trunk/ext/standard/dns.c

Modified: php/php-src/branches/PHP_5_3/ext/standard/dns.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/dns.c 2011-08-10 15:55:36 UTC 
(rev 314752)
+++ php/php-src/branches/PHP_5_3/ext/standard/dns.c 2011-08-10 15:59:32 UTC 
(rev 314753)
@@ -62,6 +62,10 @@
 #define AF_INET 2   /* internetwork: UDP, TCP, etc. */
 #endif

+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 255
+#endif
+
 #include php_dns.h

 /* type compat */

Modified: php/php-src/branches/PHP_5_4/ext/standard/dns.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/dns.c 2011-08-10 15:55:36 UTC 
(rev 314752)
+++ php/php-src/branches/PHP_5_4/ext/standard/dns.c 2011-08-10 15:59:32 UTC 
(rev 314753)
@@ -62,6 +62,10 @@
 #define AF_INET 2   /* internetwork: UDP, TCP, etc. */
 #endif

+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 255
+#endif
+
 #include php_dns.h

 /* type compat */

Modified: php/php-src/trunk/ext/standard/dns.c
===
--- php/php-src/trunk/ext/standard/dns.c2011-08-10 15:55:36 UTC (rev 
314752)
+++ php/php-src/trunk/ext/standard/dns.c2011-08-10 15:59:32 UTC (rev 
314753)
@@ -62,6 +62,10 @@
 #define AF_INET 2   /* internetwork: UDP, TCP, etc. */
 #endif

+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 255
+#endif
+
 #include php_dns.h

 /* type compat */

-- 
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/dns.c branches/PHP_5_4/ext/standard/dns.c trunk/ext/standard/dns.c

2011-08-09 Thread Ilia Alshanetsky
iliaaTue, 09 Aug 2011 13:10:57 +

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

Log:
Minimize stack usage and added missing dtors

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/dns.c
U   php/php-src/branches/PHP_5_4/ext/standard/dns.c
U   php/php-src/trunk/ext/standard/dns.c

Modified: php/php-src/branches/PHP_5_3/ext/standard/dns.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/dns.c 2011-08-09 13:09:42 UTC 
(rev 314647)
+++ php/php-src/branches/PHP_5_3/ext/standard/dns.c 2011-08-09 13:10:57 UTC 
(rev 314648)
@@ -118,7 +118,7 @@
Get the host name of the current machine */
 PHP_FUNCTION(gethostname)
 {
-   char buf[4096];
+   char buf[MAXHOSTNAMELEN];

if (zend_parse_parameters_none() == FAILURE) {
return;
@@ -794,12 +794,14 @@
 #if defined(HAVE_DNS_SEARCH)
handle = dns_open(NULL);
if (handle == NULL) {
+   zval_dtor(return_value);
RETURN_FALSE;
}
 #elif defined(HAVE_RES_NSEARCH)
memset(state, 0, sizeof(state));
if (res_ninit(handle)) {
-   RETURN_FALSE;
+   zval_dtor(return_value);
+   RETURN_FALSE;
}
 #else
res_init();

Modified: php/php-src/branches/PHP_5_4/ext/standard/dns.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/dns.c 2011-08-09 13:09:42 UTC 
(rev 314647)
+++ php/php-src/branches/PHP_5_4/ext/standard/dns.c 2011-08-09 13:10:57 UTC 
(rev 314648)
@@ -118,7 +118,7 @@
Get the host name of the current machine */
 PHP_FUNCTION(gethostname)
 {
-   char buf[4096];
+   char buf[MAXHOSTNAMELEN];

if (zend_parse_parameters_none() == FAILURE) {
return;
@@ -830,12 +830,14 @@
 #if defined(HAVE_DNS_SEARCH)
handle = dns_open(NULL);
if (handle == NULL) {
+   zval_dtor(return_value);
RETURN_FALSE;
}
 #elif defined(HAVE_RES_NSEARCH)
memset(state, 0, sizeof(state));
if (res_ninit(handle)) {
-   RETURN_FALSE;
+   zval_dtor(return_value);
+   RETURN_FALSE;
}
 #else
res_init();

Modified: php/php-src/trunk/ext/standard/dns.c
===
--- php/php-src/trunk/ext/standard/dns.c2011-08-09 13:09:42 UTC (rev 
314647)
+++ php/php-src/trunk/ext/standard/dns.c2011-08-09 13:10:57 UTC (rev 
314648)
@@ -118,7 +118,7 @@
Get the host name of the current machine */
 PHP_FUNCTION(gethostname)
 {
-   char buf[4096];
+   char buf[MAXHOSTNAMELEN];

if (zend_parse_parameters_none() == FAILURE) {
return;
@@ -830,12 +830,14 @@
 #if defined(HAVE_DNS_SEARCH)
handle = dns_open(NULL);
if (handle == NULL) {
+   zval_dtor(return_value);
RETURN_FALSE;
}
 #elif defined(HAVE_RES_NSEARCH)
memset(state, 0, sizeof(state));
if (res_ninit(handle)) {
-   RETURN_FALSE;
+   zval_dtor(return_value);
+   RETURN_FALSE;
}
 #else
res_init();

-- 
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/phar/phar_object.c branches/PHP_5_4/ext/phar/phar_object.c trunk/ext/phar/phar_object.c

2011-08-09 Thread Ilia Alshanetsky
iliaaTue, 09 Aug 2011 14:11:56 +

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

Log:
Make static analyzers happy

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/phar/phar_object.c
U   php/php-src/branches/PHP_5_4/ext/phar/phar_object.c
U   php/php-src/trunk/ext/phar/phar_object.c

Modified: php/php-src/branches/PHP_5_3/ext/phar/phar_object.c
===
--- php/php-src/branches/PHP_5_3/ext/phar/phar_object.c 2011-08-09 13:19:21 UTC 
(rev 314652)
+++ php/php-src/branches/PHP_5_3/ext/phar/phar_object.c 2011-08-09 14:11:56 UTC 
(rev 314653)
@@ -1664,11 +1664,14 @@
}

test = expand_filepath(fname, 
NULL TSRMLS_CC);
+   efree(fname);

if (test) {
-   efree(fname);
fname = test;
fname_len = 
strlen(fname);
+   } else {
+   
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, Could 
not resolve file path);
+   return 
ZEND_HASH_APPLY_STOP;
}

save = fname;
@@ -1694,6 +1697,11 @@
 #else
fname = 
expand_filepath(intern-file_name, NULL TSRMLS_CC);
 #endif
+   if (!fname) {
+   
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, Could 
not resolve file path);
+   return 
ZEND_HASH_APPLY_STOP;
+   }
+
fname_len = strlen(fname);
save = fname;
goto phar_spl_fileinfo;
@@ -1711,6 +1719,14 @@
 phar_spl_fileinfo:
if (base_len) {
temp = expand_filepath(base, NULL TSRMLS_CC);
+   if (!temp) {
+   
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, Could 
not resolve file path);
+   if (save) {
+   efree(save);
+   }
+   return ZEND_HASH_APPLY_STOP;
+   }
+
base = temp;
base_len = strlen(base);

@@ -4083,7 +4099,10 @@
if (phar_obj-arc.archive-fp  
!phar_obj-arc.archive-is_brandnew  !(stub-flags  
PHAR_ENT_COMPRESSION_MASK)) {
fp = phar_obj-arc.archive-fp;
} else {
-   fp = 
php_stream_open_wrapper(phar_obj-arc.archive-fname, rb, 0, NULL);
+   if (!(fp = 
php_stream_open_wrapper(phar_obj-arc.archive-fname, rb, 0, NULL))) {
+   
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, phar 
error: unable to open phar \%s\, phar_obj-arc.archive-fname);
+   return;
+   }
if (stub-flags  PHAR_ENT_COMPRESSION_MASK) {
char *filter_name;


Modified: php/php-src/branches/PHP_5_4/ext/phar/phar_object.c
===
--- php/php-src/branches/PHP_5_4/ext/phar/phar_object.c 2011-08-09 13:19:21 UTC 
(rev 314652)
+++ php/php-src/branches/PHP_5_4/ext/phar/phar_object.c 2011-08-09 14:11:56 UTC 
(rev 314653)
@@ -1666,11 +1666,14 @@
}

test = expand_filepath(fname, 
NULL TSRMLS_CC);
+   efree(fname);

if (test) {
-   efree(fname);
fname = test;
fname_len = 
strlen(fname);
+   } else {
+   
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, Could 
not resolve file path);
+   return 
ZEND_HASH_APPLY_STOP;
}

save = fname;
@@ -1696,6 +1699,11 @@
 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/head.c branches/PHP_5_4/ext/standard/head.c trunk/ext/standard/head.c

2011-08-08 Thread Ilia Alshanetsky
iliaaMon, 08 Aug 2011 12:10:27 +

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

Log:
Make static analyzers happy

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/head.c
U   php/php-src/branches/PHP_5_4/ext/standard/head.c
U   php/php-src/trunk/ext/standard/head.c

Modified: php/php-src/branches/PHP_5_3/ext/standard/head.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/head.c2011-08-08 12:05:34 UTC 
(rev 314485)
+++ php/php-src/branches/PHP_5_3/ext/standard/head.c2011-08-08 12:10:27 UTC 
(rev 314486)
@@ -128,7 +128,7 @@
dt = php_format_date(D, d-M-Y H:i:s T, sizeof(D, 
d-M-Y H:i:s T)-1, expires, 0 TSRMLS_CC);
/* check to make sure that the year does not exceed 4 
digits in length */
p = zend_memrchr(dt, '-', strlen(dt));
-   if (*(p + 5) != ' ') {
+   if (!p || *(p + 5) != ' ') {
efree(dt);
efree(cookie);
efree(encoded_value);

Modified: php/php-src/branches/PHP_5_4/ext/standard/head.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/head.c2011-08-08 12:05:34 UTC 
(rev 314485)
+++ php/php-src/branches/PHP_5_4/ext/standard/head.c2011-08-08 12:10:27 UTC 
(rev 314486)
@@ -127,7 +127,7 @@
dt = php_format_date(D, d-M-Y H:i:s T, sizeof(D, 
d-M-Y H:i:s T)-1, expires, 0 TSRMLS_CC);
/* check to make sure that the year does not exceed 4 
digits in length */
p = zend_memrchr(dt, '-', strlen(dt));
-   if (*(p + 5) != ' ') {
+   if (!p || *(p + 5) != ' ') {
efree(dt);
efree(cookie);
efree(encoded_value);

Modified: php/php-src/trunk/ext/standard/head.c
===
--- php/php-src/trunk/ext/standard/head.c   2011-08-08 12:05:34 UTC (rev 
314485)
+++ php/php-src/trunk/ext/standard/head.c   2011-08-08 12:10:27 UTC (rev 
314486)
@@ -127,7 +127,7 @@
dt = php_format_date(D, d-M-Y H:i:s T, sizeof(D, 
d-M-Y H:i:s T)-1, expires, 0 TSRMLS_CC);
/* check to make sure that the year does not exceed 4 
digits in length */
p = zend_memrchr(dt, '-', strlen(dt));
-   if (*(p + 5) != ' ') {
+   if (!p || *(p + 5) != ' ') {
efree(dt);
efree(cookie);
efree(encoded_value);

-- 
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_4/sapi/cgi/cgi_main.c trunk/sapi/cgi/cgi_main.c

2011-08-08 Thread Ilia Alshanetsky
iliaaMon, 08 Aug 2011 12:14:58 +

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

Log:
Removed deadcode

Changed paths:
U   php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c
U   php/php-src/trunk/sapi/cgi/cgi_main.c

Modified: php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c
===
--- php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c2011-08-08 12:13:14 UTC 
(rev 314488)
+++ php/php-src/branches/PHP_5_4/sapi/cgi/cgi_main.c2011-08-08 12:14:58 UTC 
(rev 314489)
@@ -1534,9 +1534,6 @@
var[4] == '_') {

var_len -= 5;
-   if (var_len == 0) {
-   return;
-   }
p = var + 5;
var = str = do_alloca(var_len + 1, use_heap);
*str++ = *p++;
@@ -1605,9 +1602,6 @@
var[4] == '_') {

var_len -= 5;
-   if (var_len == 0) {
-   continue;
-   }

if (var_len = alloc_size) {
alloc_size = var_len + 64;

Modified: php/php-src/trunk/sapi/cgi/cgi_main.c
===
--- php/php-src/trunk/sapi/cgi/cgi_main.c   2011-08-08 12:13:14 UTC (rev 
314488)
+++ php/php-src/trunk/sapi/cgi/cgi_main.c   2011-08-08 12:14:58 UTC (rev 
314489)
@@ -1533,9 +1533,6 @@
var[4] == '_') {

var_len -= 5;
-   if (var_len == 0) {
-   return;
-   }
p = var + 5;
var = str = do_alloca(var_len + 1, use_heap);
*str++ = *p++;
@@ -1604,9 +1601,6 @@
var[4] == '_') {

var_len -= 5;
-   if (var_len == 0) {
-   continue;
-   }

if (var_len = alloc_size) {
alloc_size = var_len + 64;

-- 
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_4/ext/xsl/xsltprocessor.c trunk/ext/xsl/xsltprocessor.c

2011-08-08 Thread Ilia Alshanetsky
iliaaMon, 08 Aug 2011 16:06:40 +

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

Log:
Fixed build

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c
U   php/php-src/trunk/ext/xsl/xsltprocessor.c

Modified: php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c
===
--- php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c2011-08-08 
15:55:18 UTC (rev 314540)
+++ php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c2011-08-08 
16:06:40 UTC (rev 314541)
@@ -620,7 +620,7 @@
 */
 PHP_FUNCTION(xsl_xsltprocessor_transform_to_doc)
 {
-   zval *id, *rv = NULL, *docp = NULL;
+   zval *id, *docp = NULL;
xmlDoc *newdocp;
xsltStylesheetPtr sheetp;
int ret, ret_class_len=0;
@@ -664,7 +664,7 @@
php_libxml_increment_doc_ref(interndoc, newdocp 
TSRMLS_CC);
php_libxml_increment_node_ptr(interndoc, 
(xmlNodePtr)newdocp, (void *)interndoc TSRMLS_CC);
} else {
-   DOM_RET_OBJ(rv, (xmlNodePtr) newdocp, ret, NULL);
+   DOM_RET_OBJ((xmlNodePtr) newdocp, ret, NULL);
}
} else {
RETURN_FALSE;

Modified: php/php-src/trunk/ext/xsl/xsltprocessor.c
===
--- php/php-src/trunk/ext/xsl/xsltprocessor.c   2011-08-08 15:55:18 UTC (rev 
314540)
+++ php/php-src/trunk/ext/xsl/xsltprocessor.c   2011-08-08 16:06:40 UTC (rev 
314541)
@@ -620,7 +620,7 @@
 */
 PHP_FUNCTION(xsl_xsltprocessor_transform_to_doc)
 {
-   zval *id, *rv = NULL, *docp = NULL;
+   zval *id, *docp = NULL;
xmlDoc *newdocp;
xsltStylesheetPtr sheetp;
int ret, ret_class_len=0;
@@ -664,7 +664,7 @@
php_libxml_increment_doc_ref(interndoc, newdocp 
TSRMLS_CC);
php_libxml_increment_node_ptr(interndoc, 
(xmlNodePtr)newdocp, (void *)interndoc TSRMLS_CC);
} else {
-   DOM_RET_OBJ(rv, (xmlNodePtr) newdocp, ret, NULL);
+   DOM_RET_OBJ((xmlNodePtr) newdocp, ret, NULL);
}
} else {
RETURN_FALSE;

-- 
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_4/ext/xsl/xsltprocessor.c trunk/ext/xsl/xsltprocessor.c

2011-08-08 Thread Ilia Alshanetsky
iliaaMon, 08 Aug 2011 16:49:43 +

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

Log:
Another build fix relating to previous DOM commit

Changed paths:
U   php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c
U   php/php-src/trunk/ext/xsl/xsltprocessor.c

Modified: php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c
===
--- php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c2011-08-08 
16:45:45 UTC (rev 314563)
+++ php/php-src/branches/PHP_5_4/ext/xsl/xsltprocessor.c2011-08-08 
16:49:43 UTC (rev 314564)
@@ -280,7 +280,7 @@
node-parent = 
nsparent;
node-ns = 
curns;
}
-   child = 
php_dom_create_object(node, ret, NULL, child, domintern TSRMLS_CC);
+   child = 
php_dom_create_object(node, ret, child, domintern TSRMLS_CC);

add_next_index_zval(args[i], child);
}
}

Modified: php/php-src/trunk/ext/xsl/xsltprocessor.c
===
--- php/php-src/trunk/ext/xsl/xsltprocessor.c   2011-08-08 16:45:45 UTC (rev 
314563)
+++ php/php-src/trunk/ext/xsl/xsltprocessor.c   2011-08-08 16:49:43 UTC (rev 
314564)
@@ -280,7 +280,7 @@
node-parent = 
nsparent;
node-ns = 
curns;
}
-   child = 
php_dom_create_object(node, ret, NULL, child, domintern TSRMLS_CC);
+   child = 
php_dom_create_object(node, ret, child, domintern TSRMLS_CC);

add_next_index_zval(args[i], child);
}
}

-- 
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/pdo/pdo.c branches/PHP_5_3/ext/pdo/pdo_dbh.c branches/PHP_5_3/ext/pdo/pdo_sql_parser.re branches/PHP_5_3/ext/pdo/php_pdo_int.h branches/PHP_5_4/ext/pd

2011-08-07 Thread Ilia Alshanetsky
iliaaSun, 07 Aug 2011 23:46:00 +

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

Log:
Fixes for variety of issues identified by coverity scan

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/pdo/pdo.c
U   php/php-src/branches/PHP_5_3/ext/pdo/pdo_dbh.c
U   php/php-src/branches/PHP_5_3/ext/pdo/pdo_sql_parser.re
U   php/php-src/branches/PHP_5_3/ext/pdo/php_pdo_int.h
U   php/php-src/branches/PHP_5_4/ext/pdo/pdo.c
U   php/php-src/branches/PHP_5_4/ext/pdo/pdo_dbh.c
U   php/php-src/branches/PHP_5_4/ext/pdo/pdo_sql_parser.re
U   php/php-src/trunk/ext/pdo/pdo.c
U   php/php-src/trunk/ext/pdo/pdo_dbh.c
U   php/php-src/trunk/ext/pdo/pdo_sql_parser.re

Modified: php/php-src/branches/PHP_5_3/ext/pdo/pdo.c
===
--- php/php-src/branches/PHP_5_3/ext/pdo/pdo.c  2011-08-07 19:42:27 UTC (rev 
314449)
+++ php/php-src/branches/PHP_5_3/ext/pdo/pdo.c  2011-08-07 23:46:00 UTC (rev 
314450)
@@ -191,7 +191,7 @@
}

return zend_hash_add(pdo_driver_hash, (char*)driver-driver_name, 
driver-driver_name_len,
-   (void**)driver, sizeof(driver), NULL);
+   (void**)driver, sizeof(pdo_driver_t *), NULL);
 }

 PDO_API void php_pdo_unregister_driver(pdo_driver_t *driver)

Modified: php/php-src/branches/PHP_5_3/ext/pdo/pdo_dbh.c
===
--- php/php-src/branches/PHP_5_3/ext/pdo/pdo_dbh.c  2011-08-07 19:42:27 UTC 
(rev 314449)
+++ php/php-src/branches/PHP_5_3/ext/pdo/pdo_dbh.c  2011-08-07 23:46:00 UTC 
(rev 314450)
@@ -57,7 +57,7 @@
pdo_err = stmt-error_code;
}

-   strcpy(*pdo_err, sqlstate);
+   strncpy(*pdo_err, sqlstate, 6);

/* hash sqlstate to error messages */
msg = pdo_sqlstate_state_to_description(*pdo_err);

Modified: php/php-src/branches/PHP_5_3/ext/pdo/pdo_sql_parser.re
===
--- php/php-src/branches/PHP_5_3/ext/pdo/pdo_sql_parser.re  2011-08-07 
19:42:27 UTC (rev 314449)
+++ php/php-src/branches/PHP_5_3/ext/pdo/pdo_sql_parser.re  2011-08-07 
23:46:00 UTC (rev 314450)
@@ -236,6 +236,9 @@
plc-freeq = 0;
break;

+   case IS_BOOL:
+   
convert_to_long(param-parameter);
+
case IS_LONG:
case IS_DOUBLE:

convert_to_string(param-parameter);
@@ -244,8 +247,6 @@
plc-freeq = 0;
break;

-   case IS_BOOL:
-   
convert_to_long(param-parameter);
default:

convert_to_string(param-parameter);
if 
(!stmt-dbh-methods-quoter(stmt-dbh, Z_STRVAL_P(param-parameter),

Modified: php/php-src/branches/PHP_5_3/ext/pdo/php_pdo_int.h
===
--- php/php-src/branches/PHP_5_3/ext/pdo/php_pdo_int.h  2011-08-07 19:42:27 UTC 
(rev 314449)
+++ php/php-src/branches/PHP_5_3/ext/pdo/php_pdo_int.h  2011-08-07 23:46:00 UTC 
(rev 314450)
@@ -58,7 +58,7 @@
 extern void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt TSRMLS_DC);

 #define PDO_DBH_CLEAR_ERR()do { \
-   strlcpy(dbh-error_code, PDO_ERR_NONE, sizeof(PDO_ERR_NONE)); \
+   strncpy(dbh-error_code, PDO_ERR_NONE, sizeof(PDO_ERR_NONE)); \
if (dbh-query_stmt) { \
dbh-query_stmt = NULL; \
zend_objects_store_del_ref(dbh-query_stmt_zval TSRMLS_CC); \

Modified: php/php-src/branches/PHP_5_4/ext/pdo/pdo.c
===
--- php/php-src/branches/PHP_5_4/ext/pdo/pdo.c  2011-08-07 19:42:27 UTC (rev 
314449)
+++ php/php-src/branches/PHP_5_4/ext/pdo/pdo.c  2011-08-07 23:46:00 UTC (rev 
314450)
@@ -191,7 +191,7 @@
}

return zend_hash_add(pdo_driver_hash, (char*)driver-driver_name, 
driver-driver_name_len,
-   (void**)driver, sizeof(driver), NULL);
+   (void**)driver, sizeof(pdo_driver_t *), NULL);
 }

 PDO_API void php_pdo_unregister_driver(pdo_driver_t *driver)

Modified: php/php-src/branches/PHP_5_4/ext/pdo/pdo_dbh.c
===
--- php/php-src/branches/PHP_5_4/ext/pdo/pdo_dbh.c  2011-08-07 19:42:27 UTC 
(rev 314449)
+++ 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo/pdo_sql_parser.re branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c branches/PHP_5_4/ext/pdo/pdo_sql_parser.re branches/PHP_5_4/ext/pdo_sqlite/sqlit

2011-08-07 Thread Ilia Alshanetsky
iliaaMon, 08 Aug 2011 00:07:54 +

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

Log:
Avoid strcpy() usage

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/pdo/pdo_sql_parser.re
U   php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c
U   php/php-src/branches/PHP_5_4/ext/pdo/pdo_sql_parser.re
U   php/php-src/branches/PHP_5_4/ext/pdo_sqlite/sqlite_driver.c
U   php/php-src/trunk/ext/pdo/pdo_sql_parser.re
U   php/php-src/trunk/ext/pdo_sqlite/sqlite_driver.c

Modified: php/php-src/branches/PHP_5_3/ext/pdo/pdo_sql_parser.re
===
--- php/php-src/branches/PHP_5_3/ext/pdo/pdo_sql_parser.re  2011-08-07 
23:46:00 UTC (rev 314450)
+++ php/php-src/branches/PHP_5_3/ext/pdo/pdo_sql_parser.re  2011-08-08 
00:07:54 UTC (rev 314451)
@@ -213,7 +213,7 @@

param-param_type TSRMLS_CC)) {
/* bork */
ret = -1;
-   
strcpy(stmt-error_code, stmt-dbh-error_code);
+   
strncpy(stmt-error_code, stmt-dbh-error_code, 6);
if (buf) {
efree(buf);
}
@@ -254,7 +254,7 @@

param-param_type TSRMLS_CC)) {
/* bork */
ret = -1;
-   
strcpy(stmt-error_code, stmt-dbh-error_code);
+   
strncpy(stmt-error_code, stmt-dbh-error_code, 6);
goto clean_up;
}
plc-freeq = 1;

Modified: php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c
===
--- php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c 2011-08-07 
23:46:00 UTC (rev 314450)
+++ php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c 2011-08-08 
00:07:54 UTC (rev 314451)
@@ -47,33 +47,33 @@
}
einfo-errmsg = pestrdup((char*)sqlite3_errmsg(H-db), 
dbh-is_persistent);
} else { /* no error */
-   strcpy(*pdo_err, PDO_ERR_NONE);
+   strncpy(*pdo_err, PDO_ERR_NONE, sizeof(PDO_ERR_NONE));
return 0;
}
switch (einfo-errcode) {
case SQLITE_NOTFOUND:
-   strcpy(*pdo_err, 42S02);
+   strncpy(*pdo_err, 42S02, sizeof(42S02));
break;

case SQLITE_INTERRUPT:
-   strcpy(*pdo_err, 01002);
+   strncpy(*pdo_err, 01002, sizeof(01002));
break;

case SQLITE_NOLFS:
-   strcpy(*pdo_err, HYC00);
+   strncpy(*pdo_err, HYC00, sizeof(HYC00));
break;

case SQLITE_TOOBIG:
-   strcpy(*pdo_err, 22001);
+   strncpy(*pdo_err, 22001, sizeof(22001));
break;

case SQLITE_CONSTRAINT:
-   strcpy(*pdo_err, 23000);
+   strncpy(*pdo_err, 23000, sizeof(23000));
break;

case SQLITE_ERROR:
default:
-   strcpy(*pdo_err, HY000);
+   strncpy(*pdo_err, HY000, sizeof(HY000));
break;
}


Modified: php/php-src/branches/PHP_5_4/ext/pdo/pdo_sql_parser.re
===
--- php/php-src/branches/PHP_5_4/ext/pdo/pdo_sql_parser.re  2011-08-07 
23:46:00 UTC (rev 314450)
+++ php/php-src/branches/PHP_5_4/ext/pdo/pdo_sql_parser.re  2011-08-08 
00:07:54 UTC (rev 314451)
@@ -213,7 +213,7 @@

param-param_type TSRMLS_CC)) {
/* bork */
ret = -1;
-   
strcpy(stmt-error_code, stmt-dbh-error_code);
+   
strncpy(stmt-error_code, stmt-dbh-error_code, 6);
if (buf) {

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS configure.in main/php_version.h

2011-07-28 Thread Ilia Alshanetsky
iliaaThu, 28 Jul 2011 11:53:46 +

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

Log:
5.3.7RC4

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-07-28 11:53:01 UTC (rev 313840)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-07-28 11:53:46 UTC (rev 313841)
@@ -1,6 +1,6 @@
 PHPNEWS
 |||
-?? ??? , PHP 5.3.7
+28 Jul 2011, PHP 5.3.7 RC4
 - Improved core functions:
   . Updated crypt_blowfish to 1.2. ((CVE-2011-2483) (Solar Designer)


Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2011-07-28 11:53:01 UTC (rev 
313840)
+++ php/php-src/branches/PHP_5_3/configure.in   2011-07-28 11:53:46 UTC (rev 
313841)
@@ -42,7 +42,7 @@
 PHP_MAJOR_VERSION=5
 PHP_MINOR_VERSION=3
 PHP_RELEASE_VERSION=7
-PHP_EXTRA_VERSION=RC4-dev
+PHP_EXTRA_VERSION=RC4
 
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-07-28 11:53:01 UTC 
(rev 313840)
+++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-07-28 11:53:46 UTC 
(rev 313841)
@@ -3,6 +3,6 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 3
 #define PHP_RELEASE_VERSION 7
-#define PHP_EXTRA_VERSION RC4-dev
-#define PHP_VERSION 5.3.7RC4-dev
+#define PHP_EXTRA_VERSION RC4
+#define PHP_VERSION 5.3.7RC4
 #define PHP_VERSION_ID 50307

-- 
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-07-28 Thread Ilia Alshanetsky
iliaaThu, 28 Jul 2011 11:54:08 +

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

Log:
5.3.7RC4

Changed paths:
A + php/php-src/tags/php_5_3_7RC4/
(from php/php-src/branches/PHP_5_3/:r313841)


Property changes on: php/php-src/tags/php_5_3_7RC4
___
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-07-28 Thread Ilia Alshanetsky
iliaaThu, 28 Jul 2011 11:54:53 +

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

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-07-28 11:54:08 UTC (rev 313842)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-07-28 11:54:53 UTC (rev 313843)
@@ -1,5 +1,7 @@
 PHPNEWS
 |||
+?? ??? , PHP 5.3.7
+
 28 Jul 2011, PHP 5.3.7 RC4
 - Improved core functions:
   . Updated crypt_blowfish to 1.2. ((CVE-2011-2483) (Solar Designer)

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2011-07-28 11:54:08 UTC (rev 
313842)
+++ php/php-src/branches/PHP_5_3/configure.in   2011-07-28 11:54:53 UTC (rev 
313843)
@@ -42,7 +42,7 @@
 PHP_MAJOR_VERSION=5
 PHP_MINOR_VERSION=3
 PHP_RELEASE_VERSION=7
-PHP_EXTRA_VERSION=RC4
+PHP_EXTRA_VERSION=RC5-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-07-28 11:54:08 UTC 
(rev 313842)
+++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-07-28 11:54:53 UTC 
(rev 313843)
@@ -3,6 +3,6 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 3
 #define PHP_RELEASE_VERSION 7
-#define PHP_EXTRA_VERSION RC4
-#define PHP_VERSION 5.3.7RC4
+#define PHP_EXTRA_VERSION RC5-dev
+#define PHP_VERSION 5.3.7RC5-dev
 #define PHP_VERSION_ID 50307

-- 
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-07-14 Thread Ilia Alshanetsky
iliaaThu, 14 Jul 2011 12:02:33 +

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

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-07-14 12:01:57 UTC (rev 313240)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-07-14 12:02:33 UTC (rev 313241)
@@ -1,5 +1,7 @@
 PHPNEWS
 |||
+?? ??? , PHP 5.3.7
+
 14 Jul 2011, PHP 5.3.7 RC3
 - Zend Engine:
   . Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2011-07-14 12:01:57 UTC (rev 
313240)
+++ php/php-src/branches/PHP_5_3/configure.in   2011-07-14 12:02:33 UTC (rev 
313241)
@@ -42,7 +42,7 @@
 PHP_MAJOR_VERSION=5
 PHP_MINOR_VERSION=3
 PHP_RELEASE_VERSION=7
-PHP_EXTRA_VERSION=RC3
+PHP_EXTRA_VERSION=RC4-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-07-14 12:01:57 UTC 
(rev 313240)
+++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-07-14 12:02:33 UTC 
(rev 313241)
@@ -3,6 +3,6 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 3
 #define PHP_RELEASE_VERSION 7
-#define PHP_EXTRA_VERSION RC3
-#define PHP_VERSION 5.3.7RC3
+#define PHP_EXTRA_VERSION RC4-dev
+#define PHP_VERSION 5.3.7RC4-dev
 #define PHP_VERSION_ID 50307

-- 
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-07-14 Thread Ilia Alshanetsky
iliaaThu, 14 Jul 2011 12:01:57 +

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

Log:
5.3.7RC3

Changed paths:
A + php/php-src/tags/php_5_3_7RC3/
(from php/php-src/branches/PHP_5_3/:r313239)


Property changes on: php/php-src/tags/php_5_3_7RC3
___
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-07-14 Thread Ilia Alshanetsky
iliaaThu, 14 Jul 2011 12:01:37 +

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

Log:
5.3.7RC3

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-07-14 12:01:22 UTC (rev 313238)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-07-14 12:01:37 UTC (rev 313239)
@@ -1,6 +1,6 @@
 PHPNEWS
 |||
-?? ??? 2011, PHP 5.3.7
+14 Jul 2011, PHP 5.3.7 RC3
 - Zend Engine:
   . Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even
 though the class has none). (Felipe)

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2011-07-14 12:01:22 UTC (rev 
313238)
+++ php/php-src/branches/PHP_5_3/configure.in   2011-07-14 12:01:37 UTC (rev 
313239)
@@ -42,7 +42,7 @@
 PHP_MAJOR_VERSION=5
 PHP_MINOR_VERSION=3
 PHP_RELEASE_VERSION=7
-PHP_EXTRA_VERSION=RC3-dev
+PHP_EXTRA_VERSION=RC3
 
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-07-14 12:01:22 UTC 
(rev 313238)
+++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-07-14 12:01:37 UTC 
(rev 313239)
@@ -3,6 +3,6 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 3
 #define PHP_RELEASE_VERSION 7
-#define PHP_EXTRA_VERSION RC3-dev
-#define PHP_VERSION 5.3.7RC3-dev
+#define PHP_EXTRA_VERSION RC3
+#define PHP_VERSION 5.3.7RC3
 #define PHP_VERSION_ID 50307

-- 
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/main/reentrancy.c branches/PHP_5_4/main/reentrancy.c trunk/main/reentrancy.c

2011-07-11 Thread Ilia Alshanetsky
iliaaMon, 11 Jul 2011 17:01:23 +

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

Log:
Fixed bug #55014 (Compile failure due to improper use of ctime_r()).

Bug: https://bugs.php.net/55014 (Open) Error Compiling: too many arguments to 
function `ctime_r'
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/main/reentrancy.c
U   php/php-src/branches/PHP_5_4/main/reentrancy.c
U   php/php-src/trunk/main/reentrancy.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-07-11 17:00:04 UTC (rev 313143)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-07-11 17:01:23 UTC (rev 313144)
@@ -6,6 +6,7 @@
 though the class has none). (Felipe)

 - Core
+  . Fixed bug #55014 (Compile failure due to improper use of ctime_r()). (Ilia)
   . Fixed bug #54332 (Crash in zend_mm_check_ptr // Heap corruption). (Dmitry)
   . Fixed bug #54305 (Crash in gc_remove_zval_from_buffer). (Dmitry)
   . Fixed bug #53727 (Inconsistent behavior of is_subclass_of with interfaces)

Modified: php/php-src/branches/PHP_5_3/main/reentrancy.c
===
--- php/php-src/branches/PHP_5_3/main/reentrancy.c  2011-07-11 17:00:04 UTC 
(rev 313143)
+++ php/php-src/branches/PHP_5_3/main/reentrancy.c  2011-07-11 17:01:23 UTC 
(rev 313144)
@@ -60,14 +60,14 @@

 PHPAPI char *php_ctime_r(const time_t *clock, char *buf)
 {
-   if (ctime_r(clock, buf, 26) == buf)
+   if (ctime_r(clock, buf) == buf)
return (buf);
return (NULL);
 }

 PHPAPI char *php_asctime_r(const struct tm *tm, char *buf)
 {
-   if (asctime_r(tm, buf, 26) == buf)
+   if (asctime_r(tm, buf) == buf)
return (buf);
return (NULL);
 }

Modified: php/php-src/branches/PHP_5_4/main/reentrancy.c
===
--- php/php-src/branches/PHP_5_4/main/reentrancy.c  2011-07-11 17:00:04 UTC 
(rev 313143)
+++ php/php-src/branches/PHP_5_4/main/reentrancy.c  2011-07-11 17:01:23 UTC 
(rev 313144)
@@ -60,14 +60,14 @@

 PHPAPI char *php_ctime_r(const time_t *clock, char *buf)
 {
-   if (ctime_r(clock, buf, 26) == buf)
+   if (ctime_r(clock, buf) == buf)
return (buf);
return (NULL);
 }

 PHPAPI char *php_asctime_r(const struct tm *tm, char *buf)
 {
-   if (asctime_r(tm, buf, 26) == buf)
+   if (asctime_r(tm, buf) == buf)
return (buf);
return (NULL);
 }

Modified: php/php-src/trunk/main/reentrancy.c
===
--- php/php-src/trunk/main/reentrancy.c 2011-07-11 17:00:04 UTC (rev 313143)
+++ php/php-src/trunk/main/reentrancy.c 2011-07-11 17:01:23 UTC (rev 313144)
@@ -60,14 +60,14 @@

 PHPAPI char *php_ctime_r(const time_t *clock, char *buf)
 {
-   if (ctime_r(clock, buf, 26) == buf)
+   if (ctime_r(clock, buf) == buf)
return (buf);
return (NULL);
 }

 PHPAPI char *php_asctime_r(const struct tm *tm, char *buf)
 {
-   if (asctime_r(tm, buf, 26) == buf)
+   if (asctime_r(tm, buf) == buf)
return (buf);
return (NULL);
 }

-- 
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/crypt_sha256.c branches/PHP_5_3/ext/standard/crypt_sha512.c branches/PHP_5_4/ext/standard/crypt_sha256.c branches/PHP_5_4/ext/standard/crypt_

2011-07-05 Thread Ilia Alshanetsky
iliaaTue, 05 Jul 2011 20:10:45 +

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

Log:
Fixed bug relating to un-initialized memory access

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c
U   php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c
U   php/php-src/branches/PHP_5_4/ext/standard/crypt_sha256.c
U   php/php-src/branches/PHP_5_4/ext/standard/crypt_sha512.c
U   php/php-src/trunk/ext/standard/crypt_sha256.c
U   php/php-src/trunk/ext/standard/crypt_sha512.c

Modified: php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c2011-07-05 
19:24:18 UTC (rev 312951)
+++ php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c2011-07-05 
20:10:45 UTC (rev 312952)
@@ -395,9 +395,10 @@
}

if ((salt - (char *) 0) % __alignof__(uint32_t) != 0) {
-   char *tmp = (char *) alloca(salt_len + __alignof__(uint32_t));
+   char *tmp = (char *) alloca(salt_len + 1 + 
__alignof__(uint32_t));
salt = copied_salt =
memcpy(tmp + __alignof__(uint32_t) - (tmp - (char *) 0) % 
__alignof__ (uint32_t), salt, salt_len);
+   tmp[salt_len] = 0;
}

/* Prepare for the real work.  */

Modified: php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c2011-07-05 
19:24:18 UTC (rev 312951)
+++ php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c2011-07-05 
20:10:45 UTC (rev 312952)
@@ -430,8 +430,8 @@
}

if ((salt - (char *) 0) % __alignof__ (uint64_t) != 0) {
-   char *tmp = (char *) alloca(salt_len + __alignof__(uint64_t));
-
+   char *tmp = (char *) alloca(salt_len + 1 + 
__alignof__(uint64_t));
+   tmp[salt_len] = 0;
salt = copied_salt = memcpy(tmp + __alignof__(uint64_t) - (tmp 
- (char *) 0) % __alignof__(uint64_t), salt, salt_len);
}


Modified: php/php-src/branches/PHP_5_4/ext/standard/crypt_sha256.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/crypt_sha256.c2011-07-05 
19:24:18 UTC (rev 312951)
+++ php/php-src/branches/PHP_5_4/ext/standard/crypt_sha256.c2011-07-05 
20:10:45 UTC (rev 312952)
@@ -395,9 +395,10 @@
}

if ((salt - (char *) 0) % __alignof__(uint32_t) != 0) {
-   char *tmp = (char *) alloca(salt_len + __alignof__(uint32_t));
+   char *tmp = (char *) alloca(salt_len + 1 + 
__alignof__(uint32_t));
salt = copied_salt =
memcpy(tmp + __alignof__(uint32_t) - (tmp - (char *) 0) % 
__alignof__ (uint32_t), salt, salt_len);
+   tmp[salt_len] = 0;
}

/* Prepare for the real work.  */

Modified: php/php-src/branches/PHP_5_4/ext/standard/crypt_sha512.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/crypt_sha512.c2011-07-05 
19:24:18 UTC (rev 312951)
+++ php/php-src/branches/PHP_5_4/ext/standard/crypt_sha512.c2011-07-05 
20:10:45 UTC (rev 312952)
@@ -430,8 +430,8 @@
}

if ((salt - (char *) 0) % __alignof__ (uint64_t) != 0) {
-   char *tmp = (char *) alloca(salt_len + __alignof__(uint64_t));
-
+   char *tmp = (char *) alloca(salt_len + 1 + 
__alignof__(uint64_t));
+   tmp[salt_len] = 0;
salt = copied_salt = memcpy(tmp + __alignof__(uint64_t) - (tmp 
- (char *) 0) % __alignof__(uint64_t), salt, salt_len);
}


Modified: php/php-src/trunk/ext/standard/crypt_sha256.c
===
--- php/php-src/trunk/ext/standard/crypt_sha256.c   2011-07-05 19:24:18 UTC 
(rev 312951)
+++ php/php-src/trunk/ext/standard/crypt_sha256.c   2011-07-05 20:10:45 UTC 
(rev 312952)
@@ -395,9 +395,10 @@
}

if ((salt - (char *) 0) % __alignof__(uint32_t) != 0) {
-   char *tmp = (char *) alloca(salt_len + __alignof__(uint32_t));
+   char *tmp = (char *) alloca(salt_len + 1 + 
__alignof__(uint32_t));
salt = copied_salt =
memcpy(tmp + __alignof__(uint32_t) - (tmp - (char *) 0) % 
__alignof__ (uint32_t), salt, salt_len);
+   tmp[salt_len] = 0;
}

/* Prepare for the real work.  */

Modified: php/php-src/trunk/ext/standard/crypt_sha512.c
===
--- php/php-src/trunk/ext/standard/crypt_sha512.c   2011-07-05 19:24:18 UTC 
(rev 312951)
+++ php/php-src/trunk/ext/standard/crypt_sha512.c   2011-07-05 20:10:45 UTC 
(rev 312952)
@@ -430,8 +430,8 @@
}

if 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS configure.in main/php_version.h

2011-06-30 Thread Ilia Alshanetsky
iliaaThu, 30 Jun 2011 13:16:27 +

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

Log:
5.3.7RC2

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-06-30 13:14:52 UTC (rev 312678)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-06-30 13:16:27 UTC (rev 312679)
@@ -1,6 +1,6 @@
 PHPNEWS
 |||
-?? ??? 2011, PHP 5.3.7
+30 Jun 2011, PHP 5.3.7 RC2
 - Core:
   . Fixed crash in error_log(). (Felipe) Reported by Mateusz Kocielski.
   . Fixed bug #55082 (var_export() doesn't escape properties properly).

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2011-06-30 13:14:52 UTC (rev 
312678)
+++ php/php-src/branches/PHP_5_3/configure.in   2011-06-30 13:16:27 UTC (rev 
312679)
@@ -42,7 +42,7 @@
 PHP_MAJOR_VERSION=5
 PHP_MINOR_VERSION=3
 PHP_RELEASE_VERSION=7
-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-06-30 13:14:52 UTC 
(rev 312678)
+++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-06-30 13:16:27 UTC 
(rev 312679)
@@ -3,6 +3,6 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 3
 #define PHP_RELEASE_VERSION 7
-#define PHP_EXTRA_VERSION RC2-dev
-#define PHP_VERSION 5.3.7RC2-dev
+#define PHP_EXTRA_VERSION RC2
+#define PHP_VERSION 5.3.7RC2
 #define PHP_VERSION_ID 50307

-- 
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-06-30 Thread Ilia Alshanetsky
iliaaThu, 30 Jun 2011 13:22:31 +

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

Log:
5.3.7RC2

Changed paths:
A + php/php-src/tags/php_5_3_7RC2/
(from php/php-src/branches/PHP_5_3/:r312680)


Property changes on: php/php-src/tags/php_5_3_7RC2
___
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-06-30 Thread Ilia Alshanetsky
iliaaThu, 30 Jun 2011 13:31:39 +

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

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-06-30 13:29:18 UTC (rev 312686)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-06-30 13:31:39 UTC (rev 312687)
@@ -1,5 +1,7 @@
 PHPNEWS
 |||
+?? ??? 2011, PHP 5.3.7
+
 30 Jun 2011, PHP 5.3.7 RC2
 - Core:
   . Fixed crash in error_log(). (Felipe) Reported by Mateusz Kocielski.

Modified: php/php-src/branches/PHP_5_3/configure.in
===
--- php/php-src/branches/PHP_5_3/configure.in   2011-06-30 13:29:18 UTC (rev 
312686)
+++ php/php-src/branches/PHP_5_3/configure.in   2011-06-30 13:31:39 UTC (rev 
312687)
@@ -42,7 +42,7 @@
 PHP_MAJOR_VERSION=5
 PHP_MINOR_VERSION=3
 PHP_RELEASE_VERSION=7
-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-06-30 13:29:18 UTC 
(rev 312686)
+++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-06-30 13:31:39 UTC 
(rev 312687)
@@ -3,6 +3,6 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 3
 #define PHP_RELEASE_VERSION 7
-#define PHP_EXTRA_VERSION RC2
-#define PHP_VERSION 5.3.7RC2
+#define PHP_EXTRA_VERSION RC3-dev
+#define PHP_VERSION 5.3.7RC3-dev
 #define PHP_VERSION_ID 50307

-- 
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_4/sapi/apache2handler/sapi_apache2.c trunk/sapi/apache2handler/sapi_apache2.c

2011-06-23 Thread Ilia Alshanetsky
iliaaThu, 23 Jun 2011 14:12:50 +

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

Log:
Fixed a bug with calculation of REQUEST_TIME in apache2

Changed paths:
U   php/php-src/branches/PHP_5_4/sapi/apache2handler/sapi_apache2.c
U   php/php-src/trunk/sapi/apache2handler/sapi_apache2.c

Modified: php/php-src/branches/PHP_5_4/sapi/apache2handler/sapi_apache2.c
===
--- php/php-src/branches/PHP_5_4/sapi/apache2handler/sapi_apache2.c 
2011-06-23 11:36:40 UTC (rev 312401)
+++ php/php-src/branches/PHP_5_4/sapi/apache2handler/sapi_apache2.c 
2011-06-23 14:12:50 UTC (rev 312402)
@@ -338,7 +338,7 @@
 static double php_apache_sapi_get_request_time(TSRMLS_D)
 {
php_struct *ctx = SG(server_context);
-   return apr_time_as_msec(ctx-r-request_time);
+   return ((double) apr_time_as_msec(ctx-r-request_time)) / 1000.0;
 }

 extern zend_module_entry php_apache_module;

Modified: php/php-src/trunk/sapi/apache2handler/sapi_apache2.c
===
--- php/php-src/trunk/sapi/apache2handler/sapi_apache2.c2011-06-23 
11:36:40 UTC (rev 312401)
+++ php/php-src/trunk/sapi/apache2handler/sapi_apache2.c2011-06-23 
14:12:50 UTC (rev 312402)
@@ -338,7 +338,7 @@
 static double php_apache_sapi_get_request_time(TSRMLS_D)
 {
php_struct *ctx = SG(server_context);
-   return apr_time_as_msec(ctx-r-request_time);
+   return ((double) apr_time_as_msec(ctx-r-request_time)) / 1000.0;
 }

 extern zend_module_entry php_apache_module;

-- 
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/dom/tests/DOMDocument_validate_on_parse_variation.phpt branches/PHP_5_4/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt trunk/ext/dom/tests

2011-06-08 Thread Ilia Alshanetsky
iliaaWed, 08 Jun 2011 23:30:02 +

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

Log:
Fixed test

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
U   
php/php-src/branches/PHP_5_4/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
U   
php/php-src/trunk/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
 2011-06-08 22:20:38 UTC (rev 311954)
+++ 
php/php-src/branches/PHP_5_3/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
 2011-06-08 23:30:02 UTC (rev 311955)
@@ -42,6 +42,10 @@
 No Error Report Above
 validateOnParse set to TRUE:

+Warning: DOMDocument::loadXML(): Entity 'nbsp' not defined in Entity, line: %d 
in %s on line %d
+
+Warning: DOMDocument::loadXML(): Entity 'copy' not defined in Entity, line: %d 
in %s on line %d
+
 Warning: DOMDocument::loadXML(): No declaration for element NYPHP in Entity, 
line: %d in %s on line %d

 Warning: DOMDocument::loadXML(): Element body content does not follow the DTD, 
expecting (p | h1 | h2 | h3 | h4 | h5 | h6 | div | ul | ol | dl | pre | hr | 
blockquote | address | fieldset | table | form | noscript | ins | del | 
script)*, got (div div div div div NYPHP) in Entity, line: %d in %s on line %d

Modified: 
php/php-src/branches/PHP_5_4/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
 2011-06-08 22:20:38 UTC (rev 311954)
+++ 
php/php-src/branches/PHP_5_4/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
 2011-06-08 23:30:02 UTC (rev 311955)
@@ -39,6 +39,10 @@
 No Error Report Above
 validateOnParse set to TRUE:

+Warning: DOMDocument::loadXML(): Entity 'nbsp' not defined in Entity, line: %d 
in %s on line %d
+
+Warning: DOMDocument::loadXML(): Entity 'copy' not defined in Entity, line: %d 
in %s on line %d
+
 Warning: DOMDocument::loadXML(): No declaration for element NYPHP in Entity, 
line: %d in %s on line %d

 Warning: DOMDocument::loadXML(): Element from was declared #PCDATA but 
contains non text nodes in Entity, line: %d in %s on line %d

Modified: 
php/php-src/trunk/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
===
--- 
php/php-src/trunk/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
2011-06-08 22:20:38 UTC (rev 311954)
+++ 
php/php-src/trunk/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
2011-06-08 23:30:02 UTC (rev 311955)
@@ -39,6 +39,10 @@
 No Error Report Above
 validateOnParse set to TRUE:

+Warning: DOMDocument::loadXML(): Entity 'nbsp' not defined in Entity, line: %d 
in %s on line %d
+
+Warning: DOMDocument::loadXML(): Entity 'copy' not defined in Entity, line: %d 
in %s on line %d
+
 Warning: DOMDocument::loadXML(): No declaration for element NYPHP in Entity, 
line: %d in %s on line %d

 Warning: DOMDocument::loadXML(): Element from was declared #PCDATA but 
contains non text nodes in Entity, line: %d in %s on line %d

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/tests/serialize/serialization_miscTypes_001.phpt branches/PHP_5_4/ext/standard/tests/serialize/serialization_miscTypes_001.phpt trunk/ext/sta

2011-06-07 Thread Ilia Alshanetsky
iliaaWed, 08 Jun 2011 02:03:14 +

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

Log:
Fixed test to account for smaller default floating point # precision

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/serialize/serialization_miscTypes_001.phpt
U   
php/php-src/branches/PHP_5_4/ext/standard/tests/serialize/serialization_miscTypes_001.phpt
U   
php/php-src/trunk/ext/standard/tests/serialize/serialization_miscTypes_001.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/standard/tests/serialize/serialization_miscTypes_001.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/standard/tests/serialize/serialization_miscTypes_001.phpt
  2011-06-08 01:35:29 UTC (rev 311911)
+++ 
php/php-src/branches/PHP_5_3/ext/standard/tests/serialize/serialization_miscTypes_001.phpt
  2011-06-08 02:03:14 UTC (rev 311912)
@@ -176,7 +176,7 @@
 }

 -- Iteration 14 --
-after serialization = string(303) 
a:16:{i:0;i:0;i:1;i:1;i:2;i:2;i:3;d:3.333184742976260483264923095703125;i:4;i:-4;i:5;d:-5.55471578290569595992565155029296875;i:6;b:1;i:7;b:0;i:8;N;i:9;s:0:;i:10;s:0:;i:11;s:1:
 
;i:12;a:0:{}i:13;a:3:{i:0;i:1;i:1;i:2;i:2;a:0:{}}i:14;s:6:string;i:15;O:8:stdClass:0:{}}
+after serialization = string(303) 
a:16:{i:0;i:0;i:1;i:1;i:2;i:2;i:3;d:3.3332;i:4;i:-4;i:5;d:-5.5547;i:6;b:1;i:7;b:0;i:8;N;i:9;s:0:;i:10;s:0:;i:11;s:1:
 
;i:12;a:0:{}i:13;a:3:{i:0;i:1;i:1;i:2;i:2;a:0:{}}i:14;s:6:string;i:15;O:8:stdClass:0:{}}
 after unserialization = array(16) {
   [0]=
   int(0)
@@ -223,7 +223,7 @@
 }

 -- Iteration 15 --
-after serialization = string(129) 
a:7:{i:0;i:0;i:1;i:1;i:2;i:-2;i:3;d:3.330101437080957111902534961700439453125;i:4;s:1:a;i:5;a:0:{}i:6;a:1:{i:0;N;}}
+after serialization = string(129) 
a:7:{i:0;i:0;i:1;i:1;i:2;i:-2;i:3;d:3.3301;i:4;s:1:a;i:5;a:0:{}i:6;a:1:{i:0;N;}}
 after unserialization = array(7) {
   [0]=
   int(0)

Modified: 
php/php-src/branches/PHP_5_4/ext/standard/tests/serialize/serialization_miscTypes_001.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/standard/tests/serialize/serialization_miscTypes_001.phpt
  2011-06-08 01:35:29 UTC (rev 311911)
+++ 
php/php-src/branches/PHP_5_4/ext/standard/tests/serialize/serialization_miscTypes_001.phpt
  2011-06-08 02:03:14 UTC (rev 311912)
@@ -176,7 +176,7 @@
 }

 -- Iteration 14 --
-after serialization = string(303) 
a:16:{i:0;i:0;i:1;i:1;i:2;i:2;i:3;d:3.333184742976260483264923095703125;i:4;i:-4;i:5;d:-5.55471578290569595992565155029296875;i:6;b:1;i:7;b:0;i:8;N;i:9;s:0:;i:10;s:0:;i:11;s:1:
 
;i:12;a:0:{}i:13;a:3:{i:0;i:1;i:1;i:2;i:2;a:0:{}}i:14;s:6:string;i:15;O:8:stdClass:0:{}}
+after serialization = string(303) 
a:16:{i:0;i:0;i:1;i:1;i:2;i:2;i:3;d:3.3332;i:4;i:-4;i:5;d:-5.5547;i:6;b:1;i:7;b:0;i:8;N;i:9;s:0:;i:10;s:0:;i:11;s:1:
 
;i:12;a:0:{}i:13;a:3:{i:0;i:1;i:1;i:2;i:2;a:0:{}}i:14;s:6:string;i:15;O:8:stdClass:0:{}}
 after unserialization = array(16) {
   [0]=
   int(0)
@@ -223,7 +223,7 @@
 }

 -- Iteration 15 --
-after serialization = string(129) 
a:7:{i:0;i:0;i:1;i:1;i:2;i:-2;i:3;d:3.330101437080957111902534961700439453125;i:4;s:1:a;i:5;a:0:{}i:6;a:1:{i:0;N;}}
+after serialization = string(129) 
a:7:{i:0;i:0;i:1;i:1;i:2;i:-2;i:3;d:3.3301;i:4;s:1:a;i:5;a:0:{}i:6;a:1:{i:0;N;}}
 after unserialization = array(7) {
   [0]=
   int(0)

Modified: 
php/php-src/trunk/ext/standard/tests/serialize/serialization_miscTypes_001.phpt
===
--- 
php/php-src/trunk/ext/standard/tests/serialize/serialization_miscTypes_001.phpt 
2011-06-08 01:35:29 UTC (rev 311911)
+++ 
php/php-src/trunk/ext/standard/tests/serialize/serialization_miscTypes_001.phpt 
2011-06-08 02:03:14 UTC (rev 311912)
@@ -176,7 +176,7 @@
 }

 -- Iteration 14 --
-after serialization = string(303) 
a:16:{i:0;i:0;i:1;i:1;i:2;i:2;i:3;d:3.333184742976260483264923095703125;i:4;i:-4;i:5;d:-5.55471578290569595992565155029296875;i:6;b:1;i:7;b:0;i:8;N;i:9;s:0:;i:10;s:0:;i:11;s:1:
 
;i:12;a:0:{}i:13;a:3:{i:0;i:1;i:1;i:2;i:2;a:0:{}}i:14;s:6:string;i:15;O:8:stdClass:0:{}}
+after serialization = string(303) 
a:16:{i:0;i:0;i:1;i:1;i:2;i:2;i:3;d:3.3332;i:4;i:-4;i:5;d:-5.5547;i:6;b:1;i:7;b:0;i:8;N;i:9;s:0:;i:10;s:0:;i:11;s:1:
 
;i:12;a:0:{}i:13;a:3:{i:0;i:1;i:1;i:2;i:2;a:0:{}}i:14;s:6:string;i:15;O:8:stdClass:0:{}}
 after unserialization = array(16) {
   [0]=
   int(0)
@@ -223,7 +223,7 @@
 }

 -- Iteration 15 --
-after serialization = string(129) 
a:7:{i:0;i:0;i:1;i:1;i:2;i:-2;i:3;d:3.330101437080957111902534961700439453125;i:4;s:1:a;i:5;a:0:{}i:6;a:1:{i:0;N;}}
+after serialization = string(129) 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/simplexml/simplexml.c branches/PHP_5_4/ext/simplexml/simplexml.c trunk/ext/simplexml/simplexml.c

2011-06-06 Thread Ilia Alshanetsky
iliaaTue, 07 Jun 2011 01:40:54 +

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

Log:
Fixed test 008

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c
U   php/php-src/branches/PHP_5_4/ext/simplexml/simplexml.c
U   php/php-src/trunk/ext/simplexml/simplexml.c

Modified: php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c
===
--- php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c  2011-06-07 
01:27:29 UTC (rev 311873)
+++ php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c  2011-06-07 
01:40:54 UTC (rev 311874)
@@ -1264,9 +1264,8 @@

result = retval-nodesetval;

-   array_init(return_value);
-
if (result != NULL) {
+   array_init(return_value);
for (i = 0; i  result-nodeNr; ++i) {
nodeptr = result-nodeTab[i];
if (nodeptr-type == XML_TEXT_NODE || nodeptr-type == 
XML_ELEMENT_NODE || nodeptr-type == XML_ATTRIBUTE_NODE) {
@@ -1287,6 +1286,8 @@
add_next_index_zval(return_value, value);
}
}
+   } else {
+   RETVAL_FALSE;
}

xmlXPathFreeObject(retval);

Modified: php/php-src/branches/PHP_5_4/ext/simplexml/simplexml.c
===
--- php/php-src/branches/PHP_5_4/ext/simplexml/simplexml.c  2011-06-07 
01:27:29 UTC (rev 311873)
+++ php/php-src/branches/PHP_5_4/ext/simplexml/simplexml.c  2011-06-07 
01:40:54 UTC (rev 311874)
@@ -1294,9 +1294,8 @@

result = retval-nodesetval;

-   array_init(return_value);
-
if (result != NULL) {
+   array_init(return_value);
for (i = 0; i  result-nodeNr; ++i) {
nodeptr = result-nodeTab[i];
if (nodeptr-type == XML_TEXT_NODE || nodeptr-type == 
XML_ELEMENT_NODE || nodeptr-type == XML_ATTRIBUTE_NODE) {
@@ -1317,6 +1316,8 @@
add_next_index_zval(return_value, value);
}
}
+   } else {
+   RETVAL_FALSE;
}

xmlXPathFreeObject(retval);

Modified: php/php-src/trunk/ext/simplexml/simplexml.c
===
--- php/php-src/trunk/ext/simplexml/simplexml.c 2011-06-07 01:27:29 UTC (rev 
311873)
+++ php/php-src/trunk/ext/simplexml/simplexml.c 2011-06-07 01:40:54 UTC (rev 
311874)
@@ -1294,9 +1294,8 @@

result = retval-nodesetval;

-   array_init(return_value);
-
if (result != NULL) {
+   array_init(return_value);
for (i = 0; i  result-nodeNr; ++i) {
nodeptr = result-nodeTab[i];
if (nodeptr-type == XML_TEXT_NODE || nodeptr-type == 
XML_ELEMENT_NODE || nodeptr-type == XML_ATTRIBUTE_NODE) {
@@ -1317,6 +1316,8 @@
add_next_index_zval(return_value, value);
}
}
+   } else {
+   RETVAL_FALSE;
}

xmlXPathFreeObject(retval);

-- 
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/bz2/tests/bug51997.phpt branches/PHP_5_3/main/streams/streams.c branches/PHP_5_4/ext/bz2/tests/bug51997.phpt branches/PHP_5_4/ma

2011-06-05 Thread Ilia Alshanetsky
iliaaSun, 05 Jun 2011 21:57:01 +

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

Log:
Fixed bug #51997 (SEEK_CUR with 0 value, returns a warning).

Bug: http://bugs.php.net/51997 (Assigned) fseek($fp, 0, SEEK_CUR) generates 
needless warning when seeking isn't supported
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
A   php/php-src/branches/PHP_5_3/ext/bz2/tests/bug51997.phpt
U   php/php-src/branches/PHP_5_3/main/streams/streams.c
A   php/php-src/branches/PHP_5_4/ext/bz2/tests/bug51997.phpt
U   php/php-src/branches/PHP_5_4/main/streams/streams.c
A   php/php-src/trunk/ext/bz2/tests/bug51997.phpt
U   php/php-src/trunk/main/streams/streams.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-06-05 21:44:34 UTC (rev 311848)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-06-05 21:57:01 UTC (rev 311849)
@@ -47,6 +47,7 @@
   . Fixed bug #54721 (Different Hashes on Windows, BSD and Linux on wrong Salt 
size)
 (Pierre, os at irj dot ru)
   . Fixed bug #53848 (fgetcsv() ignores spaces at beginnings of fields). (Ilia)
+  . Fixed bug #51997 (SEEK_CUR with 0 value, returns a warning). (Ilia)
   . Fixed bug #50363 (Invalid parsing in convert.quoted-printable-decode 
filter).
 (slusarz at curecanti dot org)
   . Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using

Added: php/php-src/branches/PHP_5_3/ext/bz2/tests/bug51997.phpt
===
--- php/php-src/branches/PHP_5_3/ext/bz2/tests/bug51997.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/bz2/tests/bug51997.phpt2011-06-05 
21:57:01 UTC (rev 311849)
@@ -0,0 +1,24 @@
+--TEST--
+Bug #51997 (SEEK_CUR with 0 value, returns a warning)
+--SKIPIF--
+?php if (!extension_loaded(bz2)) print skip; ?
+--FILE--
+?php
+
+error_reporting(E_ALL);
+
+$filename = testfile.bz2;
+$str = This is a test string.\n;
+$bz = bzopen($filename, w);
+bzwrite($bz, $str);
+bzclose($bz);
+
+$bz = bzopen($filename, r);
+fseek($bz, 0, SEEK_CUR);
+print bzread($bz, 10);
+print bzread($bz);
+bzclose($bz);
+unlink($filename);
+
+--EXPECT--
+This is a test string.

Modified: php/php-src/branches/PHP_5_3/main/streams/streams.c
===
--- php/php-src/branches/PHP_5_3/main/streams/streams.c 2011-06-05 21:44:34 UTC 
(rev 311848)
+++ php/php-src/branches/PHP_5_3/main/streams/streams.c 2011-06-05 21:57:01 UTC 
(rev 311849)
@@ -1184,7 +1184,7 @@
}

/* emulate forward moving seeks with reads */
-   if (whence == SEEK_CUR  offset  0) {
+   if (whence == SEEK_CUR  offset = 0) {
char tmp[1024];
size_t didread;
while(offset  0) {

Added: php/php-src/branches/PHP_5_4/ext/bz2/tests/bug51997.phpt
===
--- php/php-src/branches/PHP_5_4/ext/bz2/tests/bug51997.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/bz2/tests/bug51997.phpt2011-06-05 
21:57:01 UTC (rev 311849)
@@ -0,0 +1,24 @@
+--TEST--
+Bug #51997 (SEEK_CUR with 0 value, returns a warning)
+--SKIPIF--
+?php if (!extension_loaded(bz2)) print skip; ?
+--FILE--
+?php
+
+error_reporting(E_ALL);
+
+$filename = testfile.bz2;
+$str = This is a test string.\n;
+$bz = bzopen($filename, w);
+bzwrite($bz, $str);
+bzclose($bz);
+
+$bz = bzopen($filename, r);
+fseek($bz, 0, SEEK_CUR);
+print bzread($bz, 10);
+print bzread($bz);
+bzclose($bz);
+unlink($filename);
+
+--EXPECT--
+This is a test string.

Modified: php/php-src/branches/PHP_5_4/main/streams/streams.c
===
--- php/php-src/branches/PHP_5_4/main/streams/streams.c 2011-06-05 21:44:34 UTC 
(rev 311848)
+++ php/php-src/branches/PHP_5_4/main/streams/streams.c 2011-06-05 21:57:01 UTC 
(rev 311849)
@@ -1255,7 +1255,7 @@
}

/* emulate forward moving seeks with reads */
-   if (whence == SEEK_CUR  offset  0) {
+   if (whence == SEEK_CUR  offset = 0) {
char tmp[1024];
size_t didread;
while(offset  0) {

Added: php/php-src/trunk/ext/bz2/tests/bug51997.phpt
===
--- php/php-src/trunk/ext/bz2/tests/bug51997.phpt   
(rev 0)
+++ php/php-src/trunk/ext/bz2/tests/bug51997.phpt   2011-06-05 21:57:01 UTC 
(rev 311849)
@@ -0,0 +1,24 @@
+--TEST--
+Bug #51997 (SEEK_CUR with 0 value, returns a warning)
+--SKIPIF--
+?php if (!extension_loaded(bz2)) print skip; ?
+--FILE--
+?php
+
+error_reporting(E_ALL);
+
+$filename = testfile.bz2;
+$str = This is a test string.\n;
+$bz = bzopen($filename, w);
+bzwrite($bz, $str);
+bzclose($bz);
+
+$bz = bzopen($filename, r);
+fseek($bz, 0, 

Re: [PHP-CVS] svn: /php/php-src/trunk/ TSRM/TSRM.c TSRM/TSRM.h TSRM/tsrm.m4 Zend/Makefile.am Zend/Zend.m4 Zend/zend.c Zend/zend.h Zend/zend_alloc.c Zend/zend_execute_API.c Zend/zend_hash.c Zend/zend_s

2011-06-03 Thread Ilia Alshanetsky
News will be added once this goes into 5.4

On Fri, Jun 3, 2011 at 3:14 AM, Christopher Jones
christopher.jo...@oracle.com wrote:
 Ilia,

 What about NEWS?

 Chris

 On 06/02/2011 02:16 PM, Ilia Alshanetsky wrote:

 iliaa                                    Thu, 02 Jun 2011 21:16:50 +

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

 Log:
 Zend Signal Handling (see RFC: https://wiki.php.net/rfc/zendsignals)
 This needs to go into 5.4 as well, but will wait for Pierre to review
 win32 situation

 # Patch by Lucas Nealan, Arnaud Le Blanc, Brian Shire  Ilia Alshanetsky

 Changed paths:
     U   php/php-src/trunk/TSRM/TSRM.c
     U   php/php-src/trunk/TSRM/TSRM.h
     U   php/php-src/trunk/TSRM/tsrm.m4
     U   php/php-src/trunk/Zend/Makefile.am
     U   php/php-src/trunk/Zend/Zend.m4
     U   php/php-src/trunk/Zend/zend.c
     U   php/php-src/trunk/Zend/zend.h
     U   php/php-src/trunk/Zend/zend_alloc.c
     U   php/php-src/trunk/Zend/zend_execute_API.c
     U   php/php-src/trunk/Zend/zend_hash.c
     A   php/php-src/trunk/Zend/zend_signal.c
     A   php/php-src/trunk/Zend/zend_signal.h
     U   php/php-src/trunk/configure.in
     U   php/php-src/trunk/ext/pcntl/php_signal.c
     U   php/php-src/trunk/ext/standard/info.c
     U
 php/php-src/trunk/ext/standard/tests/general_functions/phpinfo.phpt
     U   php/php-src/trunk/main/SAPI.c
     U   php/php-src/trunk/main/main.c



 --
 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 Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/trunk/ext/pcntl/ php_signal.c

2011-06-03 Thread Ilia Alshanetsky
iliaaFri, 03 Jun 2011 07:00:38 +

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

Log:
Compiler warning fix

Changed paths:
U   php/php-src/trunk/ext/pcntl/php_signal.c

Modified: php/php-src/trunk/ext/pcntl/php_signal.c
===
--- php/php-src/trunk/ext/pcntl/php_signal.c2011-06-03 01:44:37 UTC (rev 
311748)
+++ php/php-src/trunk/ext/pcntl/php_signal.c2011-06-03 07:00:38 UTC (rev 
311749)
@@ -20,6 +20,8 @@

 #include TSRM.h
 #include php_signal.h
+#include Zend/zend.h
+#include Zend/zend_signal.h

 /* php_signal using sigaction is derrived from Advanced Programing
  * in the Unix Environment by W. Richard Stevens p 298. */

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

[PHP-CVS] svn: /php/php-src/trunk/ext/pcntl/ pcntl.c tests/pcntl_signal.phpt

2011-06-03 Thread Ilia Alshanetsky
iliaaFri, 03 Jun 2011 17:18:46 +

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

Log:
Fixed crash and improved signal validation

Changed paths:
U   php/php-src/trunk/ext/pcntl/pcntl.c
U   php/php-src/trunk/ext/pcntl/tests/pcntl_signal.phpt

Modified: php/php-src/trunk/ext/pcntl/pcntl.c
===
--- php/php-src/trunk/ext/pcntl/pcntl.c 2011-06-03 17:12:59 UTC (rev 311780)
+++ php/php-src/trunk/ext/pcntl/pcntl.c 2011-06-03 17:18:46 UTC (rev 311781)
@@ -849,6 +849,11 @@
return;
}

+   if (signo  1 || signo  32) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid signal);
+   RETURN_FALSE;
+   }
+
if (!PCNTL_G(spares)) {
/* since calling malloc() from within a signal handler is not 
portable,
 * pre-allocate a few records for recording signals */
@@ -863,9 +868,10 @@
}

/* Special long value case for SIG_DFL and SIG_IGN */
-   if (Z_TYPE_P(handle)==IS_LONG) {
-   if (Z_LVAL_P(handle)!= (long) SIG_DFL  Z_LVAL_P(handle) != 
(long) SIG_IGN) {
+   if (Z_TYPE_P(handle) == IS_LONG) {
+   if (Z_LVAL_P(handle) != (long) SIG_DFL  Z_LVAL_P(handle) != 
(long) SIG_IGN) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid 
value for handle argument specified);
+   RETURN_FALSE;
}
if (php_signal(signo, (Sigfunc *) Z_LVAL_P(handle), (int) 
restart_syscalls) == SIG_ERR) {
PCNTL_G(last_error) = errno;

Modified: php/php-src/trunk/ext/pcntl/tests/pcntl_signal.phpt
===
--- php/php-src/trunk/ext/pcntl/tests/pcntl_signal.phpt 2011-06-03 17:12:59 UTC 
(rev 311780)
+++ php/php-src/trunk/ext/pcntl/tests/pcntl_signal.phpt 2011-06-03 17:18:46 UTC 
(rev 311781)
@@ -28,12 +28,10 @@
 NULL
 bool(true)

-Warning: pcntl_signal(): Invalid value for handle argument specified in %s
-
-Warning: pcntl_signal(): Error assigning signal %s
+Warning: pcntl_signal(): Invalid signal %s
 bool(false)

-Warning: pcntl_signal(): Error assigning signal %s
+Warning: pcntl_signal(): Invalid signal %s
 bool(false)

 Warning: pcntl_signal(): not callable is not a callable function name error in 
%s

-- 
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/intl/php_intl.c branches/PHP_5_4/ext/intl/php_intl.c trunk/ext/intl/php_intl.c

2011-06-03 Thread Ilia Alshanetsky
iliaaFri, 03 Jun 2011 18:14:36 +

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

Log:
Show ICU Data version inside phpinfo()

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/intl/php_intl.c
U   php/php-src/branches/PHP_5_4/ext/intl/php_intl.c
U   php/php-src/trunk/ext/intl/php_intl.c

Modified: php/php-src/branches/PHP_5_3/ext/intl/php_intl.c
===
--- php/php-src/branches/PHP_5_3/ext/intl/php_intl.c2011-06-03 17:38:37 UTC 
(rev 311782)
+++ php/php-src/branches/PHP_5_3/ext/intl/php_intl.c2011-06-03 18:14:36 UTC 
(rev 311783)
@@ -651,6 +651,9 @@
php_info_print_table_header( 2, Internationalization support, 
enabled );
php_info_print_table_row( 2, version, INTL_MODULE_VERSION );
php_info_print_table_row( 2, ICU version, U_ICU_VERSION );
+#ifdef U_ICU_DATA_VERSION
+   php_info_print_table_row( 2, ICU Data version, U_ICU_DATA_VERSION );
+#endif
php_info_print_table_end();

 /* For the default locale php.ini setting */

Modified: php/php-src/branches/PHP_5_4/ext/intl/php_intl.c
===
--- php/php-src/branches/PHP_5_4/ext/intl/php_intl.c2011-06-03 17:38:37 UTC 
(rev 311782)
+++ php/php-src/branches/PHP_5_4/ext/intl/php_intl.c2011-06-03 18:14:36 UTC 
(rev 311783)
@@ -711,6 +711,9 @@
php_info_print_table_header( 2, Internationalization support, 
enabled );
php_info_print_table_row( 2, version, INTL_MODULE_VERSION );
php_info_print_table_row( 2, ICU version, U_ICU_VERSION );
+#ifdef U_ICU_DATA_VERSION
+   php_info_print_table_row( 2, ICU Data version, U_ICU_DATA_VERSION );
+#endif
php_info_print_table_end();

 /* For the default locale php.ini setting */

Modified: php/php-src/trunk/ext/intl/php_intl.c
===
--- php/php-src/trunk/ext/intl/php_intl.c   2011-06-03 17:38:37 UTC (rev 
311782)
+++ php/php-src/trunk/ext/intl/php_intl.c   2011-06-03 18:14:36 UTC (rev 
311783)
@@ -711,6 +711,9 @@
php_info_print_table_header( 2, Internationalization support, 
enabled );
php_info_print_table_row( 2, version, INTL_MODULE_VERSION );
php_info_print_table_row( 2, ICU version, U_ICU_VERSION );
+#ifdef U_ICU_DATA_VERSION
+   php_info_print_table_row( 2, ICU Data version, U_ICU_DATA_VERSION );
+#endif
php_info_print_table_end();

 /* For the default locale php.ini setting */

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/intl/php_intl.c branches/PHP_5_3/ext/intl/tests/intl_icu_version_constant.phpt branches/PHP_5_4/ext/intl/php_intl.c branches

2011-06-02 Thread Ilia Alshanetsky
The version is already printed in phpinfo(), I am not sure we need to
bring the data version... What do you think?

On Thu, Jun 2, 2011 at 11:37 AM, Hannes Magnusson
hannes.magnus...@gmail.com wrote:
 On Wed, Jun 1, 2011 at 18:26, Ilia Alshanetsky il...@php.net wrote:
 iliaa                                    Wed, 01 Jun 2011 16:26:21 +

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

 Log:
 Implemented FR #54561 (Expose ICU Version  ICU Data Version info).

 Bug: http://bugs.php.net/54561 (Assigned) Expose ICU version info

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/intl/php_intl.c
    A   
 php/php-src/branches/PHP_5_3/ext/intl/tests/intl_icu_version_constant.phpt
    U   php/php-src/branches/PHP_5_4/ext/intl/php_intl.c
    A   
 php/php-src/branches/PHP_5_4/ext/intl/tests/intl_icu_version_constant.phpt
    U   php/php-src/trunk/ext/intl/php_intl.c
    A   php/php-src/trunk/ext/intl/tests/intl_icu_version_constant.phpt

 Modified: php/php-src/branches/PHP_5_3/NEWS
 ===
 --- php/php-src/branches/PHP_5_3/NEWS   2011-06-01 16:23:43 UTC (rev 311713)
 +++ php/php-src/branches/PHP_5_3/NEWS   2011-06-01 16:26:21 UTC (rev 311714)
 @@ -90,6 +90,7 @@
  - intl extension:
   . Implemented FR #54540 (Allow loading of arbitrary resource bundles when
     fallback is disabled). (David Zuelke, Stas)
 +  . Implemented FR #54561 (Expose ICU version info). (David Zuelke, Ilia)

  - json extension:
   . Fixed bug #54484 (Empty string in json_decode doesn't reset

 Modified: php/php-src/branches/PHP_5_3/ext/intl/php_intl.c
 ===
 --- php/php-src/branches/PHP_5_3/ext/intl/php_intl.c    2011-06-01 16:23:43 
 UTC (rev 311713)
 +++ php/php-src/branches/PHP_5_3/ext/intl/php_intl.c    2011-06-01 16:26:21 
 UTC (rev 311714)
 @@ -543,6 +543,10 @@
        REGISTER_INI_ENTRIES();

        REGISTER_LONG_CONSTANT(INTL_MAX_LOCALE_LEN, INTL_MAX_LOCALE_LEN, 
 CONST_CS);
 +       REGISTER_STRING_CONSTANT(INTL_ICU_VERSION, U_ICU_VERSION, 
 CONST_PERSISTENT | CONST_CS);
 +#ifdef U_ICU_DATA_VERSION
 +       REGISTER_STRING_CONSTANT(INTL_ICU_DATA_VERSION, 
 U_ICU_DATA_VERSION, CONST_PERSISTENT | CONST_CS);
 +#endif



 Print it in phpinfo() too?

 -Hannes


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



[PHP-CVS] svn: /php/php-src/trunk/ TSRM/TSRM.c TSRM/TSRM.h TSRM/tsrm.m4 Zend/Makefile.am Zend/Zend.m4 Zend/zend.c Zend/zend.h Zend/zend_alloc.c Zend/zend_execute_API.c Zend/zend_hash.c Zend/zend_signa

2011-06-02 Thread Ilia Alshanetsky
iliaaThu, 02 Jun 2011 21:16:50 +

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

Log:
Zend Signal Handling (see RFC: https://wiki.php.net/rfc/zendsignals)
This needs to go into 5.4 as well, but will wait for Pierre to review win32 
situation

# Patch by Lucas Nealan, Arnaud Le Blanc, Brian Shire  Ilia Alshanetsky

Changed paths:
U   php/php-src/trunk/TSRM/TSRM.c
U   php/php-src/trunk/TSRM/TSRM.h
U   php/php-src/trunk/TSRM/tsrm.m4
U   php/php-src/trunk/Zend/Makefile.am
U   php/php-src/trunk/Zend/Zend.m4
U   php/php-src/trunk/Zend/zend.c
U   php/php-src/trunk/Zend/zend.h
U   php/php-src/trunk/Zend/zend_alloc.c
U   php/php-src/trunk/Zend/zend_execute_API.c
U   php/php-src/trunk/Zend/zend_hash.c
A   php/php-src/trunk/Zend/zend_signal.c
A   php/php-src/trunk/Zend/zend_signal.h
U   php/php-src/trunk/configure.in
U   php/php-src/trunk/ext/pcntl/php_signal.c
U   php/php-src/trunk/ext/standard/info.c
U   php/php-src/trunk/ext/standard/tests/general_functions/phpinfo.phpt
U   php/php-src/trunk/main/SAPI.c
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/TSRM/TSRM.c
===
--- php/php-src/trunk/TSRM/TSRM.c	2011-06-02 20:01:40 UTC (rev 311739)
+++ php/php-src/trunk/TSRM/TSRM.c	2011-06-02 21:16:50 UTC (rev 311740)
@@ -710,7 +710,23 @@
 #endif
 }

+/*
+  Changes the signal mask of the calling thread
+*/
+#ifdef HAVE_SIGPROCMASK
+TSRM_API int tsrm_sigmask(int how, const sigset_t *set, sigset_t *oldset)
+{
+	TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, Changed sigmask in thread: %ld, tsrm_thread_id()));
+	/* TODO: add support for other APIs */
+#ifdef PTHREADS
+	return pthread_sigmask(how, set, oldset);
+#else
+	return sigprocmask(how, set, oldset);
+#endif
+}
+#endif

+
 TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler)
 {
 	void *retval = (void *) tsrm_new_thread_begin_handler;

Modified: php/php-src/trunk/TSRM/TSRM.h
===
--- php/php-src/trunk/TSRM/TSRM.h	2011-06-02 20:01:40 UTC (rev 311739)
+++ php/php-src/trunk/TSRM/TSRM.h	2011-06-02 21:16:50 UTC (rev 311740)
@@ -90,6 +90,10 @@
 # define MUTEX_T beos_ben *
 #endif

+#ifdef HAVE_SIGNAL_H
+#include signal.h
+#endif
+
 typedef void (*ts_allocate_ctor)(void *, void ***);
 typedef void (*ts_allocate_dtor)(void *, void ***);

@@ -138,6 +142,9 @@
 TSRM_API void tsrm_mutex_free(MUTEX_T mutexp);
 TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp);
 TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp);
+#ifdef HAVE_SIGPROCMASK
+TSRM_API int tsrm_sigmask(int how, const sigset_t *set, sigset_t *oldset);
+#endif

 TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler);
 TSRM_API void *tsrm_set_new_thread_end_handler(tsrm_thread_end_func_t new_thread_end_handler);

Modified: php/php-src/trunk/TSRM/tsrm.m4
===
--- php/php-src/trunk/TSRM/tsrm.m4	2011-06-02 20:01:40 UTC (rev 311739)
+++ php/php-src/trunk/TSRM/tsrm.m4	2011-06-02 21:16:50 UTC (rev 311740)
@@ -30,6 +30,8 @@

 AC_CHECK_HEADERS(stdarg.h)

+AC_CHECK_FUNCS(sigprocmask)
+
 ])



Modified: php/php-src/trunk/Zend/Makefile.am
===
--- php/php-src/trunk/Zend/Makefile.am	2011-06-02 20:01:40 UTC (rev 311739)
+++ php/php-src/trunk/Zend/Makefile.am	2011-06-02 21:16:50 UTC (rev 311740)
@@ -17,7 +17,7 @@
 	zend_objects_API.c zend_ts_hash.c zend_stream.c \
 	zend_default_classes.c \
 	zend_iterators.c zend_interfaces.c zend_exceptions.c \
-	zend_strtod.c zend_closures.c zend_float.c zend_string.c
+	zend_strtod.c zend_closures.c zend_float.c zend_string.c zend_signal.c

 libZend_la_LDFLAGS =
 libZend_la_LIBADD = @ZEND_EXTRA_LIBS@

Modified: php/php-src/trunk/Zend/Zend.m4
===
--- php/php-src/trunk/Zend/Zend.m4	2011-06-02 20:01:40 UTC (rev 311739)
+++ php/php-src/trunk/Zend/Zend.m4	2011-06-02 21:16:50 UTC (rev 311740)
@@ -392,9 +392,23 @@

 AC_CHECK_FUNCS(mremap)

+
+AC_CHECK_FUNC(sigaction, [
+	ZEND_SIGNALS=yes
+	AC_DEFINE(ZEND_SIGNALS, 1, [Use zend signal handling])
+	AC_DEFINE(HAVE_SIGACTION, 1, [Whether sigaction() is available])
+], [
+	ZEND_SIGNALS=no
 ])
+if test $ZEND_SIGNALS = yes; then
+	CFLAGS=$CFLAGS -DZEND_SIGNALS
+fi

+AC_MSG_CHECKING(whether to enable zend signal handling)
+AC_MSG_RESULT($ZEND_SIGNALS)

+])
+
 AC_DEFUN([LIBZEND_CPLUSPLUS_CHECKS],[

 ])

Modified: php/php-src/trunk/Zend/zend.c
===
--- php/php-src/trunk/Zend/zend.c	2011-06-02 20:01:40 UTC (rev 311739)
+++ php/php-src/trunk/Zend/zend.c	2011-06-02 21:16:50 UTC (rev 311740)
@@ -108,6 +108,9 @@
  	STD_ZEND_INI_BOOLEAN(zend.multibyte, 0, ZEND_INI_PERDIR, OnUpdateBool, multibyte

[PHP-CVS] svn: /php/php-src/trunk/Zend/ zend_alloc.c

2011-06-02 Thread Ilia Alshanetsky
iliaaThu, 02 Jun 2011 21:38:54 +

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

Log:
Missing ifdef related to the previous patch

Changed paths:
U   php/php-src/trunk/Zend/zend_alloc.c

Modified: php/php-src/trunk/Zend/zend_alloc.c
===
--- php/php-src/trunk/Zend/zend_alloc.c 2011-06-02 21:16:50 UTC (rev 311740)
+++ php/php-src/trunk/Zend/zend_alloc.c 2011-06-02 21:38:54 UTC (rev 311741)
@@ -2123,8 +2123,9 @@
size_t true_size;
size_t orig_size;
void *ptr;
+#ifdef ZEND_SIGNALS
TSRMLS_FETCH();
-
+#endif
if (UNEXPECTED(!p) || !ZEND_MM_VALID_PTR(p)) {
return _zend_mm_alloc_int(heap, size ZEND_FILE_LINE_RELAY_CC 
ZEND_FILE_LINE_ORIG_RELAY_CC);
}

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/json/json.c branches/PHP_5_3/ext/json/tests/bug54484.phpt branches/PHP_5_4/ext/json/json.c branches/PHP_5_4/ext/json/tests/bug54

2011-06-01 Thread Ilia Alshanetsky
iliaaWed, 01 Jun 2011 09:44:38 +

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

Log:
Fixed bug #54484 (Empty string in json_decode doesn't reset json_last_error()).

Bug: http://bugs.php.net/54484 (Assigned) Empty string in json_decode doesn't 
set/reset json_last_error
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/json/json.c
A   php/php-src/branches/PHP_5_3/ext/json/tests/bug54484.phpt
U   php/php-src/branches/PHP_5_4/ext/json/json.c
A   php/php-src/branches/PHP_5_4/ext/json/tests/bug54484.phpt
U   php/php-src/trunk/ext/json/json.c
A   php/php-src/trunk/ext/json/tests/bug54484.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-06-01 09:22:05 UTC (rev 311707)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-06-01 09:44:38 UTC (rev 311708)
@@ -91,6 +91,10 @@
   . Implemented FR #54540 (Allow loading of arbitrary resource bundles when
 fallback is disabled). (David Zuelke, Stas)

+- json extension:
+  . Fixed bug #54484 (Empty string in json_decode doesn't reset
+json_last_error()). (Ilia)
+
 - LDAP extension:
   . Fixed bug #53339 (Fails to build when compilng with gcc 4.5 and DSO
 libraries). (Clint Byrum, Raphael)

Modified: php/php-src/branches/PHP_5_3/ext/json/json.c
===
--- php/php-src/branches/PHP_5_3/ext/json/json.c2011-06-01 09:22:05 UTC 
(rev 311707)
+++ php/php-src/branches/PHP_5_3/ext/json/json.c2011-06-01 09:44:38 UTC 
(rev 311708)
@@ -589,6 +589,8 @@
return;
}

+   JSON_G(error_code) = 0;
+
if (!str_len) {
RETURN_NULL();
}

Added: php/php-src/branches/PHP_5_3/ext/json/tests/bug54484.phpt
===
--- php/php-src/branches/PHP_5_3/ext/json/tests/bug54484.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/json/tests/bug54484.phpt   2011-06-01 
09:44:38 UTC (rev 311708)
@@ -0,0 +1,50 @@
+--TEST--
+Bug #54484 (Empty string in json_decode doesn't reset json_last_error)
+--SKIPIF--
+?php if (!extension_loaded(json)) print skip; ?
+--FILE--
+?php
+json_decode('{test:test}');
+var_dump(json_last_error());
+
+json_decode();
+var_dump(json_last_error());
+
+
+json_decode(invalid json);
+var_dump(json_last_error());
+
+
+json_decode();
+var_dump(json_last_error());
+?
+--EXPECT--
+int(0)
+int(0)
+int(4)
+int(0)
+--TEST--
+Bug #54484 (Empty string in json_decode doesn't reset json_last_error)
+--SKIPIF--
+?php if (!extension_loaded(json)) print skip; ?
+--FILE--
+?php
+json_decode('{test:test}');
+var_dump(json_last_error());
+
+json_decode();
+var_dump(json_last_error());
+
+
+json_decode(invalid json);
+var_dump(json_last_error());
+
+
+json_decode();
+var_dump(json_last_error());
+?
+--EXPECT--
+int(0)
+int(0)
+int(4)
+int(0)

Modified: php/php-src/branches/PHP_5_4/ext/json/json.c
===
--- php/php-src/branches/PHP_5_4/ext/json/json.c2011-06-01 09:22:05 UTC 
(rev 311707)
+++ php/php-src/branches/PHP_5_4/ext/json/json.c2011-06-01 09:44:38 UTC 
(rev 311708)
@@ -703,6 +703,8 @@
return;
}

+   JSON_G(error_code) = 0;
+
if (!str_len) {
RETURN_NULL();
}

Added: php/php-src/branches/PHP_5_4/ext/json/tests/bug54484.phpt
===
--- php/php-src/branches/PHP_5_4/ext/json/tests/bug54484.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/json/tests/bug54484.phpt   2011-06-01 
09:44:38 UTC (rev 311708)
@@ -0,0 +1,25 @@
+--TEST--
+Bug #54484 (Empty string in json_decode doesn't reset json_last_error)
+--SKIPIF--
+?php if (!extension_loaded(json)) print skip; ?
+--FILE--
+?php
+json_decode('{test:test}');
+var_dump(json_last_error());
+
+json_decode();
+var_dump(json_last_error());
+
+
+json_decode(invalid json);
+var_dump(json_last_error());
+
+
+json_decode();
+var_dump(json_last_error());
+?
+--EXPECT--
+int(0)
+int(0)
+int(4)
+int(0)

Modified: php/php-src/trunk/ext/json/json.c
===
--- php/php-src/trunk/ext/json/json.c   2011-06-01 09:22:05 UTC (rev 311707)
+++ php/php-src/trunk/ext/json/json.c   2011-06-01 09:44:38 UTC (rev 311708)
@@ -703,6 +703,8 @@
return;
}

+   JSON_G(error_code) = 0;
+
if (!str_len) {
RETURN_NULL();
}

Added: php/php-src/trunk/ext/json/tests/bug54484.phpt
===
--- php/php-src/trunk/ext/json/tests/bug54484.phpt  
(rev 0)
+++ php/php-src/trunk/ext/json/tests/bug54484.phpt  

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pdo/pdo_stmt.c branches/PHP_5_4/ext/pdo/pdo_stmt.c trunk/ext/pdo/pdo_stmt.c

2011-06-01 Thread Ilia Alshanetsky
iliaaWed, 01 Jun 2011 13:23:25 +

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

Log:
Fixed bug #52104 (bindColumn creates Warning regardless of ATTR_ERRMODE 
settings).

Bug: http://bugs.php.net/52104 (Assigned) bindColumn creates Warning regardless 
of ATTR_ERRMODE settings
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c
U   php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c
U   php/php-src/trunk/ext/pdo/pdo_stmt.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-06-01 12:53:07 UTC (rev 311710)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-06-01 13:23:25 UTC (rev 311711)
@@ -115,6 +115,10 @@
 set mysqlnd.net_cmd_buffer_size to at least 9000. (Andrey)
   . Fixed bug #54674 mysqlnd valid_sjis_(head|tail) is using invalid operator
 and range). (nihen at megabbs dot com, Andrey)
+
+- PDO extension:
+  . Fixed bug #52104 (bindColumn creates Warning regardless of ATTR_ERRMODE
+settings). (Ilia)

 - PDO DBlib driver:
   . Fixed bug #54167 (PDO_DBLIB returns null on SQLUNIQUE field).

Modified: php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c
===
--- php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c 2011-06-01 12:53:07 UTC 
(rev 311710)
+++ php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c 2011-06-01 13:23:25 UTC 
(rev 311711)
@@ -349,7 +349,10 @@
/* if you prepare and then execute passing an array of params 
keyed by names,
 * then this will trigger, and we don't want that */
if (param-paramno == -1) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Did not 
found column name '%s' in the defined columns; it will not be bound, 
param-name);
+   char *tmp;
+   spprintf(tmp, 0, Did not find column name '%s' in the 
defined columns; it will not be bound, param-name);
+   pdo_raise_impl_error(stmt-dbh, stmt, HY000, tmp 
TSRMLS_CC);
+   efree(tmp);
}
}


Modified: php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c
===
--- php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c 2011-06-01 12:53:07 UTC 
(rev 311710)
+++ php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c 2011-06-01 13:23:25 UTC 
(rev 311711)
@@ -349,7 +349,10 @@
/* if you prepare and then execute passing an array of params 
keyed by names,
 * then this will trigger, and we don't want that */
if (param-paramno == -1) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Did not 
found column name '%s' in the defined columns; it will not be bound, 
param-name);
+   char *tmp;
+   spprintf(tmp, 0, Did not find column name '%s' in the 
defined columns; it will not be bound, param-name);
+   pdo_raise_impl_error(stmt-dbh, stmt, HY000, tmp 
TSRMLS_CC);
+   efree(tmp);
}
}


Modified: php/php-src/trunk/ext/pdo/pdo_stmt.c
===
--- php/php-src/trunk/ext/pdo/pdo_stmt.c2011-06-01 12:53:07 UTC (rev 
311710)
+++ php/php-src/trunk/ext/pdo/pdo_stmt.c2011-06-01 13:23:25 UTC (rev 
311711)
@@ -349,7 +349,10 @@
/* if you prepare and then execute passing an array of params 
keyed by names,
 * then this will trigger, and we don't want that */
if (param-paramno == -1) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Did not 
found column name '%s' in the defined columns; it will not be bound, 
param-name);
+   char *tmp;
+   spprintf(tmp, 0, Did not find column name '%s' in the 
defined columns; it will not be bound, param-name);
+   pdo_raise_impl_error(stmt-dbh, stmt, HY000, tmp 
TSRMLS_CC);
+   efree(tmp);
}
}


-- 
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/intl/php_intl.c branches/PHP_5_3/ext/intl/tests/intl_icu_version_constant.phpt branches/PHP_5_4/ext/intl/php_intl.c branches/PHP

2011-06-01 Thread Ilia Alshanetsky
iliaaWed, 01 Jun 2011 16:26:21 +

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

Log:
Implemented FR #54561 (Expose ICU Version  ICU Data Version info).

Bug: http://bugs.php.net/54561 (Assigned) Expose ICU version info
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/intl/php_intl.c
A   
php/php-src/branches/PHP_5_3/ext/intl/tests/intl_icu_version_constant.phpt
U   php/php-src/branches/PHP_5_4/ext/intl/php_intl.c
A   
php/php-src/branches/PHP_5_4/ext/intl/tests/intl_icu_version_constant.phpt
U   php/php-src/trunk/ext/intl/php_intl.c
A   php/php-src/trunk/ext/intl/tests/intl_icu_version_constant.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-06-01 16:23:43 UTC (rev 311713)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-06-01 16:26:21 UTC (rev 311714)
@@ -90,6 +90,7 @@
 - intl extension:
   . Implemented FR #54540 (Allow loading of arbitrary resource bundles when
 fallback is disabled). (David Zuelke, Stas)
+  . Implemented FR #54561 (Expose ICU version info). (David Zuelke, Ilia)

 - json extension:
   . Fixed bug #54484 (Empty string in json_decode doesn't reset

Modified: php/php-src/branches/PHP_5_3/ext/intl/php_intl.c
===
--- php/php-src/branches/PHP_5_3/ext/intl/php_intl.c2011-06-01 16:23:43 UTC 
(rev 311713)
+++ php/php-src/branches/PHP_5_3/ext/intl/php_intl.c2011-06-01 16:26:21 UTC 
(rev 311714)
@@ -543,6 +543,10 @@
REGISTER_INI_ENTRIES();

REGISTER_LONG_CONSTANT(INTL_MAX_LOCALE_LEN, INTL_MAX_LOCALE_LEN, 
CONST_CS);
+   REGISTER_STRING_CONSTANT(INTL_ICU_VERSION, U_ICU_VERSION, 
CONST_PERSISTENT | CONST_CS);
+#ifdef U_ICU_DATA_VERSION
+   REGISTER_STRING_CONSTANT(INTL_ICU_DATA_VERSION, U_ICU_DATA_VERSION, 
CONST_PERSISTENT | CONST_CS);
+#endif

/* Register 'Collator' PHP class */
collator_register_Collator_class( TSRMLS_C );

Added: 
php/php-src/branches/PHP_5_3/ext/intl/tests/intl_icu_version_constant.phpt
===
--- php/php-src/branches/PHP_5_3/ext/intl/tests/intl_icu_version_constant.phpt  
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/intl/tests/intl_icu_version_constant.phpt  
2011-06-01 16:26:21 UTC (rev 311714)
@@ -0,0 +1,10 @@
+--TEST--
+INTL_ICU_VERSION constant
+--SKIPIF--
+?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?
+--FILE--
+?php
+var_dump(defined(INTL_ICU_VERSION));
+?
+--EXPECT--
+bool(true)

Modified: php/php-src/branches/PHP_5_4/ext/intl/php_intl.c
===
--- php/php-src/branches/PHP_5_4/ext/intl/php_intl.c2011-06-01 16:23:43 UTC 
(rev 311713)
+++ php/php-src/branches/PHP_5_4/ext/intl/php_intl.c2011-06-01 16:26:21 UTC 
(rev 311714)
@@ -590,6 +590,10 @@
REGISTER_INI_ENTRIES();

REGISTER_LONG_CONSTANT(INTL_MAX_LOCALE_LEN, INTL_MAX_LOCALE_LEN, 
CONST_CS);
+   REGISTER_STRING_CONSTANT(INTL_ICU_VERSION, U_ICU_VERSION, 
CONST_PERSISTENT | CONST_CS);
+#ifdef U_ICU_DATA_VERSION
+   REGISTER_STRING_CONSTANT(INTL_ICU_DATA_VERSION, U_ICU_DATA_VERSION, 
CONST_PERSISTENT | CONST_CS);
+#endif

/* Register 'Collator' PHP class */
collator_register_Collator_class( TSRMLS_C );

Added: 
php/php-src/branches/PHP_5_4/ext/intl/tests/intl_icu_version_constant.phpt
===
--- php/php-src/branches/PHP_5_4/ext/intl/tests/intl_icu_version_constant.phpt  
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/intl/tests/intl_icu_version_constant.phpt  
2011-06-01 16:26:21 UTC (rev 311714)
@@ -0,0 +1,10 @@
+--TEST--
+INTL_ICU_VERSION constant
+--SKIPIF--
+?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?
+--FILE--
+?php
+var_dump(defined(INTL_ICU_VERSION));
+?
+--EXPECT--
+bool(true)

Modified: php/php-src/trunk/ext/intl/php_intl.c
===
--- php/php-src/trunk/ext/intl/php_intl.c   2011-06-01 16:23:43 UTC (rev 
311713)
+++ php/php-src/trunk/ext/intl/php_intl.c   2011-06-01 16:26:21 UTC (rev 
311714)
@@ -590,6 +590,10 @@
REGISTER_INI_ENTRIES();

REGISTER_LONG_CONSTANT(INTL_MAX_LOCALE_LEN, INTL_MAX_LOCALE_LEN, 
CONST_CS);
+   REGISTER_STRING_CONSTANT(INTL_ICU_VERSION, U_ICU_VERSION, 
CONST_PERSISTENT | CONST_CS);
+#ifdef U_ICU_DATA_VERSION
+   REGISTER_STRING_CONSTANT(INTL_ICU_DATA_VERSION, U_ICU_DATA_VERSION, 
CONST_PERSISTENT | CONST_CS);
+#endif

/* Register 'Collator' PHP class */
collator_register_Collator_class( TSRMLS_C );

Added: php/php-src/trunk/ext/intl/tests/intl_icu_version_constant.phpt
===

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/intl/tests/intl_icu_data_version_constant.phpt branches/PHP_5_3/ext/intl/tests/resourcebundle_internal.phpt branches/PHP_5_4/ext/intl/tests/intl_icu_d

2011-06-01 Thread Ilia Alshanetsky
iliaaWed, 01 Jun 2011 16:59:23 +

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

Log:
More tests

Changed paths:
A   
php/php-src/branches/PHP_5_3/ext/intl/tests/intl_icu_data_version_constant.phpt
U   php/php-src/branches/PHP_5_3/ext/intl/tests/resourcebundle_internal.phpt
A   
php/php-src/branches/PHP_5_4/ext/intl/tests/intl_icu_data_version_constant.phpt
U   php/php-src/branches/PHP_5_4/ext/intl/tests/resourcebundle_internal.phpt
A   php/php-src/trunk/ext/intl/tests/intl_icu_data_version_constant.phpt
U   php/php-src/trunk/ext/intl/tests/resourcebundle_internal.phpt

Added: 
php/php-src/branches/PHP_5_3/ext/intl/tests/intl_icu_data_version_constant.phpt
===
--- 
php/php-src/branches/PHP_5_3/ext/intl/tests/intl_icu_data_version_constant.phpt 
(rev 0)
+++ 
php/php-src/branches/PHP_5_3/ext/intl/tests/intl_icu_data_version_constant.phpt 
2011-06-01 16:59:23 UTC (rev 311717)
@@ -0,0 +1,10 @@
+--TEST--
+INTL_ICU_DATA_VERSION constant
+--SKIPIF--
+?php if( !extension_loaded( 'intl' ) || version_compare('INTL_ICU_VERSION', 
'4.4', '') ) print 'skip'; ?
+--FILE--
+?php
+var_dump(defined(INTL_ICU_DATA_VERSION));
+?
+--EXPECT--
+bool(true)

Modified: 
php/php-src/branches/PHP_5_3/ext/intl/tests/resourcebundle_internal.phpt
===
--- php/php-src/branches/PHP_5_3/ext/intl/tests/resourcebundle_internal.phpt
2011-06-01 16:39:36 UTC (rev 311716)
+++ php/php-src/branches/PHP_5_3/ext/intl/tests/resourcebundle_internal.phpt
2011-06-01 16:59:23 UTC (rev 311717)
@@ -1,7 +1,7 @@
 --TEST--
 Test ResourceBundle::__construct() with internal ICU bundles
 --SKIPIF--
-?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?
+?php if( !extension_loaded( 'intl' ) || !defined('INTL_ICU_DATA_VERSION') || 
version_compare(INTL_ICU_DATA_VERSION, '4.4', '') ) print 'skip'; ?
 --FILE--
 ?php
 $b = new ResourceBundle('de_DE', 'ICUDATA-region');

Added: 
php/php-src/branches/PHP_5_4/ext/intl/tests/intl_icu_data_version_constant.phpt
===
--- 
php/php-src/branches/PHP_5_4/ext/intl/tests/intl_icu_data_version_constant.phpt 
(rev 0)
+++ 
php/php-src/branches/PHP_5_4/ext/intl/tests/intl_icu_data_version_constant.phpt 
2011-06-01 16:59:23 UTC (rev 311717)
@@ -0,0 +1,10 @@
+--TEST--
+INTL_ICU_DATA_VERSION constant
+--SKIPIF--
+?php if( !extension_loaded( 'intl' ) || version_compare('INTL_ICU_VERSION', 
'4.4', '') ) print 'skip'; ?
+--FILE--
+?php
+var_dump(defined(INTL_ICU_DATA_VERSION));
+?
+--EXPECT--
+bool(true)

Modified: 
php/php-src/branches/PHP_5_4/ext/intl/tests/resourcebundle_internal.phpt
===
--- php/php-src/branches/PHP_5_4/ext/intl/tests/resourcebundle_internal.phpt
2011-06-01 16:39:36 UTC (rev 311716)
+++ php/php-src/branches/PHP_5_4/ext/intl/tests/resourcebundle_internal.phpt
2011-06-01 16:59:23 UTC (rev 311717)
@@ -1,7 +1,7 @@
 --TEST--
 Test ResourceBundle::__construct() with internal ICU bundles
 --SKIPIF--
-?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?
+?php if( !extension_loaded( 'intl' ) || !defined('INTL_ICU_DATA_VERSION') || 
version_compare(INTL_ICU_DATA_VERSION, '4.4', '') ) print 'skip'; ?
 --FILE--
 ?php
 $b = new ResourceBundle('de_DE', 'ICUDATA-region');

Added: php/php-src/trunk/ext/intl/tests/intl_icu_data_version_constant.phpt
===
--- php/php-src/trunk/ext/intl/tests/intl_icu_data_version_constant.phpt
(rev 0)
+++ php/php-src/trunk/ext/intl/tests/intl_icu_data_version_constant.phpt
2011-06-01 16:59:23 UTC (rev 311717)
@@ -0,0 +1,10 @@
+--TEST--
+INTL_ICU_DATA_VERSION constant
+--SKIPIF--
+?php if( !extension_loaded( 'intl' ) || version_compare('INTL_ICU_VERSION', 
'4.4', '') ) print 'skip'; ?
+--FILE--
+?php
+var_dump(defined(INTL_ICU_DATA_VERSION));
+?
+--EXPECT--
+bool(true)

Modified: php/php-src/trunk/ext/intl/tests/resourcebundle_internal.phpt
===
--- php/php-src/trunk/ext/intl/tests/resourcebundle_internal.phpt   
2011-06-01 16:39:36 UTC (rev 311716)
+++ php/php-src/trunk/ext/intl/tests/resourcebundle_internal.phpt   
2011-06-01 16:59:23 UTC (rev 311717)
@@ -1,7 +1,7 @@
 --TEST--
 Test ResourceBundle::__construct() with internal ICU bundles
 --SKIPIF--
-?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?
+?php if( !extension_loaded( 'intl' ) || !defined('INTL_ICU_DATA_VERSION') || 
version_compare(INTL_ICU_DATA_VERSION, '4.4', '') ) print 'skip'; ?
 --FILE--
 ?php
 $b = new ResourceBundle('de_DE', 'ICUDATA-region');

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pdo/pdo_stmt.c branches/PHP_5_4/ext/pdo/pdo_stmt.c trunk/ext/pdo/pdo_stmt.c

2011-06-01 Thread Ilia Alshanetsky
Johannes,

As the bug report mentions the current behaviour is un-expected and
this change does not necessarily make the error fatal, since it'll
abide by the error emitting config the user specifies for PDO as
opposed to ignoring it..

2011/6/1 Johannes Schlüter johan...@schlueters.de:
 Hi,

 this might be a good thing for consistency and maybe reflect
 expectations more, but changing a warning to (possibly) an exception,
 which is fatal is a quite big change. Isn't it?

 johannes

 On Wed, 2011-06-01 at 13:23 +, Ilia Alshanetsky wrote:
 iliaa                                    Wed, 01 Jun 2011 13:23:25 +

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

 Log:
 Fixed bug #52104 (bindColumn creates Warning regardless of ATTR_ERRMODE 
 settings).

 Bug: http://bugs.php.net/52104 (Assigned) bindColumn creates Warning 
 regardless of ATTR_ERRMODE settings

 Changed paths:
     U   php/php-src/branches/PHP_5_3/NEWS
     U   php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c
     U   php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c
     U   php/php-src/trunk/ext/pdo/pdo_stmt.c

 Modified: php/php-src/branches/PHP_5_3/NEWS
 ===
 --- php/php-src/branches/PHP_5_3/NEWS 2011-06-01 12:53:07 UTC (rev 311710)
 +++ php/php-src/branches/PHP_5_3/NEWS 2011-06-01 13:23:25 UTC (rev 311711)
 @@ -115,6 +115,10 @@
      set mysqlnd.net_cmd_buffer_size to at least 9000. (Andrey)
    . Fixed bug #54674 mysqlnd valid_sjis_(head|tail) is using invalid 
 operator
      and range). (nihen at megabbs dot com, Andrey)
 +
 +- PDO extension:
 +  . Fixed bug #52104 (bindColumn creates Warning regardless of ATTR_ERRMODE
 +    settings). (Ilia)

  - PDO DBlib driver:
    . Fixed bug #54167 (PDO_DBLIB returns null on SQLUNIQUE field).

 Modified: php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c
 ===
 --- php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c   2011-06-01 12:53:07 
 UTC (rev 311710)
 +++ php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c   2011-06-01 13:23:25 
 UTC (rev 311711)
 @@ -349,7 +349,10 @@
               /* if you prepare and then execute passing an array of params 
 keyed by names,
                * then this will trigger, and we don't want that */
               if (param-paramno == -1) {
 -                     php_error_docref(NULL TSRMLS_CC, E_WARNING, Did not 
 found column name '%s' in the defined columns; it will not be bound, 
 param-name);
 +                     char *tmp;
 +                     spprintf(tmp, 0, Did not find column name '%s' in 
 the defined columns; it will not be bound, param-name);
 +                     pdo_raise_impl_error(stmt-dbh, stmt, HY000, tmp 
 TSRMLS_CC);
 +                     efree(tmp);
               }
       }


 Modified: php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c
 ===
 --- php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c   2011-06-01 12:53:07 
 UTC (rev 311710)
 +++ php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c   2011-06-01 13:23:25 
 UTC (rev 311711)
 @@ -349,7 +349,10 @@
               /* if you prepare and then execute passing an array of params 
 keyed by names,
                * then this will trigger, and we don't want that */
               if (param-paramno == -1) {
 -                     php_error_docref(NULL TSRMLS_CC, E_WARNING, Did not 
 found column name '%s' in the defined columns; it will not be bound, 
 param-name);
 +                     char *tmp;
 +                     spprintf(tmp, 0, Did not find column name '%s' in 
 the defined columns; it will not be bound, param-name);
 +                     pdo_raise_impl_error(stmt-dbh, stmt, HY000, tmp 
 TSRMLS_CC);
 +                     efree(tmp);
               }
       }


 Modified: php/php-src/trunk/ext/pdo/pdo_stmt.c
 ===
 --- php/php-src/trunk/ext/pdo/pdo_stmt.c      2011-06-01 12:53:07 UTC (rev 
 311710)
 +++ php/php-src/trunk/ext/pdo/pdo_stmt.c      2011-06-01 13:23:25 UTC (rev 
 311711)
 @@ -349,7 +349,10 @@
               /* if you prepare and then execute passing an array of params 
 keyed by names,
                * then this will trigger, and we don't want that */
               if (param-paramno == -1) {
 -                     php_error_docref(NULL TSRMLS_CC, E_WARNING, Did not 
 found column name '%s' in the defined columns; it will not be bound, 
 param-name);
 +                     char *tmp;
 +                     spprintf(tmp, 0, Did not find column name '%s' in 
 the defined columns; it will not be bound, param-name);
 +                     pdo_raise_impl_error(stmt-dbh, stmt, HY000, tmp 
 TSRMLS_CC);
 +                     efree(tmp);
               }
       }


 --
 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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_pgsql/pdo_pgsql.c branches/PHP_5_3/ext/pdo_pgsql/php_pdo_pgsql.h branches/PHP_5_4/ext/pdo_pgsql/pdo_pgsql.c branches/PHP_5_4/ext/pdo_pgsql/php_pdo

2011-05-31 Thread Ilia Alshanetsky
iliaaTue, 31 May 2011 08:59:32 +

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

Log:
Removed unnecessary rinit/rshutdown

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pdo_pgsql.c
U   php/php-src/branches/PHP_5_3/ext/pdo_pgsql/php_pdo_pgsql.h
U   php/php-src/branches/PHP_5_4/ext/pdo_pgsql/pdo_pgsql.c
U   php/php-src/branches/PHP_5_4/ext/pdo_pgsql/php_pdo_pgsql.h
U   php/php-src/trunk/ext/pdo_pgsql/pdo_pgsql.c
U   php/php-src/trunk/ext/pdo_pgsql/php_pdo_pgsql.h

Modified: php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pdo_pgsql.c
===
--- php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pdo_pgsql.c  2011-05-31 
08:58:28 UTC (rev 311630)
+++ php/php-src/branches/PHP_5_3/ext/pdo_pgsql/pdo_pgsql.c  2011-05-31 
08:59:32 UTC (rev 311631)
@@ -67,8 +67,8 @@
pdo_pgsql_functions,
PHP_MINIT(pdo_pgsql),
PHP_MSHUTDOWN(pdo_pgsql),
-   PHP_RINIT(pdo_pgsql),
-   PHP_RSHUTDOWN(pdo_pgsql),
+   NULL,
+   NULL,
PHP_MINFO(pdo_pgsql),
1.0.2,
STANDARD_MODULE_PROPERTIES
@@ -106,24 +106,6 @@
 }
 /* }}} */

-/* {{{ PHP_RINIT_FUNCTION
- */
-PHP_RINIT_FUNCTION(pdo_pgsql)
-{
-   /*  php_pdo_register_driver(pdo_pgsql_driver); */
-   return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_MSHUTDOWN_FUNCTION
- */
-PHP_RSHUTDOWN_FUNCTION(pdo_pgsql)
-{
-   /*  php_pdo_unregister_driver(pdo_pgsql_driver); */
-   return SUCCESS;
-}
-/* }}} */
-
 /* {{{ PHP_MINFO_FUNCTION
  */
 PHP_MINFO_FUNCTION(pdo_pgsql)

Modified: php/php-src/branches/PHP_5_3/ext/pdo_pgsql/php_pdo_pgsql.h
===
--- php/php-src/branches/PHP_5_3/ext/pdo_pgsql/php_pdo_pgsql.h  2011-05-31 
08:58:28 UTC (rev 311630)
+++ php/php-src/branches/PHP_5_3/ext/pdo_pgsql/php_pdo_pgsql.h  2011-05-31 
08:59:32 UTC (rev 311631)
@@ -32,8 +32,6 @@

 PHP_MINIT_FUNCTION(pdo_pgsql);
 PHP_MSHUTDOWN_FUNCTION(pdo_pgsql);
-PHP_RINIT_FUNCTION(pdo_pgsql);
-PHP_RSHUTDOWN_FUNCTION(pdo_pgsql);
 PHP_MINFO_FUNCTION(pdo_pgsql);

 #endif /* PHP_PDO_PGSQL_H */

Modified: php/php-src/branches/PHP_5_4/ext/pdo_pgsql/pdo_pgsql.c
===
--- php/php-src/branches/PHP_5_4/ext/pdo_pgsql/pdo_pgsql.c  2011-05-31 
08:58:28 UTC (rev 311630)
+++ php/php-src/branches/PHP_5_4/ext/pdo_pgsql/pdo_pgsql.c  2011-05-31 
08:59:32 UTC (rev 311631)
@@ -67,8 +67,8 @@
pdo_pgsql_functions,
PHP_MINIT(pdo_pgsql),
PHP_MSHUTDOWN(pdo_pgsql),
-   PHP_RINIT(pdo_pgsql),
-   PHP_RSHUTDOWN(pdo_pgsql),
+   NULL,
+   NULL,
PHP_MINFO(pdo_pgsql),
1.0.2,
STANDARD_MODULE_PROPERTIES
@@ -106,24 +106,6 @@
 }
 /* }}} */

-/* {{{ PHP_RINIT_FUNCTION
- */
-PHP_RINIT_FUNCTION(pdo_pgsql)
-{
-   /*  php_pdo_register_driver(pdo_pgsql_driver); */
-   return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_MSHUTDOWN_FUNCTION
- */
-PHP_RSHUTDOWN_FUNCTION(pdo_pgsql)
-{
-   /*  php_pdo_unregister_driver(pdo_pgsql_driver); */
-   return SUCCESS;
-}
-/* }}} */
-
 /* {{{ PHP_MINFO_FUNCTION
  */
 PHP_MINFO_FUNCTION(pdo_pgsql)

Modified: php/php-src/branches/PHP_5_4/ext/pdo_pgsql/php_pdo_pgsql.h
===
--- php/php-src/branches/PHP_5_4/ext/pdo_pgsql/php_pdo_pgsql.h  2011-05-31 
08:58:28 UTC (rev 311630)
+++ php/php-src/branches/PHP_5_4/ext/pdo_pgsql/php_pdo_pgsql.h  2011-05-31 
08:59:32 UTC (rev 311631)
@@ -32,8 +32,6 @@

 PHP_MINIT_FUNCTION(pdo_pgsql);
 PHP_MSHUTDOWN_FUNCTION(pdo_pgsql);
-PHP_RINIT_FUNCTION(pdo_pgsql);
-PHP_RSHUTDOWN_FUNCTION(pdo_pgsql);
 PHP_MINFO_FUNCTION(pdo_pgsql);

 #endif /* PHP_PDO_PGSQL_H */

Modified: php/php-src/trunk/ext/pdo_pgsql/pdo_pgsql.c
===
--- php/php-src/trunk/ext/pdo_pgsql/pdo_pgsql.c 2011-05-31 08:58:28 UTC (rev 
311630)
+++ php/php-src/trunk/ext/pdo_pgsql/pdo_pgsql.c 2011-05-31 08:59:32 UTC (rev 
311631)
@@ -67,8 +67,8 @@
pdo_pgsql_functions,
PHP_MINIT(pdo_pgsql),
PHP_MSHUTDOWN(pdo_pgsql),
-   PHP_RINIT(pdo_pgsql),
-   PHP_RSHUTDOWN(pdo_pgsql),
+   NULL,
+   NULL,
PHP_MINFO(pdo_pgsql),
1.0.2,
STANDARD_MODULE_PROPERTIES
@@ -106,24 +106,6 @@
 }
 /* }}} */

-/* {{{ PHP_RINIT_FUNCTION
- */
-PHP_RINIT_FUNCTION(pdo_pgsql)
-{
-   /*  php_pdo_register_driver(pdo_pgsql_driver); */
-   return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_MSHUTDOWN_FUNCTION
- */
-PHP_RSHUTDOWN_FUNCTION(pdo_pgsql)
-{
-   /*  php_pdo_unregister_driver(pdo_pgsql_driver); */
-   return SUCCESS;
-}
-/* }}} */
-
 /* {{{ PHP_MINFO_FUNCTION
  */
 PHP_MINFO_FUNCTION(pdo_pgsql)

Modified: php/php-src/trunk/ext/pdo_pgsql/php_pdo_pgsql.h
===
--- 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/ is_in_transaction.phpt

2011-05-31 Thread Ilia Alshanetsky
iliaaTue, 31 May 2011 09:01:44 +

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

Log:
Removed test for functionality available in 5.4+

Changed paths:
D   php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/is_in_transaction.phpt

Deleted: php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/is_in_transaction.phpt
===
--- php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/is_in_transaction.phpt 
2011-05-31 08:59:32 UTC (rev 311631)
+++ php/php-src/branches/PHP_5_3/ext/pdo_pgsql/tests/is_in_transaction.phpt 
2011-05-31 09:01:44 UTC (rev 311632)
@@ -1,66 +0,0 @@
---TEST--
-PDO PgSQL isInTransaction
---SKIPIF--
-?php # vim:se ft=php:
-if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not 
loaded');
-require dirname(__FILE__) . '/config.inc';
-require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
-PDOTest::skip();
-?
---FILE--
-?php
-require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
-$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
-$db-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
-$db-setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
-
-$db-exec('CREATE TABLE test (a integer not null primary key, b text)');
-
-$db-beginTransaction();
-try {
-echo Test PDO::PGSQL_TRANSACTION_INTRANS\n;
-var_dump($db-inTransaction());
-
-$stmt = $db-prepare(INSERT INTO test (a, b) values (?, ?));
-$stmt-bindValue(1, 1);
-$stmt-bindValue(2, test insert);
-$stmt-execute();
-
-$db-commit();
-
-echo Test PDO::PGSQL_TRANSACTION_IDLE\n;
-var_dump($db-inTransaction());
-
-$db-beginTransaction();
-
-try {
-$stmt = $db-prepare(INSERT INTO test (a, b) values (?, ?));
-$stmt-bindValue(1, error);
-$stmt-bindValue(2, test insert);
-$stmt-execute();
-} catch (Exception $e) {
-   /* We catch the exception because the execute will give error and we 
must test the PDO::PGSQL_TRANSACTION_ERROR */
-   echo Test PDO::PGSQL_TRANSACTION_INERROR\n;
-   var_dump($db-inTransaction());
-   $db-rollBack();
-}
-
-echo Test PDO::PGSQL_TRANSACTION_IDLE\n;
-var_dump($db-inTransaction());
-
-} catch (Exception $e) {
-   /* catch exceptions so that we can show the relative error */
-   echo Exception! at line , $e-getLine(), \n;
-   var_dump($e-getMessage());
-}
-
-?
---EXPECT--
-Test PDO::PGSQL_TRANSACTION_INTRANS
-int(2)
-Test PDO::PGSQL_TRANSACTION_IDLE
-int(0)
-Test PDO::PGSQL_TRANSACTION_INERROR
-int(3)
-Test PDO::PGSQL_TRANSACTION_IDLE
-int(0)

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug54910.phpt branches/PHP_5_3/Zend/zend_API.c trunk/Zend/tests/bug54910.phpt trunk/Zend/zend_API.c

2011-05-31 Thread Ilia Alshanetsky
Please merge into 5.4 branch as well.

Thanks

On Tue, May 31, 2011 at 11:20 AM, Dmitry Stogov dmi...@php.net wrote:
 dmitry                                   Tue, 31 May 2011 09:20:51 +

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

 Log:
 Fixed bug #54910 (Crash when calling call_user_func with unknown function 
 name)

 Bug: http://bugs.php.net/54910 (Assigned) Crash when calling call_user_func 
 with unknown function name

 Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    A   php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt
    U   php/php-src/branches/PHP_5_3/Zend/zend_API.c
    A   php/php-src/trunk/Zend/tests/bug54910.phpt
    U   php/php-src/trunk/Zend/zend_API.c

 Modified: php/php-src/branches/PHP_5_3/NEWS
 ===
 --- php/php-src/branches/PHP_5_3/NEWS   2011-05-31 09:18:23 UTC (rev 311634)
 +++ php/php-src/branches/PHP_5_3/NEWS   2011-05-31 09:20:51 UTC (rev 311635)
 @@ -6,6 +6,8 @@
  - Increased the backtrack limit from 10 to 100 (Rasmus)

  - Zend Engine:
 +  . Fixed bug #54910 (Crash when calling call_user_func with unknown function
 +    name). (Dmitry)
   . Fixed bug #54804 (__halt_compiler and imported namespaces).
     (Pierrick, Felipe)
   . Fixed bug #54585 (track_errors causes segfault). (Dmitry)

 Added: php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt
 ===
 --- php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt                     
           (rev 0)
 +++ php/php-src/branches/PHP_5_3/Zend/tests/bug54910.phpt       2011-05-31 
 09:20:51 UTC (rev 311635)
 @@ -0,0 +1,28 @@
 +--TEST--
 +Bug #54910 (Crash when calling call_user_func with unknown function name)
 +--FILE--
 +?php
 +class A {
 +    public function __call($method, $args) {
 +        if (stripos($method, 'get') === 0) {
 +            return $this-get();
 +        }
 +        die(No such method - '$method'\n);
 +    }
 +
 +    protected function get() {
 +        $class = get_class($this);
 +        $call = array($class, 'noSuchMethod');
 +
 +        if (is_callable($call)) {
 +            call_user_func($call);
 +        }
 +    }
 +}
 +
 +class B extends A {}
 +
 +$input = new B();
 +echo $input-getEmail();
 +--EXPECT--
 +No such method - 'noSuchMethod'

 Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c
 ===
 --- php/php-src/branches/PHP_5_3/Zend/zend_API.c        2011-05-31 09:18:23 
 UTC (rev 311634)
 +++ php/php-src/branches/PHP_5_3/Zend/zend_API.c        2011-05-31 09:20:51 
 UTC (rev 311635)
 @@ -2590,6 +2590,11 @@
                        if (fcc-function_handler) {
                                retval = 1;
                                call_via_handler = 
 (fcc-function_handler-common.fn_flags  ZEND_ACC_CALL_VIA_HANDLER) != 0;
 +                               if (call_via_handler  !fcc-object_ptr  
 EG(This) 
 +                                   Z_OBJ_HT_P(EG(This))-get_class_entry 
 +                                   instanceof_function(Z_OBJCE_P(EG(This)), 
 fcc-calling_scope TSRMLS_CC)) {
 +                                       fcc-object_ptr = EG(This);
 +                               }
                        }
                }
        }

 Added: php/php-src/trunk/Zend/tests/bug54910.phpt
 ===
 --- php/php-src/trunk/Zend/tests/bug54910.phpt                          (rev 
 0)
 +++ php/php-src/trunk/Zend/tests/bug54910.phpt  2011-05-31 09:20:51 UTC (rev 
 311635)
 @@ -0,0 +1,28 @@
 +--TEST--
 +Bug #54910 (Crash when calling call_user_func with unknown function name)
 +--FILE--
 +?php
 +class A {
 +    public function __call($method, $args) {
 +        if (stripos($method, 'get') === 0) {
 +            return $this-get();
 +        }
 +        die(No such method - '$method'\n);
 +    }
 +
 +    protected function get() {
 +        $class = get_class($this);
 +        $call = array($class, 'noSuchMethod');
 +
 +        if (is_callable($call)) {
 +            call_user_func($call);
 +        }
 +    }
 +}
 +
 +class B extends A {}
 +
 +$input = new B();
 +echo $input-getEmail();
 +--EXPECT--
 +No such method - 'noSuchMethod'

 Modified: php/php-src/trunk/Zend/zend_API.c
 ===
 --- php/php-src/trunk/Zend/zend_API.c   2011-05-31 09:18:23 UTC (rev 311634)
 +++ php/php-src/trunk/Zend/zend_API.c   2011-05-31 09:20:51 UTC (rev 311635)
 @@ -2773,6 +2773,11 @@
                        if (fcc-function_handler) {
                                retval = 1;
                                call_via_handler = 
 (fcc-function_handler-common.fn_flags  ZEND_ACC_CALL_VIA_HANDLER) != 0;
 +                               if (call_via_handler  !fcc-object_ptr  
 EG(This) 
 +                                   Z_OBJ_HT_P(EG(This))-get_class_entry 
 +            

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/sapi/cli/php_cli.c branches/PHP_5_4/sapi/cli/php_cli.c trunk/sapi/cli/php_cli.c

2011-05-30 Thread Ilia Alshanetsky
iliaaMon, 30 May 2011 15:57:50 +

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

Log:
Fixed bug #52496 (Zero exit code on option parsing failure).

Bug: http://bugs.php.net/52496 (Open) Zero exit code on option parsing failure
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c
U   php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c
U   php/php-src/trunk/sapi/cli/php_cli.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-05-30 15:55:32 UTC (rev 311599)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-05-30 15:57:50 UTC (rev 311600)
@@ -54,6 +54,9 @@
   . Fixed bug #54529 (SAPI crashes on apache_config.c:197).
 (hebergement at riastudio dot fr)

+- CLI SAPI:
+  . Fixed bug #52496 (Zero exit code on option parsing failure). (Ilia)
+
 - cURL:
   . Added CURLINFO_REDIRECT_URL support. (Daniel Stenberg, Pierre)
   . Added support for CURLOPT_MAX_RECV_SPEED_LARGE and

Modified: php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c
===
--- php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c 2011-05-30 15:55:32 UTC 
(rev 311599)
+++ php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c 2011-05-30 15:57:50 UTC 
(rev 311600)
@@ -799,7 +799,7 @@
request_started = 1;
php_cli_usage(argv[0]);
php_end_ob_buffers(1 TSRMLS_CC);
-   exit_status=0;
+   exit_status = (c == '?'  argc  1  
!strchr(argv[1],  c));
goto out;

case 'i': /* php info  quit */

Modified: php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c
===
--- php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c 2011-05-30 15:55:32 UTC 
(rev 311599)
+++ php/php-src/branches/PHP_5_4/sapi/cli/php_cli.c 2011-05-30 15:57:50 UTC 
(rev 311600)
@@ -813,7 +813,7 @@
request_started = 1;
php_cli_usage(argv[0]);
php_output_end_all(TSRMLS_C);
-   exit_status=0;
+   exit_status = (c == '?'  argc  1  
!strchr(argv[1],  c));
goto out;

case 'i': /* php info  quit */

Modified: php/php-src/trunk/sapi/cli/php_cli.c
===
--- php/php-src/trunk/sapi/cli/php_cli.c2011-05-30 15:55:32 UTC (rev 
311599)
+++ php/php-src/trunk/sapi/cli/php_cli.c2011-05-30 15:57:50 UTC (rev 
311600)
@@ -813,7 +813,7 @@
request_started = 1;
php_cli_usage(argv[0]);
php_output_end_all(TSRMLS_C);
-   exit_status=0;
+   exit_status = (c == '?'  argc  1  
!strchr(argv[1],  c));
goto out;

case 'i': /* php info  quit */

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/http_fopen_wrapper.c branches/PHP_5_4/ext/standard/http_fopen_wrapper.c trunk/ext/standard/http_fopen_wrapper.c

2011-05-29 Thread Ilia Alshanetsky
iliaaSun, 29 May 2011 09:23:08 +

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

Log:
Fixed bug #54137 (file_get_contents POST request sends additional line break).

Bug: http://bugs.php.net/54137 (Open) file_get_contents POST request sends 
additional line breaks
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c
U   php/php-src/branches/PHP_5_4/ext/standard/http_fopen_wrapper.c
U   php/php-src/trunk/ext/standard/http_fopen_wrapper.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-05-29 07:35:10 UTC (rev 311541)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-05-29 09:23:08 UTC (rev 311542)
@@ -28,6 +28,7 @@
   . Fixed a crash inside dtor for error handling. (Ilia)

   . Fixed bug #54935 php_win_err can lead to crash. (Pierre)
+  . Fixed bug #54924 (assert.* is not being reset upon request shutdown). 
(Ilia)
   . Fixed bug #54895 (Fix compiling with older gcc version without need for
 membar_producer macro). (mhei at heimpold dot de)
   . Fixed bug #54723 (getimagesize() doesn't check the full ico signature).
@@ -38,6 +39,8 @@
 (CVE-2011-1148)
   . Fixed bug #54180 (parse_url() incorrectly parses path when ? in fragment).
 (tomas dot brastavicius at quantum dot lt, Pierrick)
+  . Fixed bug #54137 (file_get_contents POST request sends additional line 
break).
+(maurice-php at mertinkat dot net, Ilia)
   . Fixed bug #54866 (incorrect accounting for realpath_cache_size) (Dustin 
Ward)
   . Fixed bug #54721 (Different Hashes on Windows, BSD and Linux on wrong Salt 
size)
 (Pierre, os at irj dot ru)

Modified: php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c  
2011-05-29 07:35:10 UTC (rev 311541)
+++ php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c  
2011-05-29 09:23:08 UTC (rev 311542)
@@ -631,7 +631,6 @@
}
php_stream_write(stream, \r\n, sizeof(\r\n)-1);
php_stream_write(stream, Z_STRVAL_PP(tmpzval), 
Z_STRLEN_PP(tmpzval));
-   php_stream_write(stream, \r\n\r\n, sizeof(\r\n\r\n)-1);
} else {
php_stream_write(stream, \r\n, sizeof(\r\n)-1);
}

Modified: php/php-src/branches/PHP_5_4/ext/standard/http_fopen_wrapper.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/http_fopen_wrapper.c  
2011-05-29 07:35:10 UTC (rev 311541)
+++ php/php-src/branches/PHP_5_4/ext/standard/http_fopen_wrapper.c  
2011-05-29 09:23:08 UTC (rev 311542)
@@ -628,7 +628,6 @@
}
php_stream_write(stream, \r\n, sizeof(\r\n)-1);
php_stream_write(stream, Z_STRVAL_PP(tmpzval), 
Z_STRLEN_PP(tmpzval));
-   php_stream_write(stream, \r\n\r\n, sizeof(\r\n\r\n)-1);
} else {
php_stream_write(stream, \r\n, sizeof(\r\n)-1);
}

Modified: php/php-src/trunk/ext/standard/http_fopen_wrapper.c
===
--- php/php-src/trunk/ext/standard/http_fopen_wrapper.c 2011-05-29 07:35:10 UTC 
(rev 311541)
+++ php/php-src/trunk/ext/standard/http_fopen_wrapper.c 2011-05-29 09:23:08 UTC 
(rev 311542)
@@ -628,7 +628,6 @@
}
php_stream_write(stream, \r\n, sizeof(\r\n)-1);
php_stream_write(stream, Z_STRVAL_PP(tmpzval), 
Z_STRLEN_PP(tmpzval));
-   php_stream_write(stream, \r\n\r\n, sizeof(\r\n\r\n)-1);
} else {
php_stream_write(stream, \r\n, sizeof(\r\n)-1);
}

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/file.c branches/PHP_5_3/ext/standard/tests/file/bug53848.phpt branches/PHP_5_4/ext/standard/file.c branches/PHP_5_4/ext

2011-05-29 Thread Ilia Alshanetsky
iliaaSun, 29 May 2011 10:23:06 +

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

Log:
Fixed bug #53848 (fgetcsv() ignores spaces at beginnings of fields).

Bug: http://bugs.php.net/53848 (Closed) fgetcsv ignores spaces at beginnings of 
fields
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/standard/file.c
A   php/php-src/branches/PHP_5_3/ext/standard/tests/file/bug53848.phpt
U   php/php-src/branches/PHP_5_4/ext/standard/file.c
A   php/php-src/branches/PHP_5_4/ext/standard/tests/file/bug53848.phpt
U   php/php-src/trunk/ext/standard/file.c
A   php/php-src/trunk/ext/standard/tests/file/bug53848.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-05-29 09:23:08 UTC (rev 311542)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-05-29 10:23:06 UTC (rev 311543)
@@ -44,6 +44,7 @@
   . Fixed bug #54866 (incorrect accounting for realpath_cache_size) (Dustin 
Ward)
   . Fixed bug #54721 (Different Hashes on Windows, BSD and Linux on wrong Salt 
size)
 (Pierre, os at irj dot ru)
+  . Fixed bug #53848 (fgetcsv() ignores spaces at beginnings of fields). (Ilia)
   . Fixed bug #50363 (Invalid parsing in convert.quoted-printable-decode 
filter).
 (slusarz at curecanti dot org)
   . Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using

Modified: php/php-src/branches/PHP_5_3/ext/standard/file.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/file.c2011-05-29 09:23:08 UTC 
(rev 311542)
+++ php/php-src/branches/PHP_5_3/ext/standard/file.c2011-05-29 10:23:06 UTC 
(rev 311543)
@@ -2196,30 +2196,17 @@
char *comp_end, *hunk_begin;

tptr = temp;
-
-   /* 1. Strip any leading space */
-   for (;;) {
-   inc_len = (bptr  limit ? (*bptr == '\0' ? 1: 
php_mblen(bptr, limit - bptr)): 0);
-   switch (inc_len) {
-   case -2:
-   case -1:
-   inc_len = 1;
-   php_mblen(NULL, 0);
-   break;
-   case 0:
-   goto quit_loop_1;
-   case 1:
-   if (!isspace((int)*(unsigned char 
*)bptr) || *bptr == delimiter) {
-   goto quit_loop_1;
-   }
-   break;
-   default:
-   goto quit_loop_1;
+   inc_len = (bptr  limit ? (*bptr == '\0' ? 1: php_mblen(bptr, 
limit - bptr)): 0);
+   if (inc_len == 1) {
+   char *tmp = bptr;
+   while (isspace((int)*(unsigned char *)tmp)) {
+   tmp++;
}
-   bptr += inc_len;
+   if (*tmp == enclosure) {
+   bptr = tmp;
+   }
}

-   quit_loop_1:
if (first_field  bptr == line_end) {
add_next_index_null(return_value);
break;

Added: php/php-src/branches/PHP_5_3/ext/standard/tests/file/bug53848.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/file/bug53848.phpt  
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/bug53848.phpt  
2011-05-29 10:23:06 UTC (rev 311543)
@@ -0,0 +1,25 @@
+--TEST--
+Bug #53848 (fgetcsv removes leading spaces from fields)
+--FILE--
+?php
+$file = dirname(__FILE__) . /bug39538.csv;
+@unlink($file);
+file_put_contents($file, a,b\n  c,  d);
+$fp = fopen($file, r);
+while ($l = fgetcsv($fp)) var_dump($l);
+fclose($fp);
+@unlink($file);
+?
+--EXPECT--
+array(2) {
+  [0]=
+  string(1) a
+  [1]=
+  string(1) b
+}
+array(2) {
+  [0]=
+  string(3)   c
+  [1]=
+  string(3)   d
+}

Modified: php/php-src/branches/PHP_5_4/ext/standard/file.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/file.c2011-05-29 09:23:08 UTC 
(rev 311542)
+++ php/php-src/branches/PHP_5_4/ext/standard/file.c2011-05-29 10:23:06 UTC 
(rev 311543)
@@ -2098,29 +2098,17 @@

tptr = temp;

-   /* 1. Strip any leading space */
-   for (;;) {
-   inc_len = (bptr  limit ? (*bptr == '\0' ? 1: 
php_mblen(bptr, limit - bptr)): 0);
-   switch (inc_len) {
-   case -2:
- 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/assert.c branches/PHP_5_4/ext/standard/assert.c trunk/ext/standard/assert.c

2011-05-26 Thread Ilia Alshanetsky
iliaaThu, 26 May 2011 18:17:43 +

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

Log:
Fixed bug #54924 (assert.* is not being reset upon request shutdown).

Bug: http://bugs.php.net/54924 (Open) assert.active is not being reset upon 
request shutdown
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/assert.c
U   php/php-src/branches/PHP_5_4/ext/standard/assert.c
U   php/php-src/trunk/ext/standard/assert.c

Modified: php/php-src/branches/PHP_5_3/ext/standard/assert.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/assert.c  2011-05-26 16:38:39 UTC 
(rev 311450)
+++ php/php-src/branches/PHP_5_3/ext/standard/assert.c  2011-05-26 18:17:43 UTC 
(rev 311451)
@@ -253,8 +253,8 @@
case ASSERT_ACTIVE:
oldint = ASSERTG(active);
if (ac == 2) {
-   convert_to_long_ex(value);
-   ASSERTG(active) = Z_LVAL_PP(value);
+   convert_to_string_ex(value);
+   zend_alter_ini_entry_ex(assert.active, 
sizeof(assert.active), Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, 
PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -262,8 +262,8 @@
case ASSERT_BAIL:
oldint = ASSERTG(bail);
if (ac == 2) {
-   convert_to_long_ex(value);
-   ASSERTG(bail) = Z_LVAL_PP(value);
+   convert_to_string_ex(value);
+   zend_alter_ini_entry_ex(assert.bail, 
sizeof(assert.bail), Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, 
PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -271,8 +271,8 @@
case ASSERT_QUIET_EVAL:
oldint = ASSERTG(quiet_eval);
if (ac == 2) {
-   convert_to_long_ex(value);
-   ASSERTG(quiet_eval) = Z_LVAL_PP(value);
+   convert_to_string_ex(value);
+   zend_alter_ini_entry_ex(assert.quiet_eval, 
sizeof(assert.quiet_eval), Z_STRVAL_PP(value), Z_STRLEN_PP(value), 
PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -280,8 +280,8 @@
case ASSERT_WARNING:
oldint = ASSERTG(warning);
if (ac == 2) {
-   convert_to_long_ex(value);
-   ASSERTG(warning) = Z_LVAL_PP(value);
+   convert_to_string_ex(value);
+   zend_alter_ini_entry_ex(assert.warning, 
sizeof(assert.warning), Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, 
PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;

Modified: php/php-src/branches/PHP_5_4/ext/standard/assert.c
===
--- php/php-src/branches/PHP_5_4/ext/standard/assert.c  2011-05-26 16:38:39 UTC 
(rev 311450)
+++ php/php-src/branches/PHP_5_4/ext/standard/assert.c  2011-05-26 18:17:43 UTC 
(rev 311451)
@@ -253,8 +253,8 @@
case ASSERT_ACTIVE:
oldint = ASSERTG(active);
if (ac == 2) {
-   convert_to_long_ex(value);
-   ASSERTG(active) = Z_LVAL_PP(value);
+   convert_to_string_ex(value);
+   zend_alter_ini_entry_ex(assert.active, 
sizeof(assert.active), Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, 
PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -262,8 +262,8 @@
case ASSERT_BAIL:
oldint = ASSERTG(bail);
if (ac == 2) {
-   convert_to_long_ex(value);
-   ASSERTG(bail) = Z_LVAL_PP(value);
+   convert_to_string_ex(value);
+   zend_alter_ini_entry_ex(assert.bail, 
sizeof(assert.bail), Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, 
PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -271,8 +271,8 @@
case ASSERT_QUIET_EVAL:
oldint = ASSERTG(quiet_eval);
if (ac == 2) {
-   convert_to_long_ex(value);
-   ASSERTG(quiet_eval) = Z_LVAL_PP(value);
+   convert_to_string_ex(value);
+   zend_alter_ini_entry_ex(assert.quiet_eval, 
sizeof(assert.quiet_eval), Z_STRVAL_PP(value), Z_STRLEN_PP(value), 
PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -280,8 +280,8 @@
case 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/filter.c branches/PHP_5_3/ext/filter/tests/054.phpt trunk/ext/filter/filter.c trunk/ext/filter/tests/054.phpt

2011-04-28 Thread Ilia Alshanetsky
iliaaThu, 28 Apr 2011 12:32:47 +

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

Log:
#doc
Added 3rd parameter to filter_var_array() and filter_input_array()
functions that allows disabling addition of empty elements

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/filter/filter.c
A   php/php-src/branches/PHP_5_3/ext/filter/tests/054.phpt
U   php/php-src/trunk/ext/filter/filter.c
A   php/php-src/trunk/ext/filter/tests/054.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-04-28 11:13:55 UTC (rev 310621)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-04-28 12:32:47 UTC (rev 310622)
@@ -42,6 +42,8 @@
   . Fixed bug #54121 (error message format string typo). (Ilia)

 - Filter extension:
+  . Added 3rd parameter to filter_var_array() and filter_input_array()
+functions that allows disabling addition of empty elements. (Ilia)
   . Fixed bug #53037 (FILTER_FLAG_EMPTY_STRING_NULL is not implemented). (Ilia)

 - intl extension:

Modified: php/php-src/branches/PHP_5_3/ext/filter/filter.c
===
--- php/php-src/branches/PHP_5_3/ext/filter/filter.c2011-04-28 11:13:55 UTC 
(rev 310621)
+++ php/php-src/branches/PHP_5_3/ext/filter/filter.c2011-04-28 12:32:47 UTC 
(rev 310622)
@@ -96,11 +96,13 @@
 ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_input_array, 0, 0, 1)
ZEND_ARG_INFO(0, type)
ZEND_ARG_INFO(0, definition)
+   ZEND_ARG_INFO(0, add_empty)
 ZEND_END_ARG_INFO()

 ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_var_array, 0, 0, 1)
ZEND_ARG_INFO(0, data)
ZEND_ARG_INFO(0, definition)
+   ZEND_ARG_INFO(0, add_empty)
 ZEND_END_ARG_INFO()

 ZEND_BEGIN_ARG_INFO(arginfo_filter_list, 0)
@@ -689,7 +691,7 @@
 }
 /* }}} */

-static void php_filter_array_handler(zval *input, zval **op, zval 
*return_value TSRMLS_DC) /* {{{ */
+static void php_filter_array_handler(zval *input, zval **op, zval 
*return_value, zend_bool add_empty TSRMLS_DC) /* {{{ */
 {
char *arg_key;
uint arg_key_len;
@@ -724,7 +726,9 @@
RETURN_FALSE;
}
if (zend_hash_find(Z_ARRVAL_P(input), arg_key, 
arg_key_len, (void **)tmp) != SUCCESS) {
-   add_assoc_null_ex(return_value, arg_key, 
arg_key_len);
+   if (add_empty) {
+   add_assoc_null_ex(return_value, 
arg_key, arg_key_len);
+   }
} else {
zval *nval;

@@ -821,15 +825,16 @@
 }
 /* }}} */

-/* {{{ proto mixed filter_input_array(constant type, [, mixed options]])
+/* {{{ proto mixed filter_input_array(constant type, [, mixed options [, bool 
add_empty]]])
  * Returns an array with all arguments defined in 'definition'.
  */
 PHP_FUNCTION(filter_input_array)
 {
longfetch_from;
zval   *array_input = NULL, **op = NULL;
+   zend_bool add_empty = 1;

-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l|Z,  
fetch_from, op) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l|Zb,  
fetch_from, op, add_empty) == FAILURE) {
return;
}

@@ -865,18 +870,19 @@
}
}

-   php_filter_array_handler(array_input, op, return_value TSRMLS_CC);
+   php_filter_array_handler(array_input, op, return_value, add_empty 
TSRMLS_CC);
 }
 /* }}} */

-/* {{{ proto mixed filter_var_array(array data, [, mixed options]])
+/* {{{ proto mixed filter_var_array(array data, [, mixed options [, bool 
add_empty]]])
  * Returns an array with all arguments defined in 'definition'.
  */
 PHP_FUNCTION(filter_var_array)
 {
zval *array_input = NULL, **op = NULL;
+   zend_bool add_empty = 1;

-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a|Z,  
array_input, op) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a|Zb,  
array_input, op, add_empty) == FAILURE) {
return;
}

@@ -887,7 +893,7 @@
RETURN_FALSE;
}

-   php_filter_array_handler(array_input, op, return_value TSRMLS_CC);
+   php_filter_array_handler(array_input, op, return_value, add_empty 
TSRMLS_CC);
 }
 /* }}} */


Added: php/php-src/branches/PHP_5_3/ext/filter/tests/054.phpt
===
--- php/php-src/branches/PHP_5_3/ext/filter/tests/054.phpt  
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/filter/tests/054.phpt  2011-04-28 
12:32:47 UTC (rev 310622)
@@ -0,0 +1,26 @@
+--TEST--
+filter_var_array() - using the add_empty option
+--SKIPIF--
+?php if (!extension_loaded(filter)) die(skip); ?
+--FILE--
+?php
+

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/exif/exif.c trunk/ext/exif/exif.c

2011-04-12 Thread Ilia Alshanetsky
iliaaTue, 12 Apr 2011 18:33:08 +

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

Log:
Fixed bug #54121 (error message format string typo).

Bug: http://bugs.php.net/54121 (Open) php: exif error message format string typo
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/exif/exif.c
U   php/php-src/trunk/ext/exif/exif.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-04-12 17:30:42 UTC (rev 310166)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-04-12 18:33:08 UTC (rev 310167)
@@ -34,6 +34,9 @@
 - DBA extension:
   . Fixed bug #54242 (dba_insert returns true if key already exists). (Felipe)

+- Exif extesion:
+  . Fixed bug #54121 (error message format string typo). (Ilia)
+
 - Filter extension:
   . Fixed bug #53037 (FILTER_FLAG_EMPTY_STRING_NULL is not implemented). (Ilia)


Modified: php/php-src/branches/PHP_5_3/ext/exif/exif.c
===
--- php/php-src/branches/PHP_5_3/ext/exif/exif.c2011-04-12 17:30:42 UTC 
(rev 310166)
+++ php/php-src/branches/PHP_5_3/ext/exif/exif.c2011-04-12 18:33:08 UTC 
(rev 310167)
@@ -2909,7 +2909,7 @@
fgot = php_stream_tell(ImageInfo-infile);
if (fgot!=offset_val) {
EFREE_IF(outside);
-   exif_error_docref(NULL EXIFERR_CC, ImageInfo, 
E_WARNING, Wrong file pointer: 0x%08X != 0x08X, fgot, offset_val);
+   exif_error_docref(NULL EXIFERR_CC, ImageInfo, 
E_WARNING, Wrong file pointer: 0x%08X != 0x%08X, fgot, offset_val);
return FALSE;
}
fgot = php_stream_read(ImageInfo-infile, value_ptr, 
byte_count);

Modified: php/php-src/trunk/ext/exif/exif.c
===
--- php/php-src/trunk/ext/exif/exif.c   2011-04-12 17:30:42 UTC (rev 310166)
+++ php/php-src/trunk/ext/exif/exif.c   2011-04-12 18:33:08 UTC (rev 310167)
@@ -2905,7 +2905,7 @@
fgot = php_stream_tell(ImageInfo-infile);
if (fgot!=offset_val) {
EFREE_IF(outside);
-   exif_error_docref(NULL EXIFERR_CC, ImageInfo, 
E_WARNING, Wrong file pointer: 0x%08X != 0x08X, fgot, offset_val);
+   exif_error_docref(NULL EXIFERR_CC, ImageInfo, 
E_WARNING, Wrong file pointer: 0x%08X != 0x%08X, fgot, offset_val);
return FALSE;
}
fgot = php_stream_read(ImageInfo-infile, value_ptr, 
byte_count);

-- 
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/filter/sanitizing_filters.c branches/PHP_5_3/ext/filter/tests/bug53037.phpt trunk/ext/filter/sanitizing_filters.c trunk/ext/filt

2011-04-03 Thread Ilia Alshanetsky
iliaaSun, 03 Apr 2011 16:30:31 +

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

Log:
Fixed bug #53037 (FILTER_FLAG_EMPTY_STRING_NULL is not implemented).

Bug: http://bugs.php.net/53037 (Open) activate FILTER_FLAG_EMPTY_STRING_NULL
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/filter/sanitizing_filters.c
A   php/php-src/branches/PHP_5_3/ext/filter/tests/bug53037.phpt
U   php/php-src/trunk/ext/filter/sanitizing_filters.c
A   php/php-src/trunk/ext/filter/tests/bug53037.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-04-03 12:25:43 UTC (rev 309919)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-04-03 16:30:31 UTC (rev 309920)
@@ -28,6 +28,9 @@
 - DBA extension:
   . Fixed bug #54242 (dba_insert returns true if key already exists). (Felipe)

+- Filter extension:
+  . Fixed bug #53037 (FILTER_FLAG_EMPTY_STRING_NULL is not implemented). (Ilia)
+
 - LDAP extension:
   . Fixed bug #53339 (Fails to build when compilng with gcc 4.5 and DSO
 libraries). (Clint Byrum, Raphael)

Modified: php/php-src/branches/PHP_5_3/ext/filter/sanitizing_filters.c
===
--- php/php-src/branches/PHP_5_3/ext/filter/sanitizing_filters.c
2011-04-03 12:25:43 UTC (rev 309919)
+++ php/php-src/branches/PHP_5_3/ext/filter/sanitizing_filters.c
2011-04-03 16:30:31 UTC (rev 309920)
@@ -205,7 +205,11 @@

if (new_len == 0) {
zval_dtor(value);
-   ZVAL_EMPTY_STRING(value);
+   if (flags  FILTER_FLAG_EMPTY_STRING_NULL) {
+   ZVAL_NULL(value);
+   } else {
+   ZVAL_EMPTY_STRING(value);
+   }
return;
}
 }
@@ -280,6 +284,9 @@
}

php_filter_encode_html(value, enc);
+   } else if (flags  FILTER_FLAG_EMPTY_STRING_NULL  Z_STRLEN_P(value) 
== 0) {
+   zval_dtor(value);
+   ZVAL_NULL(value);
}
 }
 /* }}} */

Added: php/php-src/branches/PHP_5_3/ext/filter/tests/bug53037.phpt
===
--- php/php-src/branches/PHP_5_3/ext/filter/tests/bug53037.phpt 
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/filter/tests/bug53037.phpt 2011-04-03 
16:30:31 UTC (rev 309920)
@@ -0,0 +1,14 @@
+--TEST--
+Bug #53037 (FILTER_FLAG_EMPTY_STRING_NULL is not implemented)
+--SKIPIF--
+?php if (!extension_loaded(filter)) die(skip); ?
+--FILE--
+?php
+var_dump(
+   filter_var(, FILTER_DEFAULT),
+filter_var(, FILTER_DEFAULT, array('flags' = 
FILTER_FLAG_EMPTY_STRING_NULL))
+);
+?
+--EXPECT--
+string(0) 
+NULL

Modified: php/php-src/trunk/ext/filter/sanitizing_filters.c
===
--- php/php-src/trunk/ext/filter/sanitizing_filters.c   2011-04-03 12:25:43 UTC 
(rev 309919)
+++ php/php-src/trunk/ext/filter/sanitizing_filters.c   2011-04-03 16:30:31 UTC 
(rev 309920)
@@ -205,7 +205,11 @@

if (new_len == 0) {
zval_dtor(value);
-   ZVAL_EMPTY_STRING(value);
+   if (flags  FILTER_FLAG_EMPTY_STRING_NULL) {
+   ZVAL_NULL(value);
+   } else {
+   ZVAL_EMPTY_STRING(value);
+   }
return;
}
 }
@@ -280,6 +284,9 @@
}

php_filter_encode_html(value, enc);
+   } else if (flags  FILTER_FLAG_EMPTY_STRING_NULL  Z_STRLEN_P(value) 
== 0) {
+   zval_dtor(value);
+   ZVAL_NULL(value);
}
 }
 /* }}} */

Added: php/php-src/trunk/ext/filter/tests/bug53037.phpt
===
--- php/php-src/trunk/ext/filter/tests/bug53037.phpt
(rev 0)
+++ php/php-src/trunk/ext/filter/tests/bug53037.phpt2011-04-03 16:30:31 UTC 
(rev 309920)
@@ -0,0 +1,14 @@
+--TEST--
+Bug #53037 (FILTER_FLAG_EMPTY_STRING_NULL is not implemented)
+--SKIPIF--
+?php if (!extension_loaded(filter)) die(skip); ?
+--FILE--
+?php
+var_dump(
+   filter_var(, FILTER_DEFAULT),
+filter_var(, FILTER_DEFAULT, array('flags' = 
FILTER_FLAG_EMPTY_STRING_NULL))
+);
+?
+--EXPECT--
+string(0) 
+NULL

-- 
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/main/main.c trunk/main/main.c

2011-03-24 Thread Ilia Alshanetsky
iliaaThu, 24 Mar 2011 12:57:38 +

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

Log:
Fixed a crash inside dtor for error handling.

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/main/main.c
U   php/php-src/trunk/main/main.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-03-24 12:35:17 UTC (rev 309646)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-03-24 12:57:38 UTC (rev 309647)
@@ -8,6 +8,7 @@
 - Core:
   . Fixed bug #54180 (parse_url() incorrectly parses path when ? in fragment).
 (tomas dot brastavicius at quantum dot lt, Pierrick)
+  . Fixed a crash inside dtor for error handling. (Ilia)

 - DateTime extension:
   . Fixed bug #54340 (DateTime::add() method bug). (Adam)

Modified: php/php-src/branches/PHP_5_3/main/main.c
===
--- php/php-src/branches/PHP_5_3/main/main.c2011-03-24 12:35:17 UTC (rev 
309646)
+++ php/php-src/branches/PHP_5_3/main/main.c2011-03-24 12:57:38 UTC (rev 
309647)
@@ -908,9 +908,11 @@
if (display) {
if (PG(last_error_message)) {
free(PG(last_error_message));
+   PG(last_error_message) = NULL;
}
if (PG(last_error_file)) {
free(PG(last_error_file));
+   PG(last_error_file) = NULL;
}
if (!error_filename) {
error_filename = Unknown;

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2011-03-24 12:35:17 UTC (rev 309646)
+++ php/php-src/trunk/main/main.c   2011-03-24 12:57:38 UTC (rev 309647)
@@ -880,9 +880,11 @@
if (display) {
if (PG(last_error_message)) {
free(PG(last_error_message));
+   PG(last_error_message) = NULL;
}
if (PG(last_error_file)) {
free(PG(last_error_file));
+   PG(last_error_file) = NULL;
}
if (!error_filename) {
error_filename = Unknown;

-- 
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/tokenizer/tests/bug54089.phpt branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation16.phpt branches/PHP_5_3/ext/tokenizer

2011-02-28 Thread Ilia Alshanetsky
iliaaMon, 28 Feb 2011 15:18:27 +

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

Log:
Fixed bug #54089 (token_get_all() does not stop after __halt_compiler).

Bug: http://bugs.php.net/54089 (Open) token_get_all with regards to 
__halt_compiler is not binary safe
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
A   php/php-src/branches/PHP_5_3/ext/tokenizer/tests/bug54089.phpt
U   
php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation16.phpt
U   php/php-src/branches/PHP_5_3/ext/tokenizer/tokenizer.c
A   php/php-src/trunk/ext/tokenizer/tests/bug54089.phpt
U   php/php-src/trunk/ext/tokenizer/tests/token_get_all_variation16.phpt
U   php/php-src/trunk/ext/tokenizer/tokenizer.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2011-02-28 14:16:00 UTC (rev 308760)
+++ php/php-src/branches/PHP_5_3/NEWS	2011-02-28 15:18:27 UTC (rev 308761)
@@ -16,6 +16,11 @@
 - SPL extension:
   . Fixed memory leak in DirectoryIterator::getExtension() and
 SplFileInfo::getExtension(). (Felipe)
+
+- Tokenizer Extension
+  . Fixed bug #54089 (token_get_all() does not stop after __halt_compiler).
+(Ilia)
+
 17 Feb 2011, PHP 5.3.6RC1
 - Upgraded bundled Sqlite3 to version 3.7.4. (Ilia)
 - Upgraded bundled PCRE to version 8.11. (Ilia)

Added: php/php-src/branches/PHP_5_3/ext/tokenizer/tests/bug54089.phpt
===
--- php/php-src/branches/PHP_5_3/ext/tokenizer/tests/bug54089.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/tokenizer/tests/bug54089.phpt	2011-02-28 15:18:27 UTC (rev 308761)
@@ -0,0 +1,40 @@
+--TEST--
+Bug #54089 (token_get_all() does not stop after __halt_compiler)
+--SKIPIF--
+?php if (!extension_loaded(tokenizer)) print skip; ?
+--FILE--
+?php
+$code = ?php __halt_compiler();\x01?\x02;
+$tokens = token_get_all($code);
+
+var_dump($tokens);
+
+$code = '';
+foreach ($tokens as $t)
+{
+	$code .= isset($t[1]) ? $t[1] : $t;
+}
+var_dump($code);
+?
+--EXPECTF--
+array(2) {
+  [0]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(6) ?php 
+[2]=
+int(1)
+  }
+  [1]=
+  array(3) {
+[0]=
+int(%d)
+[1]=
+string(15) __halt_compiler
+[2]=
+int(1)
+  }
+}
+string(21) ?php __halt_compiler

Modified: php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation16.phpt
===
--- php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation16.phpt	2011-02-28 14:16:00 UTC (rev 308760)
+++ php/php-src/branches/PHP_5_3/ext/tokenizer/tests/token_get_all_variation16.phpt	2011-02-28 15:18:27 UTC (rev 308761)
@@ -55,11 +55,11 @@
 ?
 --EXPECTF--
 *** Testing token_get_all() : with different function constructs ***
-array(142) {
+array(135) {
   [0]=
   array(3) {
 [0]=
-int(368)
+int(%d)
 [1]=
 string(6) ?php
 
@@ -69,7 +69,7 @@
   [1]=
   array(3) {
 [0]=
-int(324)
+int(%d)
 [1]=
 string(7) declare
 [2]=
@@ -80,7 +80,7 @@
   [3]=
   array(3) {
 [0]=
-int(307)
+int(%d)
 [1]=
 string(5) VALUE
 [2]=
@@ -91,7 +91,7 @@
   [5]=
   array(3) {
 [0]=
-int(305)
+int(%d)
 [1]=
 string(3) 100
 [2]=
@@ -104,7 +104,7 @@
   [8]=
   array(3) {
 [0]=
-int(371)
+int(%d)
 [1]=
 string(1) 
 
@@ -114,7 +114,7 @@
   [9]=
   array(3) {
 [0]=
-int(262)
+int(%d)
 [1]=
 string(7) include
 [2]=
@@ -125,7 +125,7 @@
   [11]=
   array(3) {
 [0]=
-int(315)
+int(%d)
 [1]=
 string(13) addfile.php
 [2]=
@@ -138,7 +138,7 @@
   [14]=
   array(3) {
 [0]=
-int(371)
+int(%d)
 [1]=
 string(1) 
 
@@ -148,7 +148,7 @@
   [15]=
   array(3) {
 [0]=
-int(259)
+int(%d)
 [1]=
 string(7) require
 [2]=
@@ -159,7 +159,7 @@
   [17]=
   array(3) {
 [0]=
-int(315)
+int(%d)
 [1]=
 string(13) sumfile.php
 [2]=
@@ -172,7 +172,7 @@
   [20]=
   array(3) {
 [0]=
-int(371)
+int(%d)
 [1]=
 string(2) 

@@ -183,7 +183,7 @@
   [21]=
   array(3) {
 [0]=
-int(334)
+int(%d)
 [1]=
 string(8) function
 [2]=
@@ -192,7 +192,7 @@
   [22]=
   array(3) {
 [0]=
-int(371)
+int(%d)
 [1]=
 string(1)  
 [2]=
@@ -201,7 +201,7 @@
   [23]=
   array(3) {
 [0]=
-int(307)
+int(%d)
 [1]=
 string(10) myFunction
 [2]=
@@ -212,7 +212,7 @@
   [25]=
   array(3) {
 [0]=
-int(309)
+int(%d)
 [1]=
 string(2) $a
 [2]=
@@ -223,7 +223,7 @@
   [27]=
   array(3) {
 [0]=
-int(371)
+int(%d)
 [1]=
 string(1) 
 
@@ -235,7 +235,7 @@
   [29]=
   array(3) {
 [0]=
-int(371)
+int(%d)
 [1]=
 string(3) 
   
@@ -245,7 +245,7 @@
   [30]=
   array(3) {
 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/pdo/ pdo_stmt.c

2011-02-22 Thread Ilia Alshanetsky
iliaaTue, 22 Feb 2011 15:48:25 +

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

Log:
Fixed compiler warning

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c

Modified: php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c
===
--- php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c 2011-02-22 14:49:32 UTC 
(rev 308568)
+++ php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c 2011-02-22 15:48:25 UTC 
(rev 308569)
@@ -2183,7 +2183,7 @@
php_stream_printf(out TSRMLS_CC, Key: Name: 
[%d] %.*s\n, len, len, str);
}

-   php_stream_printf(out TSRMLS_CC, paramno=%d\nname=[%d] 
\%.*s\\nis_param=%d\nparam_type=%d\n,
+   php_stream_printf(out TSRMLS_CC, 
paramno=%ld\nname=[%d] \%.*s\\nis_param=%d\nparam_type=%d\n,
param-paramno, param-namelen, param-namelen, 
param-name ? param-name : ,
param-is_param,
param-param_type);

-- 
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/mysql/php_mysql.c trunk/ext/mysql/php_mysql.c

2011-02-14 Thread Ilia Alshanetsky
iliaaMon, 14 Feb 2011 14:05:46 +

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

Log:
Fixed variable re-declarations

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c
U   php/php-src/trunk/ext/mysql/php_mysql.c

Modified: php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c
===
--- php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c  2011-02-14 13:58:03 UTC 
(rev 308322)
+++ php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c  2011-02-14 14:05:46 UTC 
(rev 308323)
@@ -371,11 +371,11 @@
if (mysql-active_result_id) { \
do {\
int type;   \
-   MYSQL_RES *mysql_result;\
+   MYSQL_RES *_mysql_result;   \
\
-   mysql_result = (MYSQL_RES *) 
zend_list_find(mysql-active_result_id, type);\
-   if (mysql_result  type==le_result) {  
\
-   if (mysql_result_is_unbuffered(mysql_result)  
!mysql_eof(mysql_result)) { \
+   _mysql_result = (MYSQL_RES *) 
zend_list_find(mysql-active_result_id, type);   \
+   if (_mysql_result  type==le_result) { 
\
+   if (mysql_result_is_unbuffered(_mysql_result) 
 !mysql_eof(_mysql_result)) { \
php_error_docref(NULL TSRMLS_CC, 
E_NOTICE, Function called without first fetching all rows from a previous 
unbuffered query); \
}   
\
zend_list_delete(mysql-active_result_id);  
\
@@ -2126,12 +2126,12 @@
fci.retval_ptr_ptr = retval_ptr;
if (ctor_params  Z_TYPE_P(ctor_params) != IS_NULL) {
if (Z_TYPE_P(ctor_params) == IS_ARRAY) {
-   HashTable *ht = Z_ARRVAL_P(ctor_params);
+   HashTable *htl = 
Z_ARRVAL_P(ctor_params);
Bucket *p;

fci.param_count = 0;
-   fci.params = 
safe_emalloc(sizeof(zval*), ht-nNumOfElements, 0);
-   p = ht-pListHead;
+   fci.params = 
safe_emalloc(sizeof(zval*), htl-nNumOfElements, 0);
+   p = htl-pListHead;
while (p != NULL) {
fci.params[fci.param_count++] = 
(zval**)p-pData;
p = p-pListNext;

Modified: php/php-src/trunk/ext/mysql/php_mysql.c
===
--- php/php-src/trunk/ext/mysql/php_mysql.c 2011-02-14 13:58:03 UTC (rev 
308322)
+++ php/php-src/trunk/ext/mysql/php_mysql.c 2011-02-14 14:05:46 UTC (rev 
308323)
@@ -371,11 +371,11 @@
if (mysql-active_result_id) { \
do {\
int type;   \
-   MYSQL_RES *mysql_result;\
+   MYSQL_RES *_mysql_result;   \
\
-   mysql_result = (MYSQL_RES *) 
zend_list_find(mysql-active_result_id, type);\
-   if (mysql_result  type==le_result) {  
\
-   if (mysql_result_is_unbuffered(mysql_result)  
!mysql_eof(mysql_result)) { \
+   _mysql_result = (MYSQL_RES *) 
zend_list_find(mysql-active_result_id, type);   \
+   if (_mysql_result  type==le_result) { 
\
+   if (mysql_result_is_unbuffered(_mysql_result) 
 !mysql_eof(_mysql_result)) { \
php_error_docref(NULL TSRMLS_CC, 
E_NOTICE, Function called without first fetching all rows from a previous 
unbuffered query); \
}   
\
zend_list_delete(mysql-active_result_id);  
\
@@ -2126,12 +2126,12 @@
fci.retval_ptr_ptr = retval_ptr;
if (ctor_params  Z_TYPE_P(ctor_params) != IS_NULL) {
if (Z_TYPE_P(ctor_params) == IS_ARRAY) {
-   HashTable *ht = Z_ARRVAL_P(ctor_params);
+   HashTable *htl = 

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/tests/015.phpt branches/PHP_5_3/ext/standard/url.c trunk/ext/filter/tests/015.phpt trunk/ext/standard/url.c

2011-02-06 Thread Ilia Alshanetsky
Missing news entry from a previous bug fix.

On Fri, Feb 4, 2011 at 10:37 PM, Adam Harvey ahar...@php.net wrote:
 On 5 February 2011 05:41, Ilia Alshanetsky il...@php.net wrote:
 Log:
 Fixed bug #53924 (FILTER_VALIDATE_URL doesn't validate port number).

 Modified: php/php-src/branches/PHP_5_3/NEWS
 ===
 --- php/php-src/branches/PHP_5_3/NEWS   2011-02-04 19:22:43 UTC (rev 308034)
 +++ php/php-src/branches/PHP_5_3/NEWS   2011-02-04 21:41:15 UTC (rev 308035)
 @@ -109,6 +111,8 @@
  - Phar extension:
   . Fixed bug #53541 (format string bug in ext/phar).
     (crrodriguez at opensuse dot org, Ilia)
 +  . Fixed bug #53898 (PHAR reports invalid error message, when the directory
 +    does not exist). (Ilia)

 I suspect that NEWS item was meant to be for another commit. :)

 Adam


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



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_001.phpt branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_002.phpt branches/PHP_5_3/ext/standard/tests/url/p

2011-02-06 Thread Ilia Alshanetsky
iliaaSun, 06 Feb 2011 17:23:57 +

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

Log:
Fixed parse_url() tests to account for port validation

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_001.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_002.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_003.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_004.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_005.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_006.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_007.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_008.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_009.phpt
U   php/php-src/trunk/ext/standard/tests/url/parse_url_basic_001.phpt
U   php/php-src/trunk/ext/standard/tests/url/parse_url_basic_002.phpt
U   php/php-src/trunk/ext/standard/tests/url/parse_url_basic_003.phpt
U   php/php-src/trunk/ext/standard/tests/url/parse_url_basic_004.phpt
U   php/php-src/trunk/ext/standard/tests/url/parse_url_basic_005.phpt
U   php/php-src/trunk/ext/standard/tests/url/parse_url_basic_006.phpt
U   php/php-src/trunk/ext/standard/tests/url/parse_url_basic_007.phpt
U   php/php-src/trunk/ext/standard/tests/url/parse_url_basic_008.phpt
U   php/php-src/trunk/ext/standard/tests/url/parse_url_basic_009.phpt

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_001.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_001.phpt	2011-02-06 17:22:05 UTC (rev 308063)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_001.phpt	2011-02-06 17:23:57 UTC (rev 308064)
@@ -734,14 +734,7 @@
   string(9) /blah.com
 }

--- x://::abc/?: array(3) {
-  [scheme]=
-  string(1) x
-  [host]=
-  string(1) :
-  [path]=
-  string(1) /
-}
+-- x://::abc/?: bool(false)

 -- http://::?: array(2) {
   [scheme]=

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_002.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_002.phpt	2011-02-06 17:22:05 UTC (rev 308063)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_002.phpt	2011-02-06 17:23:57 UTC (rev 308064)
@@ -94,7 +94,7 @@
 -- http://x:?   : string(4) http
 -- x:blah.com   : string(1) x
 -- x:/blah.com   : string(1) x
--- x://::abc/?   : string(1) x
+-- x://::abc/?   : bool(false)
 -- http://::?   : string(4) http
 -- x://::6.5   : string(1) x
 -- http://?:/   : string(4) http

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_003.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_003.phpt	2011-02-06 17:22:05 UTC (rev 308063)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_003.phpt	2011-02-06 17:23:57 UTC (rev 308064)
@@ -93,7 +93,7 @@
 -- http://x:?   : string(1) x
 -- x:blah.com   : NULL
 -- x:/blah.com   : NULL
--- x://::abc/?   : string(1) :
+-- x://::abc/?   : bool(false)
 -- http://::?   : string(1) :
 -- x://::6.5   : string(1) :
 -- http://?:/   : string(1) ?

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_004.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_004.phpt	2011-02-06 17:22:05 UTC (rev 308063)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_004.phpt	2011-02-06 17:23:57 UTC (rev 308064)
@@ -93,7 +93,7 @@
 -- http://x:?   : NULL
 -- x:blah.com   : NULL
 -- x:/blah.com   : NULL
--- x://::abc/?   : NULL
+-- x://::abc/?   : bool(false)
 -- http://::?   : NULL
 -- x://::6.5   : int(6)
 -- http://?:/   : NULL

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_005.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_005.phpt	2011-02-06 17:22:05 UTC (rev 308063)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_005.phpt	2011-02-06 17:23:57 UTC (rev 308064)
@@ -93,7 +93,7 @@
 -- http://x:?   : NULL
 -- x:blah.com   : NULL
 -- x:/blah.com   : NULL
--- x://::abc/?   : NULL
+-- x://::abc/?   : bool(false)
 -- http://::?   : NULL
 -- x://::6.5   : NULL
 -- http://?:/   : NULL

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/url/parse_url_basic_006.phpt
===
--- 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/tests/015.phpt branches/PHP_5_3/ext/standard/url.c trunk/ext/filter/tests/015.phpt trunk/ext/standard/url.c

2011-02-04 Thread Ilia Alshanetsky
iliaaFri, 04 Feb 2011 21:41:15 +

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

Log:
Fixed bug #53924 (FILTER_VALIDATE_URL doesn't validate port number).

Bug: http://bugs.php.net/53924 (Open) FILTER_VALIDATE_URL doesn't validate port 
numbers
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/filter/tests/015.phpt
U   php/php-src/branches/PHP_5_3/ext/standard/url.c
U   php/php-src/trunk/ext/filter/tests/015.phpt
U   php/php-src/trunk/ext/standard/url.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-02-04 19:22:43 UTC (rev 308034)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-02-04 21:41:15 UTC (rev 308035)
@@ -47,6 +47,8 @@
 null default value). (Gustavo, Stas)

 - Filter extension:
+  . Fixed bug #53924 (FILTER_VALIDATE_URL doesn't validate port number).
+(Ilia)
   . Fixed bug #53150 (FILTER_FLAG_NO_RES_RANGE is missing some IP ranges).
 (Ilia)
   . Fixed bug #52209 (INPUT_ENV returns NULL for set variables (CLI)). (Ilia)
@@ -109,6 +111,8 @@
 - Phar extension:
   . Fixed bug #53541 (format string bug in ext/phar).
 (crrodriguez at opensuse dot org, Ilia)
+  . Fixed bug #53898 (PHAR reports invalid error message, when the directory
+does not exist). (Ilia)

 - PHP-FPM SAPI:
   . Enforce security in the fastcgi protocol parsing.

Modified: php/php-src/branches/PHP_5_3/ext/filter/tests/015.phpt
===
--- php/php-src/branches/PHP_5_3/ext/filter/tests/015.phpt  2011-02-04 
19:22:43 UTC (rev 308034)
+++ php/php-src/branches/PHP_5_3/ext/filter/tests/015.phpt  2011-02-04 
21:41:15 UTC (rev 308035)
@@ -28,6 +28,7 @@
 'news:news.php.net',
 'file://foo/bar',
 http://\r\n/bar;,
+http://example.com:qq;
 );
 foreach ($values as $value) {
var_dump(filter_var($value, FILTER_VALIDATE_URL));
@@ -70,6 +71,7 @@
 string(14) file://foo/bar
 bool(false)
 bool(false)
+bool(false)
 string(10) http://qwe;
 bool(false)
 bool(false)

Modified: php/php-src/branches/PHP_5_3/ext/standard/url.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/url.c 2011-02-04 19:22:43 UTC 
(rev 308034)
+++ php/php-src/branches/PHP_5_3/ext/standard/url.c 2011-02-04 21:41:15 UTC 
(rev 308035)
@@ -180,15 +180,20 @@
parse_port:
p = e + 1;
pp = p;
-
+
while (pp-p  6  isdigit(*pp)) {
pp++;
}
-
+
if (pp-p  6  (*pp == '/' || *pp == '\0')) {
memcpy(port_buf, p, (pp-p));
port_buf[pp-p] = '\0';
ret-port = atoi(port_buf);
+   if (!ret-port  (pp - p)  0) {
+   STR_FREE(ret-scheme);
+   efree(ret);
+   return NULL;
+   }
} else {
goto just_path;
}
@@ -267,6 +272,13 @@
memcpy(port_buf, p, (e-p));
port_buf[e-p] = '\0';
ret-port = atoi(port_buf);
+   if (!ret-port  (e - p)) {
+   STR_FREE(ret-scheme);
+   STR_FREE(ret-user);
+   STR_FREE(ret-pass);
+   efree(ret);
+   return NULL;
+   }
}
p--;
}

Modified: php/php-src/trunk/ext/filter/tests/015.phpt
===
--- php/php-src/trunk/ext/filter/tests/015.phpt 2011-02-04 19:22:43 UTC (rev 
308034)
+++ php/php-src/trunk/ext/filter/tests/015.phpt 2011-02-04 21:41:15 UTC (rev 
308035)
@@ -28,6 +28,7 @@
 'news:news.php.net',
 'file://foo/bar',
 http://\r\n/bar;,
+http://example.com:qq;
 );
 foreach ($values as $value) {
var_dump(filter_var($value, FILTER_VALIDATE_URL));
@@ -70,6 +71,7 @@
 string(14) file://foo/bar
 bool(false)
 bool(false)
+bool(false)
 string(10) http://qwe;
 bool(false)
 bool(false)

Modified: php/php-src/trunk/ext/standard/url.c
===
--- php/php-src/trunk/ext/standard/url.c2011-02-04 19:22:43 UTC (rev 
308034)
+++ php/php-src/trunk/ext/standard/url.c2011-02-04 21:41:15 UTC (rev 
308035)
@@ -180,15 +180,20 @@
parse_port:
p = e + 1;
pp = p;
-
+
while (pp-p  6  isdigit(*pp)) {
pp++;
}
-
+
if (pp-p 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/soap/soap.c trunk/ext/soap/soap.c

2011-02-03 Thread Ilia Alshanetsky
iliaaThu, 03 Feb 2011 13:33:10 +

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

Log:
Fixed compiler warnings caused by var re-declaration

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/soap/soap.c
U   php/php-src/trunk/ext/soap/soap.c

Modified: php/php-src/branches/PHP_5_3/ext/soap/soap.c
===
--- php/php-src/branches/PHP_5_3/ext/soap/soap.c2011-02-03 13:12:10 UTC 
(rev 307974)
+++ php/php-src/branches/PHP_5_3/ext/soap/soap.c2011-02-03 13:33:10 UTC 
(rev 307975)
@@ -3006,18 +3006,18 @@
}

if (options) {
-   HashTable *ht = Z_ARRVAL_P(options);
-   if (zend_hash_find(ht, location, sizeof(location), 
(void**)tmp) == SUCCESS 
+   HashTable *hto = Z_ARRVAL_P(options);
+   if (zend_hash_find(hto, location, sizeof(location), 
(void**)tmp) == SUCCESS 
Z_TYPE_PP(tmp) == IS_STRING) {
location = Z_STRVAL_PP(tmp);
}

-   if (zend_hash_find(ht, soapaction, sizeof(soapaction), 
(void**)tmp) == SUCCESS 
+   if (zend_hash_find(hto, soapaction, sizeof(soapaction), 
(void**)tmp) == SUCCESS 
Z_TYPE_PP(tmp) == IS_STRING) {
soap_action = Z_STRVAL_PP(tmp);
}

-   if (zend_hash_find(ht, uri, sizeof(uri), (void**)tmp) == 
SUCCESS 
+   if (zend_hash_find(hto, uri, sizeof(uri), (void**)tmp) == 
SUCCESS 
Z_TYPE_PP(tmp) == IS_STRING) {
uri = Z_STRVAL_PP(tmp);
}
@@ -3045,10 +3045,10 @@
HashTable *default_headers = Z_ARRVAL_P(*tmp);
if (soap_headers) {
if (!free_soap_headers) {
-   HashTable *tmp =  emalloc(sizeof(HashTable));
-   zend_hash_init(tmp, 0, NULL, ZVAL_PTR_DTOR, 0);
-   zend_hash_copy(tmp, soap_headers, 
(copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *));
-   soap_headers = tmp;
+   HashTable *t =  emalloc(sizeof(HashTable));
+   zend_hash_init(t, 0, NULL, ZVAL_PTR_DTOR, 0);
+   zend_hash_copy(t, soap_headers, 
(copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *));
+   soap_headers = t;
free_soap_headers = 1;
}
zend_hash_internal_pointer_reset(default_headers);
@@ -3756,7 +3756,6 @@
while (trav != NULL) {
if (trav-type == XML_ELEMENT_NODE) {
xmlNodePtr hdr_func = trav;
-   xmlAttrPtr attr;
int mustUnderstand = 0;

if (*version == SOAP_1_1) {
@@ -4002,7 +4001,6 @@

if (headers 
zend_hash_find(prop, headerfault, sizeof(headerfault), 
(void**)tmp) == SUCCESS) {
-   xmlNodePtr head;
encodePtr hdr_enc = NULL;
int hdr_use = SOAP_LITERAL;
zval *hdr_ret  = *tmp;
@@ -4013,7 +4011,6 @@
if (Z_TYPE_P(hdr_ret) == IS_OBJECT 
instanceof_function(Z_OBJCE_P(hdr_ret), 
soap_header_class_entry TSRMLS_CC)) {
HashTable* ht = Z_OBJPROP_P(hdr_ret);
-   zval **tmp;
sdlSoapBindingFunctionHeaderPtr *hdr;
smart_str key = {0};

@@ -4202,7 +4199,7 @@
}
} else {
if (sparam-element) {
-   xmlNsPtr ns = encode_add_ns(x, 
sparam-element-namens);
+   ns = encode_add_ns(x, 
sparam-element-namens);
xmlNodeSetName(x, 
BAD_CAST(sparam-element-name));
xmlSetNs(x, ns);
}

Modified: php/php-src/trunk/ext/soap/soap.c
===
--- php/php-src/trunk/ext/soap/soap.c   2011-02-03 13:12:10 UTC (rev 307974)
+++ php/php-src/trunk/ext/soap/soap.c   2011-02-03 13:33:10 UTC (rev 307975)
@@ -2811,18 +2811,18 @@
}

if (options) {
-   HashTable *ht = Z_ARRVAL_P(options);
-   if (zend_hash_find(ht, location, sizeof(location), 
(void**)tmp) == SUCCESS 
+   HashTable *hto = Z_ARRVAL_P(options);
+   if (zend_hash_find(hto, location, sizeof(location), 
(void**)tmp) 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/phar/phar.c branches/PHP_5_3/ext/phar/tests/bug46032.phpt branches/PHP_5_3/ext/phar/tests/phar_construct_invalidurl.phpt branches/PHP_5_3/ext/phar/tes

2011-02-01 Thread Ilia Alshanetsky
iliaaTue, 01 Feb 2011 14:01:00 +

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

Log:
Fixed bug #53898 (PHAR reports invalid error message, when the directory does 
not exist).

Bug: http://bugs.php.net/53898 (Open) PHAR reports invalid error message, when 
the directory does not exist
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/phar/phar.c
U   php/php-src/branches/PHP_5_3/ext/phar/tests/bug46032.phpt
U   
php/php-src/branches/PHP_5_3/ext/phar/tests/phar_construct_invalidurl.phpt
U   php/php-src/branches/PHP_5_3/ext/phar/tests/zip/odt.phpt
U   php/php-src/trunk/ext/phar/phar.c
U   php/php-src/trunk/ext/phar/tests/bug46032.phpt
U   php/php-src/trunk/ext/phar/tests/phar_construct_invalidurl.phpt
U   php/php-src/trunk/ext/phar/tests/zip/odt.phpt

Modified: php/php-src/branches/PHP_5_3/ext/phar/phar.c
===
--- php/php-src/branches/PHP_5_3/ext/phar/phar.c2011-02-01 13:57:06 UTC 
(rev 307914)
+++ php/php-src/branches/PHP_5_3/ext/phar/phar.c2011-02-01 14:01:00 UTC 
(rev 307915)
@@ -1265,7 +1265,7 @@
if (ext_len == -2) {
spprintf(error, 0, Cannot create a phar 
archive from a URL like \%s\. Phar objects can only be created from local 
files, fname);
} else {
-   spprintf(error, 0, Cannot create phar '%s', 
file extension (or combination) not recognised, fname);
+   spprintf(error, 0, Cannot create phar '%s', 
file extension (or combination) not recognised or the directory does not 
exist, fname);
}
}
return FAILURE;

Modified: php/php-src/branches/PHP_5_3/ext/phar/tests/bug46032.phpt
===
--- php/php-src/branches/PHP_5_3/ext/phar/tests/bug46032.phpt   2011-02-01 
13:57:06 UTC (rev 307914)
+++ php/php-src/branches/PHP_5_3/ext/phar/tests/bug46032.phpt   2011-02-01 
14:01:00 UTC (rev 307915)
@@ -27,7 +27,7 @@
 %string|unicode%(%d) %smytest
 %string|unicode%(%d) %smytest

-Fatal error: Uncaught exception 'UnexpectedValueException' with message 
'Cannot create phar '000', file extension (or combination) not 
recognised' in %sbug46032.php:%d
+Fatal error: Uncaught exception 'UnexpectedValueException' with message 
'Cannot create phar '000', file extension (or combination) not 
recognised or the directory does not exist' in %sbug46032.php:%d
 Stack trace:
 #0 %sbug46032.php(%d): PharData-__construct('000...')
 #1 {main}

Modified: 
php/php-src/branches/PHP_5_3/ext/phar/tests/phar_construct_invalidurl.phpt
===
--- php/php-src/branches/PHP_5_3/ext/phar/tests/phar_construct_invalidurl.phpt  
2011-02-01 13:57:06 UTC (rev 307914)
+++ php/php-src/branches/PHP_5_3/ext/phar/tests/phar_construct_invalidurl.phpt  
2011-02-01 14:01:00 UTC (rev 307915)
@@ -26,5 +26,5 @@
 --EXPECT--
 Cannot create a phar archive from a URL like http://should.fail.com;. Phar 
objects can only be created from local files
 Cannot create a phar archive from a URL like http://;. Phar objects can only 
be created from local files
-Cannot create phar 'http:/', file extension (or combination) not recognised
+Cannot create phar 'http:/', file extension (or combination) not recognised or 
the directory does not exist
 ===DONE===

Modified: php/php-src/branches/PHP_5_3/ext/phar/tests/zip/odt.phpt
===
--- php/php-src/branches/PHP_5_3/ext/phar/tests/zip/odt.phpt2011-02-01 
13:57:06 UTC (rev 307914)
+++ php/php-src/branches/PHP_5_3/ext/phar/tests/zip/odt.phpt2011-02-01 
14:01:00 UTC (rev 307915)
@@ -31,5 +31,5 @@
 phar://%sodt.odt%cmimetype
 phar://%sodt.odt%csettings.xml
 phar://%sodt.odt%cstyles.xml
-Cannot create phar '%sodt.odt', file extension (or combination) not recognised
+Cannot create phar '%sodt.odt', file extension (or combination) not recognised 
or the directory does not exist
 ===DONE===

Modified: php/php-src/trunk/ext/phar/phar.c
===
--- php/php-src/trunk/ext/phar/phar.c   2011-02-01 13:57:06 UTC (rev 307914)
+++ php/php-src/trunk/ext/phar/phar.c   2011-02-01 14:01:00 UTC (rev 307915)
@@ -1265,7 +1265,7 @@
if (ext_len == -2) {
spprintf(error, 0, Cannot create a phar 
archive from a URL like \%s\. Phar objects can only be created from local 
files, fname);
} else {
-   spprintf(error, 0, Cannot create phar '%s', 
file extension (or combination) not recognised, fname);
+   spprintf(error, 0, Cannot create phar '%s', 
file extension (or 

[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/pgsql/pgsql.c

2011-01-27 Thread Ilia Alshanetsky
iliaaThu, 27 Jan 2011 16:02:30 +

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

Log:
Added support for extra parameter for PGNotify().

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/ext/pgsql/pgsql.c

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2011-01-27 15:37:38 UTC (rev 307796)
+++ php/php-src/trunk/NEWS  2011-01-27 16:02:30 UTC (rev 307797)
@@ -174,6 +174,10 @@
   . Added nextRowset support.
   . Fixed bug #50755 (PDO DBLIB Fails with OOM).

+- Improved PostgreSQL extension:
+  . Added support for extra parameter for PGNotify().
+(r dot i dot k at free dot fr, Ilia)
+
 - Improved Reflection extension: (Johannes)
   . Added ReflectionExtension::isTemporary() and
 ReflectionExtension::isPersistent() methods.

Modified: php/php-src/trunk/ext/pgsql/pgsql.c
===
--- php/php-src/trunk/ext/pgsql/pgsql.c 2011-01-27 15:37:38 UTC (rev 307796)
+++ php/php-src/trunk/ext/pgsql/pgsql.c 2011-01-27 16:02:30 UTC (rev 307797)
@@ -4782,10 +4782,24 @@
if (result_type  PGSQL_NUM) {
add_index_string(return_value, 0, pgsql_notify-relname, 1);
add_index_long(return_value, 1, pgsql_notify-be_pid);
+#if HAVE_PQPROTOCOLVERSION  HAVE_PQPARAMETERSTATUS
+   if (PQprotocolVersion(pgsql) = 3  
atof(PQparameterStatus(pgsql, server_version)) = 9.0) {
+#else
+   if (atof(PG_VERSION) = 9.0) {
+#endif
+   add_index_string(return_value, 2, pgsql_notify-extra, 
1);
+   }
}
if (result_type  PGSQL_ASSOC) {
add_assoc_string(return_value, message, 
pgsql_notify-relname, 1);
add_assoc_long(return_value, pid, pgsql_notify-be_pid);
+#if HAVE_PQPROTOCOLVERSION  HAVE_PQPARAMETERSTATUS
+   if (PQprotocolVersion(pgsql) = 3  
atof(PQparameterStatus(pgsql, server_version)) = 9.0) {
+#else
+   if (atof(PG_VERSION) = 9.0) {
+#endif
+   add_assoc_string(return_value, payload, 
pgsql_notify-extra, 1);
+   }
}
PQfreemem(pgsql_notify);
 }

-- 
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/date/php_date.c trunk/ext/date/php_date.c

2011-01-24 Thread Ilia Alshanetsky
iliaaMon, 24 Jan 2011 20:58:09 +

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

Log:
removed un-used variable

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/date/php_date.c
U   php/php-src/trunk/ext/date/php_date.c

Modified: php/php-src/branches/PHP_5_3/ext/date/php_date.c
===
--- php/php-src/branches/PHP_5_3/ext/date/php_date.c2011-01-24 19:17:45 UTC 
(rev 307718)
+++ php/php-src/branches/PHP_5_3/ext/date/php_date.c2011-01-24 20:58:09 UTC 
(rev 307719)
@@ -3527,7 +3527,6 @@
 {
php_interval_obj *obj;
zval tmp_member, tmp_value;
-   int found = 0;

if (member-type != IS_STRING) {
tmp_member = *member;

Modified: php/php-src/trunk/ext/date/php_date.c
===
--- php/php-src/trunk/ext/date/php_date.c   2011-01-24 19:17:45 UTC (rev 
307718)
+++ php/php-src/trunk/ext/date/php_date.c   2011-01-24 20:58:09 UTC (rev 
307719)
@@ -3522,7 +3522,6 @@
 {
php_interval_obj *obj;
zval tmp_member, tmp_value;
-   int found = 0;

if (member-type != IS_STRING) {
tmp_member = *member;

-- 
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/filter/logical_filters.c trunk/ext/filter/logical_filters.c

2011-01-23 Thread Ilia Alshanetsky
iliaaSun, 23 Jan 2011 16:44:58 +

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

Log:
Fixed compiler warning

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c
U   php/php-src/trunk/ext/filter/logical_filters.c

Modified: php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c
===
--- php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c   2011-01-23 
16:10:29 UTC (rev 307677)
+++ php/php-src/branches/PHP_5_3/ext/filter/logical_filters.c   2011-01-23 
16:44:58 UTC (rev 307678)
@@ -88,7 +88,7 @@
}

if ((end - str  MAX_LENGTH_OF_LONG - 1) /* number too long */
-|| (SIZEOF_LONG == 4  end - str == MAX_LENGTH_OF_LONG - 1  *str  
'2')) {
+|| (SIZEOF_LONG == 4  (end - str == MAX_LENGTH_OF_LONG - 1)  *str 
 '2')) {
/* overflow */
return -1;
}

Modified: php/php-src/trunk/ext/filter/logical_filters.c
===
--- php/php-src/trunk/ext/filter/logical_filters.c  2011-01-23 16:10:29 UTC 
(rev 307677)
+++ php/php-src/trunk/ext/filter/logical_filters.c  2011-01-23 16:44:58 UTC 
(rev 307678)
@@ -88,7 +88,7 @@
}

if ((end - str  MAX_LENGTH_OF_LONG - 1) /* number too long */
-|| (SIZEOF_LONG == 4  end - str == MAX_LENGTH_OF_LONG - 1  *str  
'2')) {
+|| (SIZEOF_LONG == 4  (end - str == MAX_LENGTH_OF_LONG - 1)  *str 
 '2')) {
/* overflow */
return -1;
}

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

  1   2   3   4   5   6   7   8   9   10   >