[PHP-CVS] com php-src: Fix test: ext/standard/tests/misc/time_nanosleep_error3.phpt ext/standard/tests/misc/time_nanosleep_error4.phpt

2012-04-04 Thread Xinchen Hui
Commit:7b04638c8c0071568fe4e351555bcfeae9fc9c8b
Author:Xinchen Hui larue...@php.net Sat, 24 Mar 2012 12:15:04 
+0800
Committer: Xinchen Hui larue...@gmail.com  Wed, 4 Apr 2012 15:20:28 +0800
Parents:   438536e45e1f762fd0f0fe7d9243adb63074e55d
Branches:  PHP-5.3

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

Log:
Fix test

cherry-pick from php-5.4

Changed paths:
  M  ext/standard/tests/misc/time_nanosleep_error3.phpt
  M  ext/standard/tests/misc/time_nanosleep_error4.phpt


Diff:
diff --git a/ext/standard/tests/misc/time_nanosleep_error3.phpt 
b/ext/standard/tests/misc/time_nanosleep_error3.phpt
index eab7847..b6365f3 100644
--- a/ext/standard/tests/misc/time_nanosleep_error3.phpt
+++ b/ext/standard/tests/misc/time_nanosleep_error3.phpt
@@ -14,4 +14,4 @@ $nano = time_nanosleep(-2, 1000);
 
 ?
 --EXPECTF--
-Warning: time_nanosleep(): nanoseconds was not in the range 0 to 999 999 999 
or seconds was negative in %s.php on line %d
+Warning: time_nanosleep(): The seconds value must be greater than 0 in 
%stime_nanosleep_error3.php on line %d
diff --git a/ext/standard/tests/misc/time_nanosleep_error4.phpt 
b/ext/standard/tests/misc/time_nanosleep_error4.phpt
index fa50c1f..e3e522a 100644
--- a/ext/standard/tests/misc/time_nanosleep_error4.phpt
+++ b/ext/standard/tests/misc/time_nanosleep_error4.phpt
@@ -14,4 +14,4 @@ $nano = time_nanosleep(0, -10);
 
 ?
 --EXPECTF--
-Warning: time_nanosleep(): nanoseconds was not in the range 0 to 999 999 999 
or seconds was negative in %s.php on line %d
+Warning: time_nanosleep(): The nanoseconds value must be greater than 0 in 
%stime_nanosleep_error4.php on line %d


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



[PHP-CVS] com php-src: Fixed bug #61605 (header_remove() does not remove all headers): NEWS main/SAPI.c sapi/cgi/tests/bug61605.phpt

2012-04-04 Thread Xinchen Hui
Commit:896c4539df4de06b4359bac9d0e6a397665e2024
Author:Xinchen Hui larue...@gmail.com Wed, 4 Apr 2012 16:01:43 
+0800
Parents:   7b04638c8c0071568fe4e351555bcfeae9fc9c8b
Branches:  PHP-5.3

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

Log:
Fixed bug #61605 (header_remove() does not remove all headers)

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

Changed paths:
  M  NEWS
  M  main/SAPI.c
  A  sapi/cgi/tests/bug61605.phpt


Diff:
diff --git a/NEWS b/NEWS
index 34e6a87..cfa1dba 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ PHP   
 NEWS
 (merge after 5.3.11 release)
 
 - Core:
+  - Fixed bug #61605 (header_remove() does not remove all headers).
+(Laruence)
   . Fixed bug #61541 (Segfault when using ob_* in output_callback).
 (reeze@gmail.com)
   . Fixed bug #61273 (call_user_func_array with more than 16333 arguments
diff --git a/main/SAPI.c b/main/SAPI.c
index 693cad3..99142b4 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -501,10 +501,36 @@ static void sapi_update_response_code(int ncode TSRMLS_DC)
SG(sapi_headers).http_response_code = ncode;
 }
 
-static int sapi_find_matching_header(void *element1, void *element2)
-{
-   int len = strlen((char*)element2);
-   return strncasecmp(((sapi_header_struct*)element1)-header, 
(char*)element2, len) == 0  ((sapi_header_struct*)element1)-header[len] == 
':';
+/* 
+ * since zend_llist_del_element only remove one matched item once,
+ * we should remove them by ourself
+ */
+static void sapi_remove_header(zend_llist *l, char *name, uint len) {
+   sapi_header_struct *header;
+   zend_llist_element *next;
+   zend_llist_element *current=l-head;
+
+   while (current) {
+   header = (sapi_header_struct *)(current-data);
+   next = current-next;
+   if (header-header_len  len  header-header[len] == ':'
+!strncasecmp(header-header, name, len)) {
+   if (current-prev) {
+   current-prev-next = next;
+   } else {
+   l-head = next;
+   }
+   if (next) {
+   next-prev = current-prev;
+   } else {
+   l-tail = current-prev;
+   }
+   sapi_free_header(header);
+   efree(current);
+   --l-count;
+   }
+   current = next;
+   }
 }
 
 SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, 
zend_bool duplicate, zend_bool replace TSRMLS_DC)
@@ -611,7 +637,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void 
*arg TSRMLS_DC)
if (sapi_module.header_handler) {
sapi_module.header_handler(sapi_header, op, 
SG(sapi_headers) TSRMLS_CC);
}
-   zend_llist_del_element(SG(sapi_headers).headers, 
sapi_header.header, (int(*)(void*, void*))sapi_find_matching_header);
+   sapi_remove_header(SG(sapi_headers).headers, 
sapi_header.header, sapi_header.header_len);
sapi_free_header(sapi_header);
return SUCCESS;
}
@@ -769,7 +795,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void 
*arg TSRMLS_DC)
char sav;
sav = *colon_offset;
*colon_offset = 0;
-   
zend_llist_del_element(SG(sapi_headers).headers, sapi_header.header, 
(int(*)(void*, void*))sapi_find_matching_header);
+   sapi_remove_header(SG(sapi_headers).headers, 
sapi_header.header, strlen(sapi_header.header));
*colon_offset = sav;
}
}
diff --git a/sapi/cgi/tests/bug61605.phpt b/sapi/cgi/tests/bug61605.phpt
new file mode 100644
index 000..c6e4cf2
--- /dev/null
+++ b/sapi/cgi/tests/bug61605.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Bug #61605 (header_remove() does not remove all headers)
+--SKIPIF--
+?php include skipif.inc; ?
+--GET--
+foo=bar
+--FILE--
+?php
+header(A: first);
+header(A: second, TRUE);
+$headers1 = headers_list();
+header(A: third, FALSE);
+$headers2 = headers_list();
+header_remove(A);
+$headers3 = headers_list();
+print_r($headers1);
+print_r($headers2);
+print_r($headers3);
+--EXPECTF--
+Array
+(
+[0] = X-Powered-By: %s
+[1] = A: second
+)
+Array
+(
+[0] = X-Powered-By: %s
+[1] = A: second
+[2] = A: third
+)
+Array
+(
+[0] = X-Powered-By: %s
+)


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



[PHP-CVS] com php-src: Fixed bug Fixed bug #61605 (header_remove() does not remove all headers): NEWS main/SAPI.c sapi/cgi/tests/bug61605.phpt

2012-04-04 Thread Xinchen Hui
Commit:efd671f242e87e3301a1b3e76179955f26119feb
Author:Xinchen Hui larue...@gmail.com Wed, 4 Apr 2012 16:14:28 
+0800
Parents:   3ea9fa1b4626f6125f25d8b0bcffac7becc1d092
Branches:  PHP-5.4

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

Log:
Fixed bug Fixed bug #61605 (header_remove() does not remove all headers)

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

Changed paths:
  M  NEWS
  M  main/SAPI.c
  A  sapi/cgi/tests/bug61605.phpt


Diff:
diff --git a/NEWS b/NEWS
index 6fc9126..b8b28b1 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ PHP 
   NEWS
   . Connection: close instead of Connection: closed (Gustavo)
 
 - Core:
+  . Fixed bug Fixed bug #61605 (header_remove() does not remove all headers).
+(Laruence)
   . 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 
diff --git a/main/SAPI.c b/main/SAPI.c
index 74fdbb2..0d3b4ef 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -587,10 +587,36 @@ static void sapi_update_response_code(int ncode TSRMLS_DC)
SG(sapi_headers).http_response_code = ncode;
 }
 
-static int sapi_find_matching_header(void *element1, void *element2)
-{
-   int len = strlen((char*)element2);
-   return strncasecmp(((sapi_header_struct*)element1)-header, 
(char*)element2, len) == 0  ((sapi_header_struct*)element1)-header[len] == 
':';
+/* 
+ * since zend_llist_del_element only remove one matched item once,
+ * we should remove them by ourself
+ */
+static void sapi_remove_header(zend_llist *l, char *name, uint len) {
+   sapi_header_struct *header;
+   zend_llist_element *next;
+   zend_llist_element *current=l-head;
+
+   while (current) {
+   header = (sapi_header_struct *)(current-data);
+   next = current-next;
+   if (header-header_len  len  header-header[len] == ':'
+!strncasecmp(header-header, name, len)) {
+   if (current-prev) {
+   current-prev-next = next;
+   } else {
+   l-head = next;
+   }
+   if (next) {
+   next-prev = current-prev;
+   } else {
+   l-tail = current-prev;
+   }
+   sapi_free_header(header);
+   efree(current);
+   --l-count;
+   }
+   current = next;
+   }
 }
 
 SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, 
zend_bool duplicate, zend_bool replace TSRMLS_DC)
@@ -621,7 +647,7 @@ static void sapi_header_add_op(sapi_header_op_enum op, 
sapi_header_struct *sapi_
char sav = *colon_offset;
 
*colon_offset = 0;
-   
zend_llist_del_element(SG(sapi_headers).headers, sapi_header-header, 
(int(*)(void*, void*))sapi_find_matching_header);
+   sapi_remove_header(SG(sapi_headers).headers, 
sapi_header-header, strlen(sapi_header-header));
*colon_offset = sav;
}
}
@@ -703,7 +729,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void 
*arg TSRMLS_DC)
sapi_header.header_len = header_line_len;
sapi_module.header_handler(sapi_header, op, 
SG(sapi_headers) TSRMLS_CC);
}
-   zend_llist_del_element(SG(sapi_headers).headers, header_line, 
(int(*)(void*, void*))sapi_find_matching_header);
+   sapi_remove_header(SG(sapi_headers).headers, header_line, 
header_line_len);
efree(header_line);
return SUCCESS;
} else {
diff --git a/sapi/cgi/tests/bug61605.phpt b/sapi/cgi/tests/bug61605.phpt
new file mode 100644
index 000..c6e4cf2
--- /dev/null
+++ b/sapi/cgi/tests/bug61605.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Bug #61605 (header_remove() does not remove all headers)
+--SKIPIF--
+?php include skipif.inc; ?
+--GET--
+foo=bar
+--FILE--
+?php
+header(A: first);
+header(A: second, TRUE);
+$headers1 = headers_list();
+header(A: third, FALSE);
+$headers2 = headers_list();
+header_remove(A);
+$headers3 = headers_list();
+print_r($headers1);
+print_r($headers2);
+print_r($headers3);
+--EXPECTF--
+Array
+(
+[0] = X-Powered-By: %s
+[1] = A: second
+)
+Array
+(
+[0] = X-Powered-By: %s
+[1] = A: second
+[2] = A: third
+)
+Array
+(
+[0] = X-Powered-By: %s
+)


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



Re: [PHP-CVS] com php-src: Bug #61566 Fileinfo ext\fileinfo\tests\finfo_file_002.phpt fails: ext/fileinfo/libmagic/cdf.c ext/fileinfo/libmagic/compress.c ext/fileinfo/libmagic/file.h ext/fileinfo/libm

2012-04-04 Thread Johannes Schlüter
On Mon, 2012-04-02 at 15:22 +, Anatoliy Belsky wrote:
 Commit:909713e233704b4ac317ff3bb397cb40a82795b8
 Author:Anatoliy Belsky a...@php.net Mon, 2 Apr 2012 17:22:46 
 +0200
 Parents:   0cdba53aae783fd63f0aa525bc92e73d9e4c0aab
 Branches:  PHP-5.3 PHP-5.4 master
 
 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=909713e233704b4ac317ff3bb397cb40a82795b8

 Changed paths:
   M  ext/fileinfo/libmagic/cdf.c
   M  ext/fileinfo/libmagic/compress.c
   M  ext/fileinfo/libmagic/file.h
   M  ext/fileinfo/libmagic/readelf.c
   M  ext/fileinfo/tests/finfo_open_001.phpt
   M  ext/fileinfo/tests/finfo_open_error.phpt

No NEWS entry?

johannes



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



Re: [PHP-CVS] com php-src: - Updated to version 2012.3 (2012c): ext/date/lib/timezonedb.h

2012-04-04 Thread Johannes Schlüter
On Mon, 2012-04-02 at 09:40 +, Derick Rethans wrote:
 Commit:0e53ac49e60b4a58a918aa311bbca405e9185fcf
 Author:Derick Rethans git...@derickrethans.nl Mon, 2 Apr 2012 
 10:40:01 +0100
 Parents:   66b3b44fd50df88139851760a2b58a8bb33ffabe
 Branches:  PHP-5.3 PHP-5.4 master
 
 Link:   
 http://git.php.net/?p=php-src.git;a=commitdiff;h=0e53ac49e60b4a58a918aa311bbca405e9185fcf
 
 Log:
 - Updated to version 2012.3 (2012c)
 
 Changed paths:
   M  ext/date/lib/timezonedb.h

No NEWS?

johannes

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



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



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

2012-04-04 Thread Johannes Schlüter
On Thu, 2012-03-29 at 10:55 +, Yasuo Ohgaki wrote:
 
 Commit:aecf5485e3af6a1e405f29f653353ae1237dbb3e
 Author:Yasuo Ohgaki yohg...@ohgaki.net Thu, 29 Mar 2012
 19:55:06 +0900
 Parents:   1d8664b90b4007b81206d39f3453eb4e7987776d
 931831bf75d645bdb9f079793b0224bb4843a7a3
 Branches:  PHP-5.4 master
 
 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=aecf5485e3af6a1e405f29f653353ae1237dbb3e
 
 Log:
 Merge branch 'PHP-5.3' into PHP-5.4
 
 * PHP-5.3:
   Fixed bug #60718 Complie problem with libpq (PostgreSQL 7.3 or less)
 
 Bugs:
 https://bugs.php.net/60718
 
 Changed paths:
   MM  ext/pgsql/pgsql.c 

Please add NEWS

johannes



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



[PHP-CVS] com php-src: Fix warning suggest parentheses around assignment: main/SAPI.c

2012-04-04 Thread Xinchen Hui
Commit:f7bf83546e1f2edb71ad05bd33e01894a359fe02
Author:Xinchen Hui larue...@gmail.com Wed, 4 Apr 2012 16:35:32 
+0800
Parents:   896c4539df4de06b4359bac9d0e6a397665e2024
Branches:  PHP-5.3

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

Log:
Fix warning suggest parentheses around assignment

Changed paths:
  M  main/SAPI.c


Diff:
diff --git a/main/SAPI.c b/main/SAPI.c
index 99142b4..e3284cf 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -618,7 +618,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void 
*arg TSRMLS_DC)
} else {
/* new line safety check */
char *s = header_line;
-   while (s = strpbrk(s, \n\r)) {
+   while ((s = strpbrk(s, \n\r))) {
if (s[1] == ' ' || s[1] == '\t') {
/* RFC 2616 allows new lines if followed by SP 
or HT */
s++;


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



Re: [PHP-CVS] com php-src: Fixed bug Fixed bug #61605 (header_remove() does not remove all headers): NEWS main/SAPI.c sapi/cgi/tests/bug61605.phpt

2012-04-04 Thread Alexey Shein
4 апреля 2012 г. 13:14 пользователь Xinchen Hui larue...@php.net написал:
 Commit:    efd671f242e87e3301a1b3e76179955f26119feb
 Author:    Xinchen Hui larue...@gmail.com         Wed, 4 Apr 2012 16:14:28 
 +0800
 Parents:   3ea9fa1b4626f6125f25d8b0bcffac7becc1d092
 Branches:  PHP-5.4

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

 Log:
 Fixed bug Fixed bug #61605 (header_remove() does not remove all headers)

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

 Changed paths:
  M  NEWS
  M  main/SAPI.c
  A  sapi/cgi/tests/bug61605.phpt


 Diff:
 diff --git a/NEWS b/NEWS
 index 6fc9126..b8b28b1 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -9,6 +9,8 @@ PHP                                                           
              NEWS
   . Connection: close instead of Connection: closed (Gustavo)

  - Core:
 +  . Fixed bug Fixed bug #61605 (header_remove() does not remove all headers).
 +    (Laruence)

Double Fixed bug (maybe you fixed it twice :) )

   . 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
 diff --git a/main/SAPI.c b/main/SAPI.c
 index 74fdbb2..0d3b4ef 100644
 --- a/main/SAPI.c
 +++ b/main/SAPI.c
 @@ -587,10 +587,36 @@ static void sapi_update_response_code(int ncode 
 TSRMLS_DC)
        SG(sapi_headers).http_response_code = ncode;
  }

 -static int sapi_find_matching_header(void *element1, void *element2)
 -{
 -       int len = strlen((char*)element2);
 -       return strncasecmp(((sapi_header_struct*)element1)-header, 
 (char*)element2, len) == 0  ((sapi_header_struct*)element1)-header[len] == 
 ':';
 +/*
 + * since zend_llist_del_element only remove one matched item once,
 + * we should remove them by ourself
 + */
 +static void sapi_remove_header(zend_llist *l, char *name, uint len) {
 +       sapi_header_struct *header;
 +       zend_llist_element *next;
 +       zend_llist_element *current=l-head;
 +
 +       while (current) {
 +               header = (sapi_header_struct *)(current-data);
 +               next = current-next;
 +               if (header-header_len  len  header-header[len] == ':'
 +                                !strncasecmp(header-header, name, len)) {
 +                       if (current-prev) {
 +                               current-prev-next = next;
 +                       } else {
 +                               l-head = next;
 +                       }
 +                       if (next) {
 +                               next-prev = current-prev;
 +                       } else {
 +                               l-tail = current-prev;
 +                       }
 +                       sapi_free_header(header);
 +                       efree(current);
 +                       --l-count;
 +               }
 +               current = next;
 +       }
  }

  SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, 
 zend_bool duplicate, zend_bool replace TSRMLS_DC)
 @@ -621,7 +647,7 @@ static void sapi_header_add_op(sapi_header_op_enum op, 
 sapi_header_struct *sapi_
                                char sav = *colon_offset;

                                *colon_offset = 0;
 -                               
 zend_llist_del_element(SG(sapi_headers).headers, sapi_header-header, 
 (int(*)(void*, void*))sapi_find_matching_header);
 +                       sapi_remove_header(SG(sapi_headers).headers, 
 sapi_header-header, strlen(sapi_header-header));
                                *colon_offset = sav;
                        }
                }
 @@ -703,7 +729,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void 
 *arg TSRMLS_DC)
                        sapi_header.header_len = header_line_len;
                        sapi_module.header_handler(sapi_header, op, 
 SG(sapi_headers) TSRMLS_CC);
                }
 -               zend_llist_del_element(SG(sapi_headers).headers, 
 header_line, (int(*)(void*, void*))sapi_find_matching_header);
 +               sapi_remove_header(SG(sapi_headers).headers, header_line, 
 header_line_len);
                efree(header_line);
                return SUCCESS;
        } else {
 diff --git a/sapi/cgi/tests/bug61605.phpt b/sapi/cgi/tests/bug61605.phpt
 new file mode 100644
 index 000..c6e4cf2
 --- /dev/null
 +++ b/sapi/cgi/tests/bug61605.phpt
 @@ -0,0 +1,34 @@
 +--TEST--
 +Bug #61605 (header_remove() does not remove all headers)
 +--SKIPIF--
 +?php include skipif.inc; ?
 +--GET--
 +foo=bar
 +--FILE--
 +?php
 +header(A: first);
 +header(A: second, TRUE);
 +$headers1 = headers_list();
 +header(A: third, FALSE);
 +$headers2 = headers_list();
 +header_remove(A);
 +$headers3 = headers_list();
 +print_r($headers1);
 +print_r($headers2);
 +print_r($headers3);
 +--EXPECTF--
 +Array
 +(
 +    [0] = X-Powered-By: %s
 +    [1] = A: second
 +)
 +Array
 +(
 +    [0] = X-Powered-By: %s
 +    [1] = A: second
 +    [2] = A: third
 +)
 +Array
 +(
 +  

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

2012-04-04 Thread Yasuo Ohgaki
Hi,

Thanks for notifying.
I'll add NEWS for branches later.

The commit log has 2 diffs and one of them is mine, but
other is not. The commit seems valid and rather old one,
since it removing magic_quotes related code.

This commit was done right after I've setup multiple
workdir. I don't know how this happened while I was
following the workflow.

Anyway, are you okay with new PGSQL_LIBPQ_VERSIONS*
constants for 5.3? Then I'll commit it first.

Regards,

--
Yasuo Ohgaki
yohg...@ohgaki.net



2012/4/4 Johannes Schlüter johan...@schlueters.de:
 On Thu, 2012-03-29 at 10:55 +, Yasuo Ohgaki wrote:

 Commit:    aecf5485e3af6a1e405f29f653353ae1237dbb3e
 Author:    Yasuo Ohgaki yohg...@ohgaki.net         Thu, 29 Mar 2012
 19:55:06 +0900
 Parents:   1d8664b90b4007b81206d39f3453eb4e7987776d
 931831bf75d645bdb9f079793b0224bb4843a7a3
 Branches:  PHP-5.4 master

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

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

 * PHP-5.3:
   Fixed bug #60718 Complie problem with libpq (PostgreSQL 7.3 or less)

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

 Changed paths:
   MM  ext/pgsql/pgsql.c

 Please add NEWS

 johannes



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



Re: [PHP-CVS] com php-src: Fixed bug Fixed bug #61605 (header_remove() does not remove all headers): NEWS main/SAPI.c sapi/cgi/tests/bug61605.phpt

2012-04-04 Thread Laruence
On Wed, Apr 4, 2012 at 4:54 PM, Alexey Shein con...@gmail.com wrote:
 4 апреля 2012 г. 13:14 пользователь Xinchen Hui larue...@php.net написал:
 Commit:    efd671f242e87e3301a1b3e76179955f26119feb
 Author:    Xinchen Hui larue...@gmail.com         Wed, 4 Apr 2012 16:14:28 
 +0800
 Parents:   3ea9fa1b4626f6125f25d8b0bcffac7becc1d092
 Branches:  PHP-5.4

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

 Log:
 Fixed bug Fixed bug #61605 (header_remove() does not remove all headers)

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

 Changed paths:
  M  NEWS
  M  main/SAPI.c
  A  sapi/cgi/tests/bug61605.phpt


 Diff:
 diff --git a/NEWS b/NEWS
 index 6fc9126..b8b28b1 100644
 --- a/NEWS
 +++ b/NEWS
 @@ -9,6 +9,8 @@ PHP                                                          
               NEWS
   . Connection: close instead of Connection: closed (Gustavo)

  - Core:
 +  . Fixed bug Fixed bug #61605 (header_remove() does not remove all 
 headers).
 +    (Laruence)

 Double Fixed bug (maybe you fixed it twice :) )

   . 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
 diff --git a/main/SAPI.c b/main/SAPI.c
 index 74fdbb2..0d3b4ef 100644
 --- a/main/SAPI.c
 +++ b/main/SAPI.c
 @@ -587,10 +587,36 @@ static void sapi_update_response_code(int ncode 
 TSRMLS_DC)
        SG(sapi_headers).http_response_code = ncode;
  }

 -static int sapi_find_matching_header(void *element1, void *element2)
 -{
 -       int len = strlen((char*)element2);
 -       return strncasecmp(((sapi_header_struct*)element1)-header, 
 (char*)element2, len) == 0  ((sapi_header_struct*)element1)-header[len] 
 == ':';
 +/*
 + * since zend_llist_del_element only remove one matched item once,
 + * we should remove them by ourself
 + */
 +static void sapi_remove_header(zend_llist *l, char *name, uint len) {
 +       sapi_header_struct *header;
 +       zend_llist_element *next;
 +       zend_llist_element *current=l-head;
 +
 +       while (current) {
 +               header = (sapi_header_struct *)(current-data);
 +               next = current-next;
 +               if (header-header_len  len  header-header[len] == ':'
 +                                !strncasecmp(header-header, name, len)) {
 +                       if (current-prev) {
 +                               current-prev-next = next;
 +                       } else {
 +                               l-head = next;
 +                       }
 +                       if (next) {
 +                               next-prev = current-prev;
 +                       } else {
 +                               l-tail = current-prev;
 +                       }
 +                       sapi_free_header(header);
 +                       efree(current);
 +                       --l-count;
 +               }
 +               current = next;
 +       }
  }

  SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, 
 zend_bool duplicate, zend_bool replace TSRMLS_DC)
 @@ -621,7 +647,7 @@ static void sapi_header_add_op(sapi_header_op_enum op, 
 sapi_header_struct *sapi_
                                char sav = *colon_offset;

                                *colon_offset = 0;
 -                               
 zend_llist_del_element(SG(sapi_headers).headers, sapi_header-header, 
 (int(*)(void*, void*))sapi_find_matching_header);
 +                       sapi_remove_header(SG(sapi_headers).headers, 
 sapi_header-header, strlen(sapi_header-header));
                                *colon_offset = sav;
                        }
                }
 @@ -703,7 +729,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void 
 *arg TSRMLS_DC)
                        sapi_header.header_len = header_line_len;
                        sapi_module.header_handler(sapi_header, op, 
 SG(sapi_headers) TSRMLS_CC);
                }
 -               zend_llist_del_element(SG(sapi_headers).headers, 
 header_line, (int(*)(void*, void*))sapi_find_matching_header);
 +               sapi_remove_header(SG(sapi_headers).headers, header_line, 
 header_line_len);
                efree(header_line);
                return SUCCESS;
        } else {
 diff --git a/sapi/cgi/tests/bug61605.phpt b/sapi/cgi/tests/bug61605.phpt
 new file mode 100644
 index 000..c6e4cf2
 --- /dev/null
 +++ b/sapi/cgi/tests/bug61605.phpt
 @@ -0,0 +1,34 @@
 +--TEST--
 +Bug #61605 (header_remove() does not remove all headers)
 +--SKIPIF--
 +?php include skipif.inc; ?
 +--GET--
 +foo=bar
 +--FILE--
 +?php
 +header(A: first);
 +header(A: second, TRUE);
 +$headers1 = headers_list();
 +header(A: third, FALSE);
 +$headers2 = headers_list();
 +header_remove(A);
 +$headers3 = headers_list();
 +print_r($headers1);
 +print_r($headers2);
 +print_r($headers3);
 +--EXPECTF--
 +Array
 +(
 +    [0] = X-Powered-By: %s
 +    [1] = A: second
 +)
 +Array
 +(
 +    [0] = 

Re: [PHP-CVS] com php-src: - Updated to version 2012.3 (2012c): ext/date/lib/timezonedb.h

2012-04-04 Thread Derick Rethans
On Wed, 4 Apr 2012, Johannes Schlüter wrote:

 On Mon, 2012-04-02 at 09:40 +, Derick Rethans wrote:
  Commit:0e53ac49e60b4a58a918aa311bbca405e9185fcf
  Author:Derick Rethans git...@derickrethans.nl Mon, 2 Apr 2012 
  10:40:01 +0100
  Parents:   66b3b44fd50df88139851760a2b58a8bb33ffabe
  Branches:  PHP-5.3 PHP-5.4 master
  
  Link:   
  http://git.php.net/?p=php-src.git;a=commitdiff;h=0e53ac49e60b4a58a918aa311bbca405e9185fcf
  
  Log:
  - Updated to version 2012.3 (2012c)
  
  Changed paths:
M  ext/date/lib/timezonedb.h
 
 No NEWS?

We've never put this in NEWS AFAIK. It's like a transient thing that 
happens all the time. Every PHP release should always have the latest 
timezonedb as of that moment as well. Also, adding it to NEWS is 
difficult to automate :-)

cheers,
Derick
-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-CVS] com php-src: Fixed bug Fixed bug #61605 (header_remove() does not remove all headers): NEWS main/SAPI.c sapi/cgi/tests/bug61605.phpt

2012-04-04 Thread Alexey Shein
4 апреля 2012 г. 14:03 пользователь Laruence larue...@php.net написал:
 seems right here https://github.com/php/php-src/network..

 maybe the ci message is wrong.

 thanks

CI is out of business here.
It seems you had a conflict when merging into master, please correct
NEWS file in PHP-5.4 branch:
https://github.com/php/php-src/commit/efd671f242e87e3301a1b3e76179955f26119feb
Thank you.

-- 
Regards,
Shein Alexey

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



Re: [PHP-CVS] com php-src: Fixed bug Fixed bug #61605 (header_remove() does not remove all headers): NEWS main/SAPI.c sapi/cgi/tests/bug61605.phpt

2012-04-04 Thread Ferenc Kovacs


 seems right here https://github.com/php/php-src/network..

 maybe the ci message is wrong.

 thanks


nope:
https://github.com/php/php-src/blob/PHP-5.4/NEWS#L12
https://github.com/php/php-src/commit/efd671f242e87e3301a1b3e76179955f26119feb

Fixed bug Fixed bug #61605 should be Fixed bug #61605

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu


[PHP-CVS] com php-src: Fixed bug #61617 (Libxml tests failed(ht is already destroyed)): NEWS ext/libxml/libxml.c

2012-04-04 Thread Xinchen Hui
Commit:94f1c05ff8f83b2130de21683c5c2bd3af7e065c
Author:Xinchen Hui larue...@php.net Wed, 4 Apr 2012 17:22:37 +0800
Parents:   ca58cd01fc329f907a13b82370427715d9c5bf70
Branches:  PHP-5.3

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

Log:
Fixed bug #61617 (Libxml tests failed(ht is already destroyed))

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

Changed paths:
  M  NEWS
  M  ext/libxml/libxml.c


Diff:
diff --git a/NEWS b/NEWS
index cfa1dba..8d5afeb 100644
--- a/NEWS
+++ b/NEWS
@@ -68,6 +68,8 @@ PHP   
 NEWS
   . Fixed bug #60802 (ibase_trans() gives segfault when passing params).
 
 - Libxml:
+  . Fixed bug #61617 (Libxml tests failed(ht is already destroyed)).
+(Laruence)
   . Fixed bug #61367 (open_basedir bypass using libxml RSHUTDOWN). 
 (Tim Starling)
 
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index 515d58e..a178478 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -666,7 +666,8 @@ static int php_libxml_post_deactivate()
xmlOutputBufferCreateFilenameDefault(NULL);
 
if (LIBXML(stream_context)) {
-   zval_ptr_dtor(LIBXML(stream_context));
+   /* the steam_context resource will be released by resource list 
destructor */
+   efree(LIBXML(stream_context));
LIBXML(stream_context) = NULL;
}
smart_str_free(LIBXML(error_buffer));


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



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

2012-04-04 Thread Xinchen Hui
Commit:1ff80215190e0746d89c5502c232e26c6fabe5d4
Author:Xinchen Hui larue...@php.net Wed, 4 Apr 2012 17:36:18 +0800
Parents:   9882358984709539a3aa5228ef95843da52c7d7b 
94f1c05ff8f83b2130de21683c5c2bd3af7e065c
Branches:  PHP-5.4

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

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

* PHP-5.3:
  Fixed bug #61617 (Libxml tests failed(ht is already destroyed))
  Cherry-pick 4cc74767

Conflicts:
NEWS

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

Changed paths:
  MM  ext/libxml/libxml.c


Diff:
diff --cc ext/libxml/libxml.c
index 9d6c257,a178478..e42d845
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@@ -865,16 -659,15 +865,17 @@@ static int php_libxml_post_deactivate(
  {
TSRMLS_FETCH();
/* reset libxml generic error handling */
 -  xmlSetGenericErrorFunc(NULL, NULL);
 -  xmlSetStructuredErrorFunc(NULL, NULL);
 +  if (_php_libxml_per_request_initialization) {
 +  xmlSetGenericErrorFunc(NULL, NULL);
 +  xmlSetStructuredErrorFunc(NULL, NULL);
  
 -  xmlParserInputBufferCreateFilenameDefault(NULL);
 -  xmlOutputBufferCreateFilenameDefault(NULL);
 +  xmlParserInputBufferCreateFilenameDefault(NULL);
 +  xmlOutputBufferCreateFilenameDefault(NULL);
 +  }
  
if (LIBXML(stream_context)) {
-   zval_ptr_dtor(LIBXML(stream_context));
+   /* the steam_context resource will be released by resource list 
destructor */
+   efree(LIBXML(stream_context));
LIBXML(stream_context) = NULL;
}
smart_str_free(LIBXML(error_buffer));


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



[PHP-CVS] com php-src: Update NEWS for #61617: NEWS

2012-04-04 Thread Xinchen Hui
Commit:1215665bb435ba619a17414cd832dc364d6fb9e4
Author:Xinchen Hui larue...@php.net Wed, 4 Apr 2012 17:38:43 +0800
Parents:   1ff80215190e0746d89c5502c232e26c6fabe5d4
Branches:  PHP-5.4

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

Log:
Update NEWS for #61617

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

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index b8b28b1..9f5898e 100644
--- a/NEWS
+++ b/NEWS
@@ -57,6 +57,10 @@ PHP  
  NEWS
   . Fixed bug #61487 (Incorrent bounds checking in grapheme_strpos).
 (Stas)
 
+- Libxml:
+  . Fixed bug #61617 (Libxml tests failed(ht is already destroyed)).
+(Laruence)
+
 - mbstring:
   . MFH mb_ereg_replace_callback() for security enhancements. (Rui)


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



[PHP-CVS] com php-src: fix typo: NEWS

2012-04-04 Thread Xinchen Hui
Commit:7cccb6bc5a377bdd91321202e4970dfaf394c60b
Author:Xinchen Hui larue...@php.net Wed, 4 Apr 2012 17:41:25 +0800
Parents:   1215665bb435ba619a17414cd832dc364d6fb9e4
Branches:  PHP-5.4

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

Log:
fix typo

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index 9f5898e..23bb363 100644
--- a/NEWS
+++ b/NEWS
@@ -9,8 +9,7 @@ PHP 
   NEWS
   . Connection: close instead of Connection: closed (Gustavo)
 
 - Core:
-  . Fixed bug Fixed bug #61605 (header_remove() does not remove all headers).
-(Laruence)
+  . Fixed bug #61605 (header_remove() does not remove all headers). (Laruence)
   . 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


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



Re: [PHP-CVS] com php-src: Fixed bug Fixed bug #61605 (header_remove() does not remove all headers): NEWS main/SAPI.c sapi/cgi/tests/bug61605.phpt

2012-04-04 Thread Xinchen Hui
Sent from my iPhone

在 2012-4-4,17:13,Ferenc Kovacs tyr...@gmail.com 写道:


 seems right here https://github.com/php/php-src/network..

 maybe the ci message is wrong.

 thanks


nope:
https://github.com/php/php-src/blob/PHP-5.4/NEWS#L12
https://github.com/php/php-src/commit/efd671f242e87e3301a1b3e76179955f26119feb

Fixed bug Fixed bug #61605 should be Fixed bug #61605

fixed, thanks

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu


[PHP-CVS] com php-src: updated the NEWS with the latest fileinfo changes: NEWS

2012-04-04 Thread Anatoliy Belsky
Commit:db834fc46046142b6a153b577bbd3112ed75fe54
Author:Anatoliy Belsky a...@php.net Wed, 4 Apr 2012 12:36:34 +0200
Parents:   94f1c05ff8f83b2130de21683c5c2bd3af7e065c
Branches:  PHP-5.3

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

Log:
updated the NEWS with the latest fileinfo changes

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index 8d5afeb..6eff5c3 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,12 @@ PHP
NEWS
 when another extension makes use of a library that links to the iconv
 library. See https://bugs.gentoo.org/show_bug.cgi?id=364139 for detail.
 (Moriyoshi)
+- Fileinfo
+  . Upgraded libmagic to 5.11 (Pierre, Anatoliy) 
+  . Fixed bug #61565 where php_stream_open_wrapper_ex tries to open a
+directory descriptor under windows. (Anatoliy)
+  . Fixed bug #61566 failure caused by the posix lseek and read versions
+under windows in cdf_read(). (Anatoliy)
 
 (merge after 5.3.11 release)


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



Re: [PHP-CVS] com php-src: Bug #61566 Fileinfo ext\fileinfo\tests\finfo_file_002.phpt fails: ext/fileinfo/libmagic/cdf.c ext/fileinfo/libmagic/compress.c ext/fileinfo/libmagic/file.h ext/fileinfo/libm

2012-04-04 Thread Anatoliy Belsky
Hi Johannes,

i've just updated the NEWS on the 5.3 branch

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

Regards

Anatoliy

Am Mi, 4.04.2012, 10:23 schrieb Johannes Schlüter:
 On Mon, 2012-04-02 at 15:22 +, Anatoliy Belsky wrote:
 Commit:909713e233704b4ac317ff3bb397cb40a82795b8
 Author:Anatoliy Belsky a...@php.net Mon, 2 Apr 2012 17:22:46
 +0200
 Parents:   0cdba53aae783fd63f0aa525bc92e73d9e4c0aab
 Branches:  PHP-5.3 PHP-5.4 master

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

 Changed paths:
   M  ext/fileinfo/libmagic/cdf.c
   M  ext/fileinfo/libmagic/compress.c
   M  ext/fileinfo/libmagic/file.h
   M  ext/fileinfo/libmagic/readelf.c
   M  ext/fileinfo/tests/finfo_open_001.phpt
   M  ext/fileinfo/tests/finfo_open_error.phpt

 No NEWS entry?

 johannes






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



[PHP-CVS] com karma: fix double bugs: lib/Git/PostReceiveHook.php

2012-04-04 Thread Alexander Moskaliov
Commit:e7cb7e7acfaa66261f38a3f8047e09e59b2e0413
Author:Alexander Moskaliov ir...@php.net Wed, 4 Apr 2012 16:37:31 
+0400
Parents:   a103092576b8d9d7ade835308e8d12ff130a59cf
Branches:  master

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

Log:
fix double bugs

Changed paths:
  M  lib/Git/PostReceiveHook.php


Diff:
diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php
index 77396d4..e331101 100644
--- a/lib/Git/PostReceiveHook.php
+++ b/lib/Git/PostReceiveHook.php
@@ -486,7 +486,7 @@ class PostReceiveHook extends ReceiveHook
 $bugs = [];
 if 
(preg_match_all('/(?:(pecl|pear|php)\s*)?(?:bug|#)[\s#:]*([0-9]+)/iuX', $log, 
$matchedBugs, PREG_SET_ORDER)) {
 foreach($matchedBugs as $bug) {
-$bugs[] = $bugUrlPrefixes[$bug[1]] . $bug[2];
+$bugs[$bug[2]] = $bugUrlPrefixes[$bug[1]] . $bug[2];
 }
 }
 return $bugs;


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



[PHP-CVS] com karma: fix user: hooks/commit-bugs.php hooks/post-receive.bugsweb

2012-04-04 Thread Alexander Moskaliov
Commit:61cc09b1cbe8e3dcec3cf6b0447d942755c85a7c
Author:Alexander Moskaliov ir...@php.net Wed, 4 Apr 2012 17:17:51 
+0400
Parents:   e7cb7e7acfaa66261f38a3f8047e09e59b2e0413
Branches:  master

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

Log:
fix user

Changed paths:
  M  hooks/commit-bugs.php
  M  hooks/post-receive.bugsweb


Diff:
diff --git a/hooks/commit-bugs.php b/hooks/commit-bugs.php
index df5b913..0995822 100644
--- a/hooks/commit-bugs.php
+++ b/hooks/commit-bugs.php
@@ -64,7 +64,7 @@ foreach ($bug_list as $k = $bug) {
Log: {$commit_info['log_message']}\n;
 
 $postdata = array(
-'user' = $commit_info['author'],
+'user' = $commit_info['user'],
 'id' = $bug['number'],
 'ncomment' = $comment,
 'MAGIC_COOKIE' = $SVN_MAGIC_COOKIE,
diff --git a/hooks/post-receive.bugsweb b/hooks/post-receive.bugsweb
index cc91c4a..fc95c13 100755
--- a/hooks/post-receive.bugsweb
+++ b/hooks/post-receive.bugsweb
@@ -67,6 +67,7 @@ foreach ($rpath as $commit) {
 $commit_info['log_message'] = $commitMsg;
 $commit_info['author'] = $committer;
 $commit_info['author'] = preg_replace(#@php\.net$#, , $committer);
+$commit_info['user'] = $user;
 $viewvc_url_prefix = sprintf(
 'http://git.php.net/?p=%s;a=commit;h=',
 $hook-getRepositoryName()


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



[PHP-CVS] com php-src: Fix bug #61480 test bug - ext/gd/tests/bug48555.phpt: ext/gd/tests/bug48555.phpt

2012-04-04 Thread Anatoliy Belsky
Commit:381edb425e16bd5d472c84d757465aa42cb39d0f
Author:Matt Ficken mattfic...@php.net Wed, 4 Apr 2012 18:39:24 
+0200
Committer: Anatoliy Belsky a...@php.net  Wed, 4 Apr 2012 18:39:24 +0200
Parents:   db834fc46046142b6a153b577bbd3112ed75fe54
Branches:  PHP-5.3 PHP-5.4 master

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

Log:
Fix bug #61480 test bug - ext/gd/tests/bug48555.phpt

Bugs:
https://bugs.php.net/61480
https://bugs.php.net/48555

Changed paths:
  M  ext/gd/tests/bug48555.phpt


Diff:
diff --git a/ext/gd/tests/bug48555.phpt b/ext/gd/tests/bug48555.phpt
index f2030fe..d378aaf 100644
--- a/ext/gd/tests/bug48555.phpt
+++ b/ext/gd/tests/bug48555.phpt
@@ -10,10 +10,22 @@ Bug #48555 (ImageFTBBox() differs from previous versions 
for texts with new line
 $cwd = dirname(__FILE__);
 $font = $cwd/Tuffy.ttf;
 $box = ImageFTBBox(14, 0, $font, Text without line-break);
-echo 'Top without line-break: ' . $box[7] . \n;
+//echo 'Top without line-break: ' . $box[7] . \n;
+$without_line_break = $box[7];
 $box = ImageFTBBox(14, 0, $font, Text with\nline-break\none more);
-echo 'Top with line-break: ' . $box[7] . \n;
+//echo 'Top with line-break: ' . $box[7] . \n;
+$with_line_break = $box[7];
+
+var_dump($without_line_break);
+var_dump($with_line_break);
+if ($with_line_break==$without_line_break) {
+  echo with line break == without line break.PHP_EOL;
+} else {
+  echo with line break != without line break.PHP_EOL;
+}
+
 ?
 --EXPECTF--
-Top without line-break: -14
-Top with line-break: -14
+int(-%d)
+int(-%d)
+with line break == without line break


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