[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2009-04-28 Thread changelog
changelog   Wed Apr 29 01:32:46 2009 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3387r2=1.3388diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.3387 php-src/ChangeLog:1.3388
--- php-src/ChangeLog:1.3387Tue Apr 28 01:32:54 2009
+++ php-src/ChangeLog   Wed Apr 29 01:32:44 2009
@@ -1,3 +1,100 @@
+2009-04-28  Felipe Pena  felipe...@gmail.com
+
+* tests/classes/inheritance_007.phpt
+  tests/classes/inheritance_007.phpt
+  tests/classes/inheritance_007.phpt:
+  - Fix test
+
+2009-04-28  Stanislav Malyshev  s...@zend.com
+
+* ext/filter/filter.c
+  main/SAPI.c
+  main/SAPI.h
+  main/php_content_types.c:
+  MF5 fix for #47930
+
+2009-04-28  Ilia Alshanetsky  i...@prohost.org
+
+* (PHP_5_2)
+  NEWS
+  ext/standard/basic_functions.c
+  ext/standard/basic_functions.c
+  ext/standard/tests/network/ip2long_variation1.phpt
+  ext/standard/tests/network/ip2long_variation1.phpt:
+  
+  MFB: Fixed bug #47365 (ip2long() may allow some invalid values on certain
+  64bit systems)
+
+* (PHP_5_3)
+  ext/standard/basic_functions.c
+  ext/standard/tests/network/ip2long_variation1.phpt:
+  
+  Fixed bug #47365 (ip2long() may allow some invalid values on certain 
64bit
+  systems)
+
+2009-04-28  Stanislav Malyshev  s...@zend.com
+
+* (PHP_5_3)
+  ext/filter/filter.c
+  main/SAPI.c
+  main/SAPI.h
+  main/php_content_types.c:
+  fix for #47930
+
+2009-04-28  Greg Beaver  g...@chiaraquartet.net
+
+* ext/phar/tests/fatal_error_webphar.phpt
+  ext/phar/tests/fatal_error_webphar.phpt
+  ext/phar/tests/files/pear2coverage.phar.php
+  ext/phar/tests/files/pear2coverage.phar.php:
+  
+  file fatal_error_webphar.phpt was initially added on branch PHP_5_3.
+
+2009-04-28  Pierre-Alain Joye  pierre@gmail.com
+
+* (PHP_5_2)
+  NEWS:
+  - mail_criteria entry and revert previous wrong one
+
+2009-04-28  Antony Dovgal  t...@daylessday.org
+
+* ext/standard/tests/strings/strcoll.phpt
+  ext/standard/tests/strings/strcoll.phpt
+  ext/standard/tests/strings/strcoll.phpt
+  tests/classes/inheritance_007.phpt:
+  fix test
+
+* (PHP_5_2)
+  tests/classes/inheritance_007.phpt:
+  nuke unicode crap, fix test
+
+2009-04-28  Pierre-Alain Joye  pierre@gmail.com
+
+* ext/imap/php_imap.c
+  ext/imap/php_imap.c
+  ext/imap/php_imap.c:
+  - space to tabs
+  - CS
+
+* ext/imap/php_imap.c
+  ext/imap/php_imap.h:
+  - [DOC] MFB: add imap_gc (purge cache(s) and constants IMAP_GC_ELT,
+  IMAP_GC_ENV and IMAP_GC_TEXTS to control imap_gc behavior
+
+* (PHP_5_3)
+  ext/imap/php_imap.c
+  ext/imap/php_imap.h:
+  - [DOC] add imap_gc (purge cache(s) and constants IMAP_GC_ELT, 
IMAP_GC_ENV
+  and IMAP_GC_TEXTS to control imap_gc behavior
+
+2009-04-28  Dmitry Stogov  dmi...@zend.com
+
+* (PHP_5_3)
+  NEWS
+  main/main.c
+  main/main.c:
+  Fixed bug #48034 (PHP crashes when script is 8192 (8KB) bytes long)
+
 2009-04-27  Ilia Alshanetsky  i...@prohost.org
 
 * (PHP_5_3)
@@ -37682,7 +37779,7 @@
 
 * sapi/litespeed/lsapi_main.c
   sapi/litespeed/lsapilib.c:
-  - Added missing $Id: ChangeLog,v 1.3387 2009/04/28 01:32:54 changelog 
Exp $ tags and nuked c++ comments
+  - Added missing $Id: ChangeLog,v 1.3388 2009/04/29 01:32:44 changelog 
Exp $ tags and nuked c++ comments
 
 * (PHP_5_3)
   ext/intl/locale/locale.c




[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /main main.c

2009-04-28 Thread Dmitry Stogov
dmitry  Tue Apr 28 07:13:31 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/main   main.c 
  Log:
  Fixed bug #48034 (PHP crashes when script is 8192 (8KB) bytes long)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.570r2=1.2027.2.547.2.965.2.571diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.570 
php-src/NEWS:1.2027.2.547.2.965.2.571
--- php-src/NEWS:1.2027.2.547.2.965.2.570   Mon Apr 27 18:45:12 2009
+++ php-src/NEWSTue Apr 28 07:13:30 2009
@@ -17,6 +17,7 @@
 
 - Fixed bug #48087 (call_user_method() invalid free of arguments). (Felipe)
 - Fixed bug #48060 (pdo_pgsql - large objects are returned as empty). (Matteo)
+- Fixed bug #48034 (PHP crashes when script is 8192 (8KB) bytes long). (Dmitry)
 - Fixed bug #48023 (spl_autoload_register didn't store closures). (Etienne)
 - Fixed bug #48004 (Error handler prevents creation of default object).
   (Dmitry)
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.47r2=1.640.2.23.2.57.2.48diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.47 
php-src/main/main.c:1.640.2.23.2.57.2.48
--- php-src/main/main.c:1.640.2.23.2.57.2.47Fri Mar 27 02:34:06 2009
+++ php-src/main/main.c Tue Apr 28 07:13:30 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.47 2009/03/27 02:34:06 lbarnaud Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.48 2009/04/28 07:13:30 dmitry Exp $ */
 
 /* {{{ includes
  */
@@ -89,6 +89,13 @@
 
 #include SAPI.h
 #include rfc1867.h
+
+#if HAVE_SYS_MMAN_H
+# include sys/mman.h
+# ifndef PAGE_SIZE
+#  define PAGE_SIZE 4096
+# endif
+#endif
 /* }}} */
 
 PHPAPI int (*php_register_internal_extensions_func)(TSRMLS_D) = 
php_register_internal_extensions;
@@ -1134,8 +1141,10 @@
handle-handle.stream.isatty  = 0;
/* can we mmap immeadiately? */
memset(handle-handle.stream.mmap, 0, 
sizeof(handle-handle.stream.mmap));
-   len = php_zend_stream_fsizer(stream TSRMLS_CC) + 
ZEND_MMAP_AHEAD;
-   if (php_stream_mmap_possible(stream)
+   len = php_zend_stream_fsizer(stream TSRMLS_CC);
+   if (len != 0
+((len - 1) % PAGE_SIZE) = PAGE_SIZE - ZEND_MMAP_AHEAD
+php_stream_mmap_possible(stream)
 (p = php_stream_mmap_range(stream, 0, len, 
PHP_STREAM_MAP_MODE_SHARED_READONLY, mapped_len)) != NULL) {
handle-handle.stream.closer   = 
php_zend_stream_mmap_closer;
handle-handle.stream.mmap.buf = p;



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



[PHP-CVS] cvs: php-src /main main.c

2009-04-28 Thread Dmitry Stogov
dmitry  Tue Apr 28 07:13:44 2009 UTC

  Modified files:  
/php-src/main   main.c 
  Log:
  Fixed bug #48034 (PHP crashes when script is 8192 (8KB) bytes long)
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.795r2=1.796diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.795 php-src/main/main.c:1.796
--- php-src/main/main.c:1.795   Fri Mar 27 02:33:44 2009
+++ php-src/main/main.c Tue Apr 28 07:13:43 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.795 2009/03/27 02:33:44 lbarnaud Exp $ */
+/* $Id: main.c,v 1.796 2009/04/28 07:13:43 dmitry Exp $ */
 
 /* {{{ includes
  */
@@ -89,6 +89,13 @@
 
 #include SAPI.h
 #include rfc1867.h
+
+#if HAVE_SYS_MMAN_H
+# include sys/mman.h
+# ifndef PAGE_SIZE
+#  define PAGE_SIZE 4096
+# endif
+#endif
 /* }}} */
 
 PHPAPI int (*php_register_internal_extensions_func)(TSRMLS_D) = 
php_register_internal_extensions;
@@ -1237,8 +1244,10 @@
handle-handle.stream.isatty  = 0;
/* can we mmap immeadiately? */
memset(handle-handle.stream.mmap, 0, 
sizeof(handle-handle.stream.mmap));
-   len = php_zend_stream_fsizer(stream TSRMLS_CC) + 
ZEND_MMAP_AHEAD;
-   if (php_stream_mmap_possible(stream)
+   len = php_zend_stream_fsizer(stream TSRMLS_CC);
+   if (len != 0
+((len - 1) % PAGE_SIZE) = PAGE_SIZE - ZEND_MMAP_AHEAD
+php_stream_mmap_possible(stream)
 (p = php_stream_mmap_range(stream, 0, len, 
PHP_STREAM_MAP_MODE_SHARED_READONLY, mapped_len)) != NULL) {
handle-handle.stream.closer   = 
php_zend_stream_mmap_closer;
handle-handle.stream.mmap.buf = p;



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /main main.c

2009-04-28 Thread Dmitry Stogov

Hi,

This patch should be removed when re2c EOF handling issue will be resolved.

Thanks. Dmitry.

Dmitry Stogov wrote:

dmitry  Tue Apr 28 07:13:31 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src	NEWS 
/php-src/main	main.c 
  Log:

  Fixed bug #48034 (PHP crashes when script is 8192 (8KB) bytes long)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.570r2=1.2027.2.547.2.965.2.571diff_format=u

Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.570 
php-src/NEWS:1.2027.2.547.2.965.2.571
--- php-src/NEWS:1.2027.2.547.2.965.2.570   Mon Apr 27 18:45:12 2009
+++ php-src/NEWSTue Apr 28 07:13:30 2009
@@ -17,6 +17,7 @@
 
 - Fixed bug #48087 (call_user_method() invalid free of arguments). (Felipe)

 - Fixed bug #48060 (pdo_pgsql - large objects are returned as empty). (Matteo)
+- Fixed bug #48034 (PHP crashes when script is 8192 (8KB) bytes long). (Dmitry)
 - Fixed bug #48023 (spl_autoload_register didn't store closures). (Etienne)
 - Fixed bug #48004 (Error handler prevents creation of default object).
   (Dmitry)
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.47r2=1.640.2.23.2.57.2.48diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.47 
php-src/main/main.c:1.640.2.23.2.57.2.48
--- php-src/main/main.c:1.640.2.23.2.57.2.47Fri Mar 27 02:34:06 2009
+++ php-src/main/main.c Tue Apr 28 07:13:30 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.47 2009/03/27 02:34:06 lbarnaud Exp $ */

+/* $Id: main.c,v 1.640.2.23.2.57.2.48 2009/04/28 07:13:30 dmitry Exp $ */
 
 /* {{{ includes

  */
@@ -89,6 +89,13 @@
 
 #include SAPI.h

 #include rfc1867.h
+
+#if HAVE_SYS_MMAN_H
+# include sys/mman.h
+# ifndef PAGE_SIZE
+#  define PAGE_SIZE 4096
+# endif
+#endif
 /* }}} */
 
 PHPAPI int (*php_register_internal_extensions_func)(TSRMLS_D) = php_register_internal_extensions;

@@ -1134,8 +1141,10 @@
handle-handle.stream.isatty  = 0;
/* can we mmap immeadiately? */
memset(handle-handle.stream.mmap, 0, 
sizeof(handle-handle.stream.mmap));
-   len = php_zend_stream_fsizer(stream TSRMLS_CC) + 
ZEND_MMAP_AHEAD;
-   if (php_stream_mmap_possible(stream)
+   len = php_zend_stream_fsizer(stream TSRMLS_CC);
+   if (len != 0
+((len - 1) % PAGE_SIZE) = PAGE_SIZE - ZEND_MMAP_AHEAD
+php_stream_mmap_possible(stream)
 (p = php_stream_mmap_range(stream, 0, len, 
PHP_STREAM_MAP_MODE_SHARED_READONLY, mapped_len)) != NULL) {
handle-handle.stream.closer   = 
php_zend_stream_mmap_closer;
handle-handle.stream.mmap.buf = p;





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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /main main.c

2009-04-28 Thread Jani Taskinen


In that bug report the user said PHP 5.2.9 is also affected. So can you please 
MFH there too? :)


--Jani



Dmitry Stogov kirjoitti:

dmitry  Tue Apr 28 07:13:31 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src	NEWS 
/php-src/main	main.c 
  Log:

  Fixed bug #48034 (PHP crashes when script is 8192 (8KB) bytes long)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.570r2=1.2027.2.547.2.965.2.571diff_format=u

Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.570 
php-src/NEWS:1.2027.2.547.2.965.2.571
--- php-src/NEWS:1.2027.2.547.2.965.2.570   Mon Apr 27 18:45:12 2009
+++ php-src/NEWSTue Apr 28 07:13:30 2009
@@ -17,6 +17,7 @@
 
 - Fixed bug #48087 (call_user_method() invalid free of arguments). (Felipe)

 - Fixed bug #48060 (pdo_pgsql - large objects are returned as empty). (Matteo)
+- Fixed bug #48034 (PHP crashes when script is 8192 (8KB) bytes long). (Dmitry)
 - Fixed bug #48023 (spl_autoload_register didn't store closures). (Etienne)
 - Fixed bug #48004 (Error handler prevents creation of default object).
   (Dmitry)
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.47r2=1.640.2.23.2.57.2.48diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.47 
php-src/main/main.c:1.640.2.23.2.57.2.48
--- php-src/main/main.c:1.640.2.23.2.57.2.47Fri Mar 27 02:34:06 2009
+++ php-src/main/main.c Tue Apr 28 07:13:30 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.47 2009/03/27 02:34:06 lbarnaud Exp $ */

+/* $Id: main.c,v 1.640.2.23.2.57.2.48 2009/04/28 07:13:30 dmitry Exp $ */
 
 /* {{{ includes

  */
@@ -89,6 +89,13 @@
 
 #include SAPI.h

 #include rfc1867.h
+
+#if HAVE_SYS_MMAN_H
+# include sys/mman.h
+# ifndef PAGE_SIZE
+#  define PAGE_SIZE 4096
+# endif
+#endif
 /* }}} */
 
 PHPAPI int (*php_register_internal_extensions_func)(TSRMLS_D) = php_register_internal_extensions;

@@ -1134,8 +1141,10 @@
handle-handle.stream.isatty  = 0;
/* can we mmap immeadiately? */
memset(handle-handle.stream.mmap, 0, 
sizeof(handle-handle.stream.mmap));
-   len = php_zend_stream_fsizer(stream TSRMLS_CC) + 
ZEND_MMAP_AHEAD;
-   if (php_stream_mmap_possible(stream)
+   len = php_zend_stream_fsizer(stream TSRMLS_CC);
+   if (len != 0
+((len - 1) % PAGE_SIZE) = PAGE_SIZE - ZEND_MMAP_AHEAD
+php_stream_mmap_possible(stream)
 (p = php_stream_mmap_range(stream, 0, len, 
PHP_STREAM_MAP_MODE_SHARED_READONLY, mapped_len)) != NULL) {
handle-handle.stream.closer   = 
php_zend_stream_mmap_closer;
handle-handle.stream.mmap.buf = p;






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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/imap php_imap.c php_imap.h

2009-04-28 Thread Pierre-Alain Joye
pajoye  Tue Apr 28 08:22:57 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/imap   php_imap.c php_imap.h 
  Log:
  - [DOC] add imap_gc (purge cache(s) and constants IMAP_GC_ELT, IMAP_GC_ENV 
and IMAP_GC_TEXTS to control imap_gc behavior
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.26.2.41r2=1.208.2.7.2.26.2.42diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.41 
php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.42
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.41 Mon Apr 27 00:00:42 2009
+++ php-src/ext/imap/php_imap.c Tue Apr 28 08:22:56 2009
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.26.2.41 2009/04/27 00:00:42 pajoye Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.26.2.42 2009/04/28 08:22:56 pajoye Exp $ */
 
 #define IMAP41
 
@@ -167,6 +167,11 @@
ZEND_ARG_INFO(0, stream_id)
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_gc, 0, 0, 1)
+   ZEND_ARG_INFO(0, stream_id)
+   ZEND_ARG_INFO(0, flags)
+ZEND_END_ARG_INFO()
+
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_close, 0, 0, 1)
ZEND_ARG_INFO(0, stream_id)
ZEND_ARG_INFO(0, options)
@@ -468,6 +473,7 @@
PHP_FE(imap_savebody,   
arginfo_imap_savebody)
PHP_FE(imap_fetchheader,
arginfo_imap_fetchheader)
PHP_FE(imap_fetchstructure, 
arginfo_imap_fetchstructure)
+   PHP_FE(imap_gc, 
arginfo_imap_gc)
PHP_FE(imap_expunge,
arginfo_imap_expunge)
PHP_FE(imap_delete, 
arginfo_imap_delete)
PHP_FE(imap_undelete,   
arginfo_imap_undelete)
@@ -1025,6 +1031,15 @@
ENCOTHERunknown
*/
 
+   REGISTER_LONG_CONSTANT(IMAP_GC_ELT, GC_ELT , CONST_PERSISTENT | 
CONST_CS);
+   REGISTER_LONG_CONSTANT(IMAP_GC_ENV, GC_ENV , CONST_PERSISTENT | 
CONST_CS);
+   REGISTER_LONG_CONSTANT(IMAP_GC_TEXTS, GC_TEXTS , CONST_PERSISTENT | 
CONST_CS);
+   /*
+   GC_ELT message cache elements
+   GC_ENV ENVELOPEs and BODYs
+   GC_TEXTS   texts
+   */
+
le_imap = zend_register_list_destructors_ex(mail_close_it, NULL, 
imap, module_number);
return SUCCESS;
 }
@@ -1472,6 +1487,31 @@
 }
 /* }}} */
 
+/* {{{ proto bool imap_gc(resource stream_id, int flags)
+   This function garbage collects (purges) the cache of entries of a specific 
type. */
+PHP_FUNCTION(imap_gc)
+{
+   zval *streamind;
+   pils *imap_le_struct;
+   long flags;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rl, streamind, 
flags) == FAILURE) {
+   return;
+   }
+
+   if (flags  ((flags  ~(GC_TEXTS | GC_ELT | GC_ENV)) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the flags parameter);
+   RETURN_FALSE;
+   }
+
+   ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
+
+   mail_gc(imap_le_struct-imap_stream, flags);
+
+   RETURN_TRUE;
+}
+/* }}} */
+
 /* {{{ proto bool imap_close(resource stream_id [, int options])
Close an IMAP stream */
 PHP_FUNCTION(imap_close)
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.h?r1=1.32.2.2.2.1.2.2r2=1.32.2.2.2.1.2.3diff_format=u
Index: php-src/ext/imap/php_imap.h
diff -u php-src/ext/imap/php_imap.h:1.32.2.2.2.1.2.2 
php-src/ext/imap/php_imap.h:1.32.2.2.2.1.2.3
--- php-src/ext/imap/php_imap.h:1.32.2.2.2.1.2.2Wed Dec 31 11:15:37 2008
+++ php-src/ext/imap/php_imap.h Tue Apr 28 08:22:57 2009
@@ -27,7 +27,7 @@
+--+
  */
 
-/* $Id: php_imap.h,v 1.32.2.2.2.1.2.2 2008/12/31 11:15:37 sebastian Exp $ */
+/* $Id: php_imap.h,v 1.32.2.2.2.1.2.3 2009/04/28 08:22:57 pajoye Exp $ */
 
 #ifndef PHP_IMAP_H
 #define PHP_IMAP_H
@@ -115,6 +115,7 @@
 PHP_FUNCTION(imap_fetchstructure);
 PHP_FUNCTION(imap_fetchbody);
 PHP_FUNCTION(imap_savebody);
+PHP_FUNCTION(imap_gc);
 PHP_FUNCTION(imap_expunge);
 PHP_FUNCTION(imap_delete);
 PHP_FUNCTION(imap_undelete);



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/imap php_imap.c

2009-04-28 Thread Pierre-Alain Joye
pajoye  Tue Apr 28 08:29:55 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/imap   php_imap.c 
  Log:
  - space to tabs
  - CS
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.26.2.42r2=1.208.2.7.2.26.2.43diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.42 
php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.43
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.42 Tue Apr 28 08:22:56 2009
+++ php-src/ext/imap/php_imap.c Tue Apr 28 08:29:55 2009
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.26.2.42 2009/04/28 08:22:56 pajoye Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.26.2.43 2009/04/28 08:29:55 pajoye Exp $ */
 
 #define IMAP41
 
@@ -1530,11 +1530,11 @@
if (argc == 2) {
flags = options;
 
-/* Check that flags is exactly equal to PHP_EXPUNGE or zero */
-if (flags  ((flags  ~PHP_EXPUNGE) != 0)) {
-php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid 
value for the flags parameter);
- RETURN_FALSE;
-}
+   /* Check that flags is exactly equal to PHP_EXPUNGE or zero */
+   if (flags  ((flags  ~PHP_EXPUNGE) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid 
value for the flags parameter);
+   RETURN_FALSE;
+   }
 
/* Do the translation from PHP's internal PHP_EXPUNGE define to 
c-client's CL_EXPUNGE */
if (flags  PHP_EXPUNGE) {



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



[PHP-CVS] cvs: php-src /ext/imap php_imap.c

2009-04-28 Thread Pierre-Alain Joye
pajoye  Tue Apr 28 08:30:10 2009 UTC

  Modified files:  
/php-src/ext/imap   php_imap.c 
  Log:
  - space to tabs
  - CS
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.283r2=1.284diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.283 php-src/ext/imap/php_imap.c:1.284
--- php-src/ext/imap/php_imap.c:1.283   Tue Apr 28 08:23:32 2009
+++ php-src/ext/imap/php_imap.c Tue Apr 28 08:30:10 2009
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.283 2009/04/28 08:23:32 pajoye Exp $ */
+/* $Id: php_imap.c,v 1.284 2009/04/28 08:30:10 pajoye Exp $ */
 
 #define IMAP41
 
@@ -1526,11 +1526,11 @@
if (argc == 2) {
flags = options;
 
-/* Check that flags is exactly equal to PHP_EXPUNGE or zero */
-if (flags  ((flags  ~PHP_EXPUNGE) != 0)) {
-php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid 
value for the flags parameter);
- RETURN_FALSE;
-}
+   /* Check that flags is exactly equal to PHP_EXPUNGE or zero */
+   if (flags  ((flags  ~PHP_EXPUNGE) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid 
value for the flags parameter);
+   RETURN_FALSE;
+   }
 
/* Do the translation from PHP's internal PHP_EXPUNGE define to 
c-client's CL_EXPUNGE */
if (flags  PHP_EXPUNGE) {
@@ -1611,11 +1611,10 @@
return;
}
 
-if (flags  ((flags  ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
-php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
-RETURN_FALSE;
-}
-
+   if (flags  ((flags  ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
+   RETURN_FALSE;
+   }
 
ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
 
@@ -2214,10 +2213,10 @@
return;
}
 
-if (flags  ((flags  ~FT_UID) != 0)) {
-php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
-RETURN_FALSE;
-}
+   if (flags  ((flags  ~FT_UID) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
+   RETURN_FALSE;
+   }
 
ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
 
@@ -2264,11 +2263,10 @@
return;
}
 
-if (flags  ((flags  ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
-php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
-RETURN_FALSE;
-}
-
+   if (flags  ((flags  ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
+   RETURN_FALSE;
+   }
 
ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
 
@@ -2997,10 +2995,10 @@
return;
}
 
-if (flags  ((flags  ~(FT_UID|FT_INTERNAL|FT_PREFETCHTEXT)) != 0)) {
-php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
-RETURN_FALSE;
-}
+   if (flags  ((flags  ~(FT_UID|FT_INTERNAL|FT_PREFETCHTEXT)) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
+   RETURN_FALSE;
+   }
 
ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
 



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/imap php_imap.c

2009-04-28 Thread Pierre-Alain Joye
pajoye  Tue Apr 28 08:33:25 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/imap   php_imap.c 
  Log:
  - space to tabs
  - CS
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.48r2=1.208.2.7.2.49diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.48 
php-src/ext/imap/php_imap.c:1.208.2.7.2.49
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.48  Mon Apr 27 00:01:15 2009
+++ php-src/ext/imap/php_imap.c Tue Apr 28 08:33:25 2009
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.48 2009/04/27 00:01:15 pajoye Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.49 2009/04/28 08:33:25 pajoye Exp $ */
 
 #define IMAP41
 
@@ -275,7 +275,7 @@
  */
 FOBJECTLIST *mail_newfolderobjectlist(void)
 {
-  return (FOBJECTLIST *) memset(fs_get(sizeof(FOBJECTLIST)), 0, 
sizeof(FOBJECTLIST));
+   return (FOBJECTLIST *) memset(fs_get(sizeof(FOBJECTLIST)), 0, 
sizeof(FOBJECTLIST));
 }
 /* }}} */
 
@@ -1150,11 +1150,11 @@
convert_to_long_ex(options);
flags = Z_LVAL_PP(options);
 
-/* Check that flags is exactly equal to PHP_EXPUNGE or Zero*/
-if (flags  ((flags  ~PHP_EXPUNGE) != 0)) {
-php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid 
value for the flags parameter);
- RETURN_FALSE;
-}
+   /* Check that flags is exactly equal to PHP_EXPUNGE or Zero*/
+   if (flags  ((flags  ~PHP_EXPUNGE) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid 
value for the flags parameter);
+   RETURN_FALSE;
+   }
 
/* Do the translation from PHP's internal PHP_EXPUNGE define to 
c-client's CL_EXPUNGE */
if (flags  PHP_EXPUNGE) {
@@ -1242,10 +1242,10 @@
if (myargc == 3) {
convert_to_long_ex(pflags);
flags = Z_LVAL_PP(pflags);
-   if (flags  ((flags  ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
invalid value for the options parameter);
-   RETURN_FALSE;
-   }
+   if (flags  ((flags  ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid 
value for the options parameter);
+   RETURN_FALSE;
+   }
}
 
if ((myargc == 3)  (flags  FT_UID)) {
@@ -1881,10 +1881,10 @@
convert_to_long_ex(pflags);
flags = Z_LVAL_PP(pflags);
 
-   if (flags  ((flags  ~FT_UID) != 0)) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
invalid value for the options parameter);
-   RETURN_FALSE;
-   }
+   if (flags  ((flags  ~FT_UID) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid 
value for the options parameter);
+   RETURN_FALSE;
+   }
}
 
object_init(return_value);
@@ -1917,7 +1917,7 @@
zval **streamind, **msgno, **sec, **pflags;
pils *imap_le_struct;
char *body;
-long flags=0L;
+   long flags=0L;
unsigned long len;
int myargc=ZEND_NUM_ARGS();
 
@@ -1933,10 +1933,10 @@
if (myargc == 4) {
convert_to_long_ex(pflags);
flags = Z_LVAL_PP(pflags);
-   if (flags  ((flags  ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
invalid value for the options parameter);
-   RETURN_FALSE;
-}
+   if (flags  ((flags  ~(FT_UID|FT_PEEK|FT_INTERNAL)) != 0)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid 
value for the options parameter);
+   RETURN_FALSE;
+   }
}
 
if (myargc  4 || !(flags  FT_UID)) {
@@ -2690,7 +2690,7 @@
zval **streamind, **msgno, **pflags;
pils *imap_le_struct;
int msgindex, myargc = ZEND_NUM_ARGS();
-long flags=0L;
+   long flags=0L;
 
if (myargc  2 || myargc  3 || zend_get_parameters_ex(myargc, 
streamind, msgno, pflags) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
@@ -2701,12 +2701,12 @@
convert_to_long_ex(msgno);
if (myargc == 3) {
convert_to_long_ex(pflags);
-flags =  Z_LVAL_PP(pflags);
-   if (flags  ((flags  ~(FT_UID|FT_INTERNAL|FT_PREFETCHTEXT)) 
!= 0)) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
invalid value for the options 

[PHP-CVS] cvs: php-src /ext/standard/tests/strings strcoll.phpt

2009-04-28 Thread Antony Dovgal
tony2001Tue Apr 28 09:05:25 2009 UTC

  Modified files:  
/php-src/ext/standard/tests/strings strcoll.phpt 
  Log:
  fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strcoll.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/strings/strcoll.phpt
diff -u php-src/ext/standard/tests/strings/strcoll.phpt:1.2 
php-src/ext/standard/tests/strings/strcoll.phpt:1.3
--- php-src/ext/standard/tests/strings/strcoll.phpt:1.2 Sat Apr 25 18:33:50 2009
+++ php-src/ext/standard/tests/strings/strcoll.phpt Tue Apr 28 09:05:25 2009
@@ -11,7 +11,8 @@
  $b = 'A';
 
 setlocale (LC_COLLATE, 'C');
-print C:  . strcoll ($a, $b) . \n; // prints 1
+print C:  . strcoll ($a, $b) . \n; // prints 32
 ?
---EXPECT--
-C: 1
+--EXPECTF--
+Deprecated: setlocale(): deprecated in Unicode mode, please use ICU locale 
functions in %s on line %d
+C: -1



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings strcoll.phpt

2009-04-28 Thread Antony Dovgal
tony2001Tue Apr 28 09:04:28 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/strings strcoll.phpt 
  Log:
  fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strcoll.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/strings/strcoll.phpt
diff -u php-src/ext/standard/tests/strings/strcoll.phpt:1.1.2.1 
php-src/ext/standard/tests/strings/strcoll.phpt:1.1.2.2
--- php-src/ext/standard/tests/strings/strcoll.phpt:1.1.2.1 Sat Apr 25 
11:23:01 2009
+++ php-src/ext/standard/tests/strings/strcoll.phpt Tue Apr 28 09:04:28 2009
@@ -11,7 +11,7 @@
  $b = 'A';
 
 setlocale (LC_COLLATE, 'C');
-print C:  . strcoll ($a, $b) . \n; // prints 1
+print C:  . strcoll ($a, $b) . \n; // prints 32
 ?
 --EXPECT--
-C: 1
+C: 32



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



[PHP-CVS] cvs: php-src(PHP_5_3) /tests/classes inheritance_007.phpt

2009-04-28 Thread Antony Dovgal
tony2001Tue Apr 28 10:30:56 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/tests/classes  inheritance_007.phpt 
  Log:
  fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/tests/classes/inheritance_007.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/tests/classes/inheritance_007.phpt
diff -u php-src/tests/classes/inheritance_007.phpt:1.1.4.2 
php-src/tests/classes/inheritance_007.phpt:1.1.4.3
--- php-src/tests/classes/inheritance_007.phpt:1.1.4.2  Fri Dec  5 22:12:07 2008
+++ php-src/tests/classes/inheritance_007.phpt  Tue Apr 28 10:30:56 2009
@@ -1,5 +1,5 @@
 --TEST--
-Ensure inherited old-style constructor doesn't block other methods.
+Ensure inherited old-style constructor doesn't block other methods
 --FILE--
 ?php
 class A {
@@ -21,19 +21,19 @@
 array(2) {
   [0]=
   object(ReflectionMethod)#%d (2) {
-[%u|b%name]=
-%string|unicode%(1) B
-[%u|b%class]=
-%string|unicode%(1) B
+[name]=
+string(1) B
+[class]=
+string(1) B
   }
   [1]=
   object(ReflectionMethod)#%d (2) {
-[%u|b%name]=
-%string|unicode%(1) A
-[%u|b%class]=
-%string|unicode%(1) B
+[name]=
+string(1) A
+[class]=
+string(1) B
   }
 }
 In A::A
 In A::A
-In A::B
\ No newline at end of file
+In A::B



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings strcoll.phpt

2009-04-28 Thread Antony Dovgal
tony2001Tue Apr 28 09:04:17 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings strcoll.phpt 
  Log:
  fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strcoll.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u
Index: php-src/ext/standard/tests/strings/strcoll.phpt
diff -u php-src/ext/standard/tests/strings/strcoll.phpt:1.2.2.2 
php-src/ext/standard/tests/strings/strcoll.phpt:1.2.2.3
--- php-src/ext/standard/tests/strings/strcoll.phpt:1.2.2.2 Sat Apr 25 
18:36:04 2009
+++ php-src/ext/standard/tests/strings/strcoll.phpt Tue Apr 28 09:04:17 2009
@@ -11,7 +11,7 @@
  $b = 'A';
 
 setlocale (LC_COLLATE, 'C');
-print C:  . strcoll ($a, $b) . \n; // prints 1
+print C:  . strcoll ($a, $b) . \n; // prints 32
 ?
 --EXPECT--
-C: 1
+C: 32



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



[PHP-CVS] cvs: php-src(PHP_5_2) /tests/classes inheritance_007.phpt

2009-04-28 Thread Antony Dovgal
tony2001Tue Apr 28 09:02:37 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/tests/classes  inheritance_007.phpt 
  Log:
  nuke unicode crap, fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/tests/classes/inheritance_007.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/tests/classes/inheritance_007.phpt
diff -u php-src/tests/classes/inheritance_007.phpt:1.1.2.2 
php-src/tests/classes/inheritance_007.phpt:1.1.2.3
--- php-src/tests/classes/inheritance_007.phpt:1.1.2.2  Fri Dec  5 22:12:05 2008
+++ php-src/tests/classes/inheritance_007.phpt  Tue Apr 28 09:02:37 2009
@@ -21,19 +21,19 @@
 array(2) {
   [0]=
   object(ReflectionMethod)#%d (2) {
-[%u|b%name]=
-%string|unicode%(1) B
-[%u|b%class]=
-%string|unicode%(1) B
+[name]=
+string(1) B
+[class]=
+string(1) B
   }
   [1]=
   object(ReflectionMethod)#%d (2) {
-[%u|b%name]=
-%string|unicode%(1) A
-[%u|b%class]=
-%string|unicode%(1) B
+[name]=
+string(1) A
+[class]=
+string(1) B
   }
 }
 In A::A
 In A::A
-In A::B
\ No newline at end of file
+In A::B



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/imap php_imap.c

2009-04-28 Thread Pierre-Alain Joye
pajoye  Tue Apr 28 12:43:10 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/imap   php_imap.c 
  Log:
  - MFH: SEARCHPGM struct has to be freed
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.49r2=1.208.2.7.2.50diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.49 
php-src/ext/imap/php_imap.c:1.208.2.7.2.50
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.49  Tue Apr 28 08:33:25 2009
+++ php-src/ext/imap/php_imap.c Tue Apr 28 12:43:10 2009
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski z...@zend.com   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.49 2009/04/28 08:33:25 pajoye Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.50 2009/04/28 12:43:10 pajoye Exp $ */
 
 #define IMAP41
 
@@ -3685,6 +3685,7 @@
char *search_criteria;
MESSAGELIST *cur;
int argc = ZEND_NUM_ARGS();
+   SEARCHPGM *pgm = NIL;
 
if (argc  2 || argc  4 || zend_get_parameters_ex(argc, streamind, 
criteria, search_flags, charset) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
@@ -3705,8 +3706,15 @@
}
}
 
+   pgm = mail_criteria(search_criteria);
IMAPG(imap_messages) = IMAPG(imap_messages_tail) = NIL;
-   mail_search_full(imap_le_struct-imap_stream, (argc == 4 ? 
Z_STRVAL_PP(charset) : NIL), mail_criteria(search_criteria), flags);
+
+   mail_search_full(imap_le_struct-imap_stream, (argc == 4 ? 
Z_STRVAL_PP(charset) : NIL), pgm, flags);
+
+   if (pgm) {
+   mail_free_searchpgm(pgm);
+   }
+
if (IMAPG(imap_messages) == NIL) {
efree(search_criteria);
RETURN_FALSE;
@@ -4315,6 +4323,7 @@
char criteria[] = ALL;
THREADNODE *top;
int argc = ZEND_NUM_ARGS();
+   SEARCHPGM *pgm = NIL;
 
if ( argc  1 || argc  2 || zend_get_parameters_ex(argc, streamind, 
search_flags) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
@@ -4329,7 +4338,11 @@
flags = Z_LVAL_PP(search_flags);
}
 
-   top = mail_thread(imap_le_struct-imap_stream, REFERENCES, NIL, 
mail_criteria(criteria), flags);
+   pgm = mail_criteria(criteria);
+   top = mail_thread(imap_le_struct-imap_stream, REFERENCES, NIL, pgm, 
flags);
+   if (pgm) {
+   mail_free_searchpgm(pgm);
+   }
 
if(top == NIL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Function returned 
an empty tree);



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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2009-04-28 Thread Pierre-Alain Joye
pajoye  Tue Apr 28 13:01:05 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  - mail_criteria entry and revert previous wrong one
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1477r2=1.2027.2.547.2.1478diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1477 php-src/NEWS:1.2027.2.547.2.1478
--- php-src/NEWS:1.2027.2.547.2.1477Mon Apr 27 20:03:16 2009
+++ php-src/NEWSTue Apr 28 13:01:04 2009
@@ -9,6 +9,7 @@
 - Fixed memory corruptions while reading properties of zip files. (Ilia)
 - Fixed memory leak in ob_get_clean/ob_get_flush. (Christian)
 - Fixed segfault on invalid session.save_path. (Hannes)
+- Fixed leaks in imap when a mail_criteria is used. (Pierre)
 
 - Fixed bug #47997 (stream_copy_to_stream returns 1 on empty streams). (Arnaud)
 - Fixed bug #47991 (SSL streams fail if error stack contains items). (Mikko)
@@ -16,8 +17,6 @@
 - Fixed bug #47969 (ezmlm_hash() returns different values depend on OS).
   (Ilia)
 - Fixed bug #47946 (ImageConvolution overwrites background). (Ilia)
-- Fixed bug #47940, (memory leak imap_body()). 
-  (jake dot levitt at mailtrust dot com, Pierre)
 - Fixed bug #47937 (system() calls sapi_flush() regardless of output
   buffering). (Ilia)
 - Fixed bug #47903 (@ operator does not work with string offsets). (Felipe)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar/tests fatal_error_webphar.phpt /ext/phar/tests/files pear2coverage.phar.php

2009-04-28 Thread Greg Beaver
cellog  Tue Apr 28 19:28:52 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/phar/tests fatal_error_webphar.phpt 
/php-src/ext/phar/tests/files   pear2coverage.phar.php 
  Log:
  new test - test passes here, but the pear2coverage.phar.php segfaults in 
apache 2.2 sapi
  

http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/fatal_error_webphar.phpt?view=markuprev=1.1
Index: php-src/ext/phar/tests/fatal_error_webphar.phpt
+++ php-src/ext/phar/tests/fatal_error_webphar.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/files/pear2coverage.phar.php?view=markuprev=1.1
Index: php-src/ext/phar/tests/files/pear2coverage.phar.php
+++ php-src/ext/phar/tests/files/pear2coverage.phar.php



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



[PHP-CVS] cvs: phpruntests /src/testcase rtTestConfiguration.php

2009-04-28 Thread Zoe Slattery
zoe Tue Apr 28 20:23:15 2009 UTC

  Modified files:  
/phpruntests/src/testcase   rtTestConfiguration.php 
  Log:
  change names
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/rtTestConfiguration.php?r1=1.7r2=1.8diff_format=u
Index: phpruntests/src/testcase/rtTestConfiguration.php
diff -u phpruntests/src/testcase/rtTestConfiguration.php:1.7 
phpruntests/src/testcase/rtTestConfiguration.php:1.8
--- phpruntests/src/testcase/rtTestConfiguration.php:1.7Mon Apr 27 
21:04:32 2009
+++ phpruntests/src/testcase/rtTestConfiguration.phpTue Apr 28 20:23:14 2009
@@ -22,7 +22,7 @@
 private $testCommandLineArguments;
 private $phpExecutable;
 private $inputFileString;
-private $isCgiTest = false;
+private $cgiTest = false;
 private $cgiSections = array(
 'GET',
 'POST',
@@ -40,15 +40,15 @@
 
 private function init(rtRuntestsConfiguration $runConfiguration, 
$sections, $sectionHeadings, $fileSection)
 {
-$this-queryCgiTest($sectionHeadings);
+$this-isCgiTest($sectionHeadings);
 
 $this-setEnvironmentVariables($runConfiguration, $sections, 
$fileSection);
 $this-setPhpCommandLineArguments($runConfiguration, $sections);
 $this-setTestCommandLineArguments($sections);
 $this-setPhpExecutable($runConfiguration, $sectionHeadings);
 $this-setInputFileString($runConfiguration, $sections, 
$sectionHeadings);
-
-if($this-isCgiTest) {
+
+if($this-cgiTest) {
 $this-environmentVariables['SCRIPT_FILENAME'] = 
$fileSection-getFileName();
 $this-environmentVariables['PATH_TRANSLATED'] = 
$fileSection-getFileName();
 //Required by when the cgi has been compiled with 
force-cgi-redirect.
@@ -90,7 +90,7 @@
 
 private function setPhpExecutable($runConfiguration, $sectionHeadings)
 {
-if ($this-isCgiTest) {
+if ($this-cgiTest) {
 $this-phpExecutable =  
$runConfiguration-getSetting('PhpCgiExecutable').  -C;
 } else {
 $this-phpExecutable = 
$runConfiguration-getSetting('PhpExecutable');
@@ -105,11 +105,11 @@
 }
 }
 
-private function queryCgiTest($sectionHeadings)
+private function isCgiTest($sectionHeadings)
 {
 $tempArray = array_diff($this-cgiSections, $sectionHeadings);
 if (count($tempArray)  count($this-cgiSections)) {
-$this-isCgiTest = true;
+$this-cgiTest = true;
 }
 }
 
@@ -133,5 +133,10 @@
 {
 return $this-testCommandLineArguments;
 }
+
+public function getInputFileString()
+{
+return $this-inputFileString;
+}
 }
 ?



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



[PHP-CVS] cvs: phpruntests /src/testcase/sections/executablesections rtFileSection.php

2009-04-28 Thread Zoe Slattery
zoe Tue Apr 28 20:23:43 2009 UTC

  Modified files:  
/phpruntests/src/testcase/sections/executablesections   

rtFileSection.php 
  Log:
  add line to get a post / stdin file
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/sections/executablesections/rtFileSection.php?r1=1.6r2=1.7diff_format=u
Index: phpruntests/src/testcase/sections/executablesections/rtFileSection.php
diff -u 
phpruntests/src/testcase/sections/executablesections/rtFileSection.php:1.6 
phpruntests/src/testcase/sections/executablesections/rtFileSection.php:1.7
--- phpruntests/src/testcase/sections/executablesections/rtFileSection.php:1.6  
Mon Apr 27 21:06:20 2009
+++ phpruntests/src/testcase/sections/executablesections/rtFileSection.php  
Tue Apr 28 20:23:43 2009
@@ -34,6 +34,7 @@
 $phpCommand .= ' '. 
$testCase-testConfiguration-getPhpCommandLineArguments();
 $phpCommand .= ' -f '.$this-fileName;
 $phpCommand .= ' 
'.$testCase-testConfiguration-getTestCommandLineArguments();
+$phpCommand .= ' 
'.$testCase-testConfiguration-getInputFileString();
  
 
 $PhpRunner = new rtPhpRunner($phpCommand,



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



[PHP-CVS] cvs: phpruntests /src/testcase rtTestConfiguration.php

2009-04-28 Thread Zoe Slattery
zoe Tue Apr 28 20:57:35 2009 UTC

  Modified files:  
/phpruntests/src/testcase   rtTestConfiguration.php 
  Log:
  POST implemented
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/rtTestConfiguration.php?r1=1.8r2=1.9diff_format=u
Index: phpruntests/src/testcase/rtTestConfiguration.php
diff -u phpruntests/src/testcase/rtTestConfiguration.php:1.8 
phpruntests/src/testcase/rtTestConfiguration.php:1.9
--- phpruntests/src/testcase/rtTestConfiguration.php:1.8Tue Apr 28 
20:23:14 2009
+++ phpruntests/src/testcase/rtTestConfiguration.phpTue Apr 28 20:57:35 2009
@@ -66,6 +66,9 @@
 if (array_key_exists('GET', $sections)) {
 $this-environmentVariables = 
array_merge($this-environmentVariables, $sections['GET']-getGetVariables());
 }
+   if (array_key_exists('POST', $sections)) {
+$this-environmentVariables = 
array_merge($this-environmentVariables, $sections['POST']-getPostVariables());
+}
 
 }
 



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



[PHP-CVS] cvs: phpruntests /src/testcase/sections rtSection.php

2009-04-28 Thread Zoe Slattery
zoe Tue Apr 28 20:58:00 2009 UTC

  Modified files:  
/phpruntests/src/testcase/sections  rtSection.php 
  Log:
  POST implemented
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/sections/rtSection.php?r1=1.3r2=1.4diff_format=u
Index: phpruntests/src/testcase/sections/rtSection.php
diff -u phpruntests/src/testcase/sections/rtSection.php:1.3 
phpruntests/src/testcase/sections/rtSection.php:1.4
--- phpruntests/src/testcase/sections/rtSection.php:1.3 Sun Apr 26 22:44:06 2009
+++ phpruntests/src/testcase/sections/rtSection.php Tue Apr 28 20:58:00 2009
@@ -19,6 +19,7 @@
 'CLEAN'   = 'rtCleanSection',
 'XFAIL'   = 'rtXfailSection',
 'GET' = 'rtGetSection',
+'POST' = 'rtPostSection',
 );
 
 protected $sectionName;



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



[PHP-CVS] cvs: phpruntests /src/testcase/sections/configurationsections rtPostSection.php

2009-04-28 Thread Zoe Slattery
zoe Tue Apr 28 20:58:15 2009 UTC

  Modified files:  
/phpruntests/src/testcase/sections/configurationsections

rtPostSection.php 
  Log:
  POST implemented
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/sections/configurationsections/rtPostSection.php?r1=1.1r2=1.2diff_format=u
Index: phpruntests/src/testcase/sections/configurationsections/rtPostSection.php
diff -u 
phpruntests/src/testcase/sections/configurationsections/rtPostSection.php:1.1 
phpruntests/src/testcase/sections/configurationsections/rtPostSection.php:1.2
--- 
phpruntests/src/testcase/sections/configurationsections/rtPostSection.php:1.1   
Mon Apr 27 21:05:54 2009
+++ phpruntests/src/testcase/sections/configurationsections/rtPostSection.php   
Tue Apr 28 20:58:15 2009
@@ -18,12 +18,14 @@
 private $postFileName;
 
 protected function init()
-{
+{ 
+$postString = implode('\n', $this-sectionContents);
 $this-postVariables['CONTENT_TYPE'] = 
'application/x-www-form-urlencoded';
+$this-postVariables['CONTENT_LENGTH'] = strlen($postString);
 $this-postVariables['REQUEST_METHOD'] = 'POST';
 
-$postString = implode('\n', $this-sectionContents);
 $this-postFileName = tempnam(sys_get_temp_dir(), 'post');
+
 file_put_contents($this-postFileName, $postString);
 }
 



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



[PHP-CVS] cvs: phpruntests /tests/testcase rtPostExecutionTest.php

2009-04-28 Thread Zoe Slattery
zoe Tue Apr 28 20:58:29 2009 UTC

  Added files: 
/phpruntests/tests/testcase rtPostExecutionTest.php 
  Log:
  POST implemented
  

http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtPostExecutionTest.php?view=markuprev=1.1
Index: phpruntests/tests/testcase/rtPostExecutionTest.php
+++ phpruntests/tests/testcase/rtPostExecutionTest.php
?php

require_once 'PHPUnit/Framework.php';
require_once dirname(__FILE__) . '../../../src/rtAutoload.php';

class rtPostExecutionTest extends PHPUnit_Framework_TestCase
{
private $sample_test;

public function setUp()
{
$this-php = trim(shell_exec(which php));
$this-php_cgi = trim(shell_exec(which php-cgi));

$this-path_to_tests = realpath(dirname(__FILE__) . 
'/../../phpt-tests');
$this-sample_test = $this-path_to_tests . '/sample_post.phpt';
}

public function tearDown()
{
@unlink($this-path-to_tests . '/sample_post.php');
}

public function testFileRun()
{ 
//Create a new test configuration
$config = rtRuntestsConfiguration::getInstance(array('run-tests.php', 
'-p', $this-php, $this-sample_test));

$config-setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE',$this-php_cgi);
$config-configure();

//Retrieve the array of test file names
$testFiles = $config-getSetting('TestFiles');

//Read the test file
$testFile = new rtPhpTestFile();
$testFile-doRead($testFiles[0]);
$testFile-normaliseLineEndings();

//Create a new test case
$testCase = new rtPhpTest($testFile-getContents(), 
$testFile-getTestName(), $testFile-getSectionHeadings(), $config);  

//Setup and set the local environment for the test case
$testCase-executeTest($config);
$output = $testCase-getOutput();
$status = $testCase-getStatus();

$this-assertEquals('85', strlen($output));
$this-assertEquals('', $status['pass']);


}
}

?
?


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



[PHP-CVS] cvs: phpruntests /src/testcase/sections/executablesections rtFileSection.php

2009-04-28 Thread Zoe Slattery
zoe Tue Apr 28 20:58:39 2009 UTC

  Modified files:  
/phpruntests/src/testcase/sections/executablesections   

rtFileSection.php 
  Log:
  POST implemented
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/sections/executablesections/rtFileSection.php?r1=1.7r2=1.8diff_format=u
Index: phpruntests/src/testcase/sections/executablesections/rtFileSection.php
diff -u 
phpruntests/src/testcase/sections/executablesections/rtFileSection.php:1.7 
phpruntests/src/testcase/sections/executablesections/rtFileSection.php:1.8
--- phpruntests/src/testcase/sections/executablesections/rtFileSection.php:1.7  
Tue Apr 28 20:23:43 2009
+++ phpruntests/src/testcase/sections/executablesections/rtFileSection.php  
Tue Apr 28 20:58:39 2009
@@ -34,7 +34,7 @@
 $phpCommand .= ' '. 
$testCase-testConfiguration-getPhpCommandLineArguments();
 $phpCommand .= ' -f '.$this-fileName;
 $phpCommand .= ' 
'.$testCase-testConfiguration-getTestCommandLineArguments();
-$phpCommand .= ' 
'.$testCase-testConfiguration-getInputFileString();
+$phpCommand .= ' 21 
'.$testCase-testConfiguration-getInputFileString();
  
 
 $PhpRunner = new rtPhpRunner($phpCommand,



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/filter filter.c /main SAPI.c SAPI.h php_content_types.c

2009-04-28 Thread Stanislav Malyshev
stasTue Apr 28 21:30:23 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/filter filter.c 
/php-src/main   SAPI.c SAPI.h php_content_types.c 
  Log:
  fix for #47930
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.52.2.39.2.15r2=1.52.2.39.2.16diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.52.2.39.2.15 
php-src/ext/filter/filter.c:1.52.2.39.2.16
--- php-src/ext/filter/filter.c:1.52.2.39.2.15  Tue Apr 14 14:18:35 2009
+++ php-src/ext/filter/filter.c Tue Apr 28 21:30:23 2009
@@ -19,7 +19,7 @@
   +--+
 */
 
-/* $Id: filter.c,v 1.52.2.39.2.15 2009/04/14 14:18:35 tony2001 Exp $ */
+/* $Id: filter.c,v 1.52.2.39.2.16 2009/04/28 21:30:23 stas Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -76,6 +76,7 @@
 #endif
 
 static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned 
int val_len, unsigned int *new_val_len TSRMLS_DC);
+static unsigned int php_sapi_filter_init(TSRMLS_D);
 
 /* {{{ arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_input, 0, 0, 2)
@@ -270,7 +271,7 @@
REGISTER_LONG_CONSTANT(FILTER_FLAG_NO_RES_RANGE, 
FILTER_FLAG_NO_RES_RANGE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(FILTER_FLAG_NO_PRIV_RANGE, 
FILTER_FLAG_NO_PRIV_RANGE, CONST_CS | CONST_PERSISTENT);
 
-   sapi_register_input_filter(php_sapi_filter);
+   sapi_register_input_filter(php_sapi_filter, php_sapi_filter_init);
 
return SUCCESS;
 }
@@ -312,7 +313,7 @@
 {
php_info_print_table_start();
php_info_print_table_row( 2, Input Validation and Filtering, 
enabled );
-   php_info_print_table_row( 2, Revision, $Revision: 1.52.2.39.2.15 $);
+   php_info_print_table_row( 2, Revision, $Revision: 1.52.2.39.2.16 $);
php_info_print_table_end();
 
DISPLAY_INI_ENTRIES();
@@ -339,6 +340,17 @@
 }
 /* }}} */
 
+static unsigned int php_sapi_filter_init(TSRMLS_D)
+{
+   IF_G(get_array) = NULL;
+   IF_G(post_array) = NULL;
+   IF_G(cookie_array) = NULL;
+   IF_G(server_array) = NULL;
+   IF_G(env_array) = NULL;
+   IF_G(session_array) = NULL;
+   return SUCCESS;
+}
+
 static void php_zval_filter(zval **value, long filter, long flags, zval 
*options, char* charset, zend_bool copy TSRMLS_DC) /* {{{ */
 {
filter_list_entry  filter_func;
http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.c?r1=1.202.2.7.2.15.2.6r2=1.202.2.7.2.15.2.7diff_format=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.202.2.7.2.15.2.6 
php-src/main/SAPI.c:1.202.2.7.2.15.2.7
--- php-src/main/SAPI.c:1.202.2.7.2.15.2.6  Wed Dec 31 11:15:47 2008
+++ php-src/main/SAPI.c Tue Apr 28 21:30:23 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.202.2.7.2.15.2.6 2008/12/31 11:15:47 sebastian Exp $ */
+/* $Id: SAPI.c,v 1.202.2.7.2.15.2.7 2009/04/28 21:30:23 stas Exp $ */
 
 #include ctype.h
 #include sys/stat.h
@@ -326,6 +326,9 @@
sapi_module.activate(TSRMLS_C);
}
}
+   if (sapi_module.input_filter_init ) {
+   sapi_module.input_filter_init(TSRMLS_C);
+   }
 }
 
 /*
@@ -392,6 +395,9 @@
sapi_module.activate(TSRMLS_C);
}
}
+   if (sapi_module.input_filter_init ) {
+   sapi_module.input_filter_init(TSRMLS_C);
+   }
 }
 
 
@@ -925,13 +931,14 @@
return SUCCESS;
 }
 
-SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, 
char *var, char **val, unsigned int val_len, unsigned int *new_val_len 
TSRMLS_DC))
+SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, 
char *var, char **val, unsigned int val_len, unsigned int *new_val_len 
TSRMLS_DC), unsigned int (*input_filter_init)(TSRMLS_D))
 {
TSRMLS_FETCH();
if (SG(sapi_started)  EG(in_execution)) {
return FAILURE;
}
sapi_module.input_filter = input_filter;
+   sapi_module.input_filter_init = input_filter_init;
return SUCCESS;
 }
 
http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.h?r1=1.114.2.1.2.3.2.7r2=1.114.2.1.2.3.2.8diff_format=u
Index: php-src/main/SAPI.h
diff -u php-src/main/SAPI.h:1.114.2.1.2.3.2.7 
php-src/main/SAPI.h:1.114.2.1.2.3.2.8
--- php-src/main/SAPI.h:1.114.2.1.2.3.2.7   Wed Dec 31 17:33:05 2008
+++ php-src/main/SAPI.h Tue Apr 28 21:30:23 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: SAPI.h,v 1.114.2.1.2.3.2.7 2008/12/31 17:33:05 helly Exp $ */
+/* $Id: SAPI.h,v 1.114.2.1.2.3.2.8 2009/04/28 21:30:23 stas Exp $ */
 
 #ifndef SAPI_H
 #define SAPI_H
@@ -192,7 +192,7 @@
 SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry 
TSRMLS_DC);
 SAPI_API int sapi_register_default_post_reader(void 
(*default_post_reader)(TSRMLS_D));

[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard basic_functions.c /ext/standard/tests/network ip2long_variation1.phpt

2009-04-28 Thread Ilia Alshanetsky
iliaa   Tue Apr 28 22:31:26 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   basic_functions.c 
/php-src/ext/standard/tests/network ip2long_variation1.phpt 
/php-srcNEWS 
  Log:
  
  MFB: Fixed bug #47365 (ip2long() may allow some invalid values on certain
  64bit systems)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.80r2=1.725.2.31.2.81diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.80 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.81
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.80  Wed Dec 31 
11:17:44 2008
+++ php-src/ext/standard/basic_functions.c  Tue Apr 28 22:31:25 2009
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.80 2008/12/31 11:17:44 sebastian Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.81 2009/04/28 22:31:25 iliaa Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -4329,38 +4329,45 @@
 /* }}} */
 #endif /* HAVE_INET_PTON */
 
-
-
 /* {{{ proto int ip2long(string ip_address)
Converts a string containing an (IPv4) Internet Protocol dotted address 
into a proper address */
 PHP_FUNCTION(ip2long)
 {
-   zval **str;
+   char *addr;
+   int addr_len;
+#ifdef HAVE_INET_PTON
+   struct in_addr ip;
+#else
unsigned long int ip;
+#endif
 
-   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, str) == FAILURE) 
{
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, addr, 
addr_len) == FAILURE) {
+   return;
}
 
-   convert_to_string_ex(str);
-
-   if (Z_STRLEN_PP(str) == 0 || (ip = inet_addr(Z_STRVAL_PP(str))) == 
INADDR_NONE) {
-   /* the only special case when we should return -1 ourselves,
+#ifdef HAVE_INET_PTON
+   if (addr_len == 0 || inet_pton(AF_INET, addr, ip) != 1) {
+   RETURN_FALSE;
+   }
+   RETURN_LONG(ntohl(ip.s_addr));
+#else
+   if (addr_len == 0 || (ip = inet_addr(addr)) == INADDR_NONE) {
+   /* The only special case when we should return -1 ourselves,
 * because inet_addr() considers it wrong. We return 0x 
and
-* not -1 or ~0 because of 32/64bit issues.
-*/
-   if (Z_STRLEN_PP(str) == sizeof(255.255.255.255) - 1 
-   !memcmp(Z_STRVAL_PP(str), 255.255.255.255, 
sizeof(255.255.255.255) - 1)) {
+* not -1 or ~0 because of 32/64bit issues. */
+   if (addr_len == sizeof(255.255.255.255) - 1 
+   !memcmp(addr, 255.255.255.255, 
sizeof(255.255.255.255) - 1)
+   ) {
RETURN_LONG(0x);
}
-   
RETURN_FALSE;
}
-
RETURN_LONG(ntohl(ip));
+#endif
 }
 /* }}} */
 
+
 /* {{{ proto string long2ip(int proper_address)
Converts an (IPv4) Internet network address into a string in Internet 
standard dotted format */
 PHP_FUNCTION(long2ip)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/ip2long_variation1.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u
Index: php-src/ext/standard/tests/network/ip2long_variation1.phpt
diff -u php-src/ext/standard/tests/network/ip2long_variation1.phpt:1.2.2.2 
php-src/ext/standard/tests/network/ip2long_variation1.phpt:1.2.2.3
--- php-src/ext/standard/tests/network/ip2long_variation1.phpt:1.2.2.2  Fri Jan 
23 15:34:24 2009
+++ php-src/ext/standard/tests/network/ip2long_variation1.phpt  Tue Apr 28 
22:31:25 2009
@@ -114,19 +114,19 @@
 *** Testing ip2long() : usage variation ***
 
 --int 0--
-int(0)
+bool(false)
 
 --int 1--
-int(1)
+bool(false)
 
 --int 12345--
-int(12345)
+bool(false)
 
 --int -12345--
 bool(false)
 
 --float 10.5--
-int(167772165)
+bool(false)
 
 --float -10.5--
 bool(false)
@@ -138,7 +138,7 @@
 bool(false)
 
 --float .5--
-int(5)
+bool(false)
 
 --empty array--
 Error: 8 - Array to string conversion, %s(%d)
@@ -163,13 +163,13 @@
 bool(false)
 
 --lowercase true--
-int(1)
+bool(false)
 
 --lowercase false--
 bool(false)
 
 --uppercase TRUE--
-int(1)
+bool(false)
 
 --uppercase FALSE--
 bool(false)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1478r2=1.2027.2.547.2.1479diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1478 php-src/NEWS:1.2027.2.547.2.1479
--- php-src/NEWS:1.2027.2.547.2.1478Tue Apr 28 13:01:04 2009
+++ php-src/NEWSTue Apr 28 22:31:25 2009
@@ -48,6 +48,8 @@
 - Fixed bug #47598 (FILTER_VALIDATE_EMAIL is locale aware). (Ilia)
 - Fixed bug #47487 (performance degraded when reading large chunks after fix of
   bug #44607). (Arnaud)
+- Fixed bug #47365 (ip2long() may allow some invalid values on certain 64bit  
+  systems). (Ilia)
 - Fixed bug #47435 (FILTER_FLAG_NO_PRIV_RANGE does not work with 

[PHP-CVS] cvs: php-src /ext/filter filter.c /main SAPI.c SAPI.h php_content_types.c

2009-04-28 Thread Stanislav Malyshev
stasTue Apr 28 22:59:07 2009 UTC

  Modified files:  
/php-src/ext/filter filter.c 
/php-src/main   SAPI.c SAPI.h php_content_types.c 
  Log:
  MF5 fix for #47930
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.103r2=1.104diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.103 php-src/ext/filter/filter.c:1.104
--- php-src/ext/filter/filter.c:1.103   Tue Apr 14 14:18:14 2009
+++ php-src/ext/filter/filter.c Tue Apr 28 22:59:07 2009
@@ -19,7 +19,7 @@
   +--+
 */
 
-/* $Id: filter.c,v 1.103 2009/04/14 14:18:14 tony2001 Exp $ */
+/* $Id: filter.c,v 1.104 2009/04/28 22:59:07 stas Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -76,6 +76,7 @@
 #endif
 
 static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned 
int val_len, unsigned int *new_val_len TSRMLS_DC);
+static unsigned int php_sapi_filter_init(TSRMLS_D);
 
 /* {{{ arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_filter_input, 0, 0, 2)
@@ -270,7 +271,7 @@
REGISTER_LONG_CONSTANT(FILTER_FLAG_NO_RES_RANGE, 
FILTER_FLAG_NO_RES_RANGE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(FILTER_FLAG_NO_PRIV_RANGE, 
FILTER_FLAG_NO_PRIV_RANGE, CONST_CS | CONST_PERSISTENT);
 
-   sapi_register_input_filter(php_sapi_filter);
+   sapi_register_input_filter(php_sapi_filter, php_sapi_filter_init);
 
return SUCCESS;
 }
@@ -312,7 +313,7 @@
 {
php_info_print_table_start();
php_info_print_table_row( 2, Input Validation and Filtering, 
enabled );
-   php_info_print_table_row( 2, Revision, $Revision: 1.103 $);
+   php_info_print_table_row( 2, Revision, $Revision: 1.104 $);
php_info_print_table_end();
 
DISPLAY_INI_ENTRIES();
@@ -339,6 +340,17 @@
 }
 /* }}} */
 
+static unsigned int php_sapi_filter_init(TSRMLS_D)
+{
+   IF_G(get_array) = NULL;
+   IF_G(post_array) = NULL;
+   IF_G(cookie_array) = NULL;
+   IF_G(server_array) = NULL;
+   IF_G(env_array) = NULL;
+   IF_G(session_array) = NULL;
+   return SUCCESS;
+}
+
 static void php_zval_filter(zval **value, long filter, long flags, zval 
*options, char* charset, zend_bool copy TSRMLS_DC) /* {{{ */
 {
filter_list_entry  filter_func;
http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.c?r1=1.234r2=1.235diff_format=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.234 php-src/main/SAPI.c:1.235
--- php-src/main/SAPI.c:1.234   Thu Mar 26 20:02:53 2009
+++ php-src/main/SAPI.c Tue Apr 28 22:59:07 2009
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.234 2009/03/26 20:02:53 felipe Exp $ */
+/* $Id: SAPI.c,v 1.235 2009/04/28 22:59:07 stas Exp $ */
 
 #include ctype.h
 #include sys/stat.h
@@ -345,6 +345,9 @@
sapi_module.activate(TSRMLS_C);
}
}
+   if (sapi_module.input_filter_init ) {
+   sapi_module.input_filter_init(TSRMLS_C);
+   }
 }
 
 /*
@@ -411,6 +414,9 @@
sapi_module.activate(TSRMLS_C);
}
}
+   if (sapi_module.input_filter_init ) {
+   sapi_module.input_filter_init(TSRMLS_C);
+   }
 }
 
 
@@ -852,13 +858,14 @@
return SUCCESS;
 }
 
-SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, 
char *var, char **val, unsigned int val_len, unsigned int *new_val_len 
TSRMLS_DC))
+SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, 
char *var, char **val, unsigned int val_len, unsigned int *new_val_len 
TSRMLS_DC), unsigned int (*input_filter_init)(TSRMLS_D))
 {
TSRMLS_FETCH();
if (SG(sapi_started)  EG(in_execution)) {
return FAILURE;
}
sapi_module.input_filter = input_filter;
+   sapi_module.input_filter_init = input_filter_init;
return SUCCESS;
 }
 
http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.h?r1=1.128r2=1.129diff_format=u
Index: php-src/main/SAPI.h
diff -u php-src/main/SAPI.h:1.128 php-src/main/SAPI.h:1.129
--- php-src/main/SAPI.h:1.128   Tue Mar 10 23:39:53 2009
+++ php-src/main/SAPI.h Tue Apr 28 22:59:07 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: SAPI.h,v 1.128 2009/03/10 23:39:53 helly Exp $ */
+/* $Id: SAPI.h,v 1.129 2009/04/28 22:59:07 stas Exp $ */
 
 #ifndef SAPI_H
 #define SAPI_H
@@ -192,7 +192,7 @@
 SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry 
TSRMLS_DC);
 SAPI_API int sapi_register_default_post_reader(void 
(*default_post_reader)(TSRMLS_D));
 SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, 
zval *destArray TSRMLS_DC));
-SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, 
char *var, char **val, unsigned int val_len, unsigned int *new_val_len 
TSRMLS_DC));

[PHP-CVS] cvs: php-src(PHP_5_3) /tests/classes inheritance_007.phpt

2009-04-28 Thread Felipe Pena
felipe  Tue Apr 28 23:46:27 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/tests/classes  inheritance_007.phpt 
  Log:
  - Fix test
  
http://cvs.php.net/viewvc.cgi/php-src/tests/classes/inheritance_007.phpt?r1=1.1.4.3r2=1.1.4.4diff_format=u
Index: php-src/tests/classes/inheritance_007.phpt
diff -u php-src/tests/classes/inheritance_007.phpt:1.1.4.3 
php-src/tests/classes/inheritance_007.phpt:1.1.4.4
--- php-src/tests/classes/inheritance_007.phpt:1.1.4.3  Tue Apr 28 10:30:56 2009
+++ php-src/tests/classes/inheritance_007.phpt  Tue Apr 28 23:46:27 2009
@@ -24,14 +24,14 @@
 [name]=
 string(1) B
 [class]=
-string(1) B
+string(1) A
   }
   [1]=
   object(ReflectionMethod)#%d (2) {
 [name]=
 string(1) A
 [class]=
-string(1) B
+string(1) A
   }
 }
 In A::A



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



[PHP-CVS] cvs: php-src(PHP_5_2) /tests/classes inheritance_007.phpt

2009-04-28 Thread Felipe Pena
felipe  Tue Apr 28 23:46:39 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/tests/classes  inheritance_007.phpt 
  Log:
  - Fix test
  
http://cvs.php.net/viewvc.cgi/php-src/tests/classes/inheritance_007.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u
Index: php-src/tests/classes/inheritance_007.phpt
diff -u php-src/tests/classes/inheritance_007.phpt:1.1.2.3 
php-src/tests/classes/inheritance_007.phpt:1.1.2.4
--- php-src/tests/classes/inheritance_007.phpt:1.1.2.3  Tue Apr 28 09:02:37 2009
+++ php-src/tests/classes/inheritance_007.phpt  Tue Apr 28 23:46:39 2009
@@ -24,14 +24,14 @@
 [name]=
 string(1) B
 [class]=
-string(1) B
+string(1) A
   }
   [1]=
   object(ReflectionMethod)#%d (2) {
 [name]=
 string(1) A
 [class]=
-string(1) B
+string(1) A
   }
 }
 In A::A



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



[PHP-CVS] cvs: php-src /tests/classes inheritance_007.phpt

2009-04-28 Thread Felipe Pena
felipe  Tue Apr 28 23:48:33 2009 UTC

  Modified files:  
/php-src/tests/classes  inheritance_007.phpt 
  Log:
  - Fix test
  
http://cvs.php.net/viewvc.cgi/php-src/tests/classes/inheritance_007.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/tests/classes/inheritance_007.phpt
diff -u php-src/tests/classes/inheritance_007.phpt:1.1 
php-src/tests/classes/inheritance_007.phpt:1.2
--- php-src/tests/classes/inheritance_007.phpt:1.1  Fri Dec  5 22:12:03 2008
+++ php-src/tests/classes/inheritance_007.phpt  Tue Apr 28 23:48:33 2009
@@ -21,19 +21,19 @@
 array(2) {
   [0]=
   object(ReflectionMethod)#%d (2) {
-[%u|b%name]=
-%string|unicode%(1) B
-[%u|b%class]=
-%string|unicode%(1) B
+[uname]=
+unicode(1) B
+[uclass]=
+unicode(1) A
   }
   [1]=
   object(ReflectionMethod)#%d (2) {
-[%u|b%name]=
-%string|unicode%(1) A
-[%u|b%class]=
-%string|unicode%(1) B
+[uname]=
+unicode(1) A
+[uclass]=
+unicode(1) A
   }
 }
 In A::A
 In A::A
-In A::B
\ No newline at end of file
+In A::B



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



[PHP-CVS] cvs: php-src /ext/phar phar.c phar_internal.h phar_object.c tar.c util.c zip.c

2009-04-28 Thread Greg Beaver
cellog  Wed Apr 29 03:24:09 2009 UTC

  Modified files:  
/php-src/ext/phar   phar.c phar_internal.h phar_object.c tar.c util.c 
zip.c 
  Log:
  MFPECL: fix PECL bug #16338, php_stream_copy_to_stream{,_ex}()
  http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.396r2=1.397diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.396 php-src/ext/phar/phar.c:1.397
--- php-src/ext/phar/phar.c:1.396   Fri Feb 20 05:06:52 2009
+++ php-src/ext/phar/phar.c Wed Apr 29 03:24:08 2009
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: phar.c,v 1.396 2009/02/20 05:06:52 cellog Exp $ */
+/* $Id: phar.c,v 1.397 2009/04/29 03:24:08 cellog Exp $ */
 
 #define PHAR_MAIN 1
 #include phar_internal.h
@@ -1635,7 +1635,7 @@
 
php_stream_filter_append(temp-writefilters, 
filter);
 
-   if (0 == php_stream_copy_to_stream(fp, temp, 
PHP_STREAM_COPY_ALL)) {
+   if (SUCCESS != phar_stream_copy_to_stream(fp, 
temp, PHP_STREAM_COPY_ALL, NULL)) {
if (err) {
php_stream_close(temp);
MAPPHAR_ALLOC_FAIL(unable to 
decompress gzipped phar archive \%s\, ext/zlib is buggy in PHP versions older 
than 5.2.6)
@@ -1677,7 +1677,7 @@
 
php_stream_filter_append(temp-writefilters, 
filter);
 
-   if (0 == php_stream_copy_to_stream(fp, temp, 
PHP_STREAM_COPY_ALL)) {
+   if (SUCCESS != phar_stream_copy_to_stream(fp, 
temp, PHP_STREAM_COPY_ALL, NULL)) {
php_stream_close(temp);
MAPPHAR_ALLOC_FAIL(unable to 
decompress bzipped phar archive \%s\ to temporary file)
}
@@ -2661,7 +2661,7 @@
size_t written;
 
if (!user_stub  phar-halt_offset  oldfile  
!phar-is_brandnew) {
-   written = php_stream_copy_to_stream(oldfile, newfile, 
phar-halt_offset);
+   phar_stream_copy_to_stream(oldfile, newfile, 
phar-halt_offset, written);
newstub = NULL;
} else {
/* this is either a brand new phar or a default stub 
overwrite */
@@ -2849,7 +2849,7 @@
return EOF;
}
php_stream_filter_append((entry-cfp-writefilters), filter);
-   if (entry-uncompressed_filesize != 
php_stream_copy_to_stream(file, entry-cfp, entry-uncompressed_filesize)) {
+   if (SUCCESS != phar_stream_copy_to_stream(file, entry-cfp, 
entry-uncompressed_filesize, NULL)) {
if (closeoldfile) {
php_stream_close(oldfile);
}
@@ -3059,7 +3059,7 @@
/* this will have changed for all files that have either 
changed compression or been modified */
entry-offset = entry-offset_abs = offset;
offset += entry-compressed_filesize;
-   wrote = php_stream_copy_to_stream(file, newfile, 
entry-compressed_filesize);
+   phar_stream_copy_to_stream(file, newfile, 
entry-compressed_filesize, wrote);
 
if (entry-compressed_filesize != wrote) {
if (closeoldfile) {
@@ -3207,7 +3207,7 @@
}
 
php_stream_filter_append(phar-fp-writefilters, 
filter);
-   php_stream_copy_to_stream(newfile, phar-fp, 
PHP_STREAM_COPY_ALL);
+   phar_stream_copy_to_stream(newfile, phar-fp, 
PHP_STREAM_COPY_ALL, NULL);
php_stream_filter_flush(filter, 1);
php_stream_filter_remove(filter, 1 TSRMLS_CC);
php_stream_close(phar-fp);
@@ -3216,14 +3216,14 @@
} else if (phar-flags  PHAR_FILE_COMPRESSED_BZ2) {
filter = php_stream_filter_create(bzip2.compress, 
NULL, php_stream_is_persistent(phar-fp) TSRMLS_CC);
php_stream_filter_append(phar-fp-writefilters, 
filter);
-   php_stream_copy_to_stream(newfile, phar-fp, 
PHP_STREAM_COPY_ALL);
+   phar_stream_copy_to_stream(newfile, phar-fp, 
PHP_STREAM_COPY_ALL, NULL);
php_stream_filter_flush(filter, 1);
php_stream_filter_remove(filter, 1 TSRMLS_CC);
php_stream_close(phar-fp);
/* use the temp stream as our base */
phar-fp = newfile;
} else {
-   php_stream_copy_to_stream(newfile, phar-fp, 
PHP_STREAM_COPY_ALL);
+   

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar phar.c phar_internal.h phar_object.c tar.c util.c zip.c

2009-04-28 Thread Greg Beaver
cellog  Wed Apr 29 03:24:27 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/phar   phar.c phar_internal.h phar_object.c tar.c util.c 
zip.c 
  Log:
  MFPECL: fix PECL bug #16338, php_stream_copy_to_stream{,_ex}()
  http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.58r2=1.370.2.59diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.370.2.58 php-src/ext/phar/phar.c:1.370.2.59
--- php-src/ext/phar/phar.c:1.370.2.58  Fri Feb 20 05:06:37 2009
+++ php-src/ext/phar/phar.c Wed Apr 29 03:24:26 2009
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: phar.c,v 1.370.2.58 2009/02/20 05:06:37 cellog Exp $ */
+/* $Id: phar.c,v 1.370.2.59 2009/04/29 03:24:26 cellog Exp $ */
 
 #define PHAR_MAIN 1
 #include phar_internal.h
@@ -1635,7 +1635,7 @@
 
php_stream_filter_append(temp-writefilters, 
filter);
 
-   if (0 == php_stream_copy_to_stream(fp, temp, 
PHP_STREAM_COPY_ALL)) {
+   if (SUCCESS != phar_stream_copy_to_stream(fp, 
temp, PHP_STREAM_COPY_ALL, NULL)) {
if (err) {
php_stream_close(temp);
MAPPHAR_ALLOC_FAIL(unable to 
decompress gzipped phar archive \%s\, ext/zlib is buggy in PHP versions older 
than 5.2.6)
@@ -1677,7 +1677,7 @@
 
php_stream_filter_append(temp-writefilters, 
filter);
 
-   if (0 == php_stream_copy_to_stream(fp, temp, 
PHP_STREAM_COPY_ALL)) {
+   if (SUCCESS != phar_stream_copy_to_stream(fp, 
temp, PHP_STREAM_COPY_ALL, NULL)) {
php_stream_close(temp);
MAPPHAR_ALLOC_FAIL(unable to 
decompress bzipped phar archive \%s\ to temporary file)
}
@@ -2661,7 +2661,7 @@
size_t written;
 
if (!user_stub  phar-halt_offset  oldfile  
!phar-is_brandnew) {
-   written = php_stream_copy_to_stream(oldfile, newfile, 
phar-halt_offset);
+   phar_stream_copy_to_stream(oldfile, newfile, 
phar-halt_offset, written);
newstub = NULL;
} else {
/* this is either a brand new phar or a default stub 
overwrite */
@@ -2849,7 +2849,7 @@
return EOF;
}
php_stream_filter_append((entry-cfp-writefilters), filter);
-   if (entry-uncompressed_filesize != 
php_stream_copy_to_stream(file, entry-cfp, entry-uncompressed_filesize)) {
+   if (SUCCESS != phar_stream_copy_to_stream(file, entry-cfp, 
entry-uncompressed_filesize, NULL)) {
if (closeoldfile) {
php_stream_close(oldfile);
}
@@ -3059,7 +3059,7 @@
/* this will have changed for all files that have either 
changed compression or been modified */
entry-offset = entry-offset_abs = offset;
offset += entry-compressed_filesize;
-   wrote = php_stream_copy_to_stream(file, newfile, 
entry-compressed_filesize);
+   phar_stream_copy_to_stream(file, newfile, 
entry-compressed_filesize, wrote);
 
if (entry-compressed_filesize != wrote) {
if (closeoldfile) {
@@ -3207,7 +3207,7 @@
}
 
php_stream_filter_append(phar-fp-writefilters, 
filter);
-   php_stream_copy_to_stream(newfile, phar-fp, 
PHP_STREAM_COPY_ALL);
+   phar_stream_copy_to_stream(newfile, phar-fp, 
PHP_STREAM_COPY_ALL, NULL);
php_stream_filter_flush(filter, 1);
php_stream_filter_remove(filter, 1 TSRMLS_CC);
php_stream_close(phar-fp);
@@ -3216,14 +3216,14 @@
} else if (phar-flags  PHAR_FILE_COMPRESSED_BZ2) {
filter = php_stream_filter_create(bzip2.compress, 
NULL, php_stream_is_persistent(phar-fp) TSRMLS_CC);
php_stream_filter_append(phar-fp-writefilters, 
filter);
-   php_stream_copy_to_stream(newfile, phar-fp, 
PHP_STREAM_COPY_ALL);
+   phar_stream_copy_to_stream(newfile, phar-fp, 
PHP_STREAM_COPY_ALL, NULL);
php_stream_filter_flush(filter, 1);
php_stream_filter_remove(filter, 1 TSRMLS_CC);
php_stream_close(phar-fp);
/* use the temp stream as our base */
phar-fp = newfile;
} else {
-   php_stream_copy_to_stream(newfile, phar-fp, 
PHP_STREAM_COPY_ALL);
+