Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ext/iconv/tests/ iconv_stream_filter_delimiter.phpt

2009-07-28 Thread Moriyoshi Koizumi
Huh? I guess this was added to 5.2 as well, and I don't think it got
reverted at some point.

Moriyoshi

On Tue, Jul 28, 2009 at 8:08 AM, Rasmus Lerdorfras...@php.net wrote:
 rasmus                                   Mon, 27 Jul 2009 23:08:23 +

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

 Log:
 We don't support . as a delimiter here in PHP 5.2.  Support was added in 5.3

 Changed paths:
    U   
 php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt

 Modified: 
 php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
 ===
 --- 
 php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
      2009-07-27 22:12:35 UTC (rev 286430)
 +++ 
 php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
      2009-07-27 23:08:23 UTC (rev 286431)
 @@ -40,10 +40,12 @@
  string(20) a4b3a4f3a4cba4c1a4cf
  string(10) 69636f6e76
  string(2) 0a
 -string(20) a4b3a4f3a4cba4c1a4cf
 -string(10) 69636f6e76
 -string(2) 0a

 +Warning: stream_filter_append(): unable to create or locate filter 
 convert.iconv.ISO-2022-JP.EUC-JP in %s/iconv_stream_filter_delimiter.php on 
 line %d
 +string(20) 1b244224332473244b24
 +string(10) 41244f1b28
 +string(2) 42
 +
  Warning: stream_filter_append(): unable to create or locate filter 
 convert.iconv.ISO-2022-JP\0EUC-JP in %s/iconv_stream_filter_delimiter.php 
 on line %d
  string(20) 1b244224332473244b24
  string(10) 41244f1b28


 --
 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] svn: /php/php-src/branches/PHP_5_2/ext/iconv/tests/ iconv_stream_filter_delimiter.phpt

2009-07-28 Thread Rasmus Lerdorf
I don't see the code in 5.2.

Look at the php_iconv_stream_filter_factory_create() function in iconv.c
On line 2787 in 5.2 it says:

if ((to_charset = strchr(from_charset, '/')) == NULL) {

In the same function in 5.3 it says:

if ((to_charset = strpbrk(from_charset, /.)) == NULL) {

Unless I am completely reading the code wrong, '.' is not supporrted in
5.2, and since the test case is failing on the . separator the test
seems to agree.

-Rasmus


Moriyoshi Koizumi wrote:
 Huh? I guess this was added to 5.2 as well, and I don't think it got
 reverted at some point.
 
 Moriyoshi
 
 On Tue, Jul 28, 2009 at 8:08 AM, Rasmus Lerdorfras...@php.net wrote:
 rasmus   Mon, 27 Jul 2009 23:08:23 +

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

 Log:
 We don't support . as a delimiter here in PHP 5.2.  Support was added in 5.3

 Changed paths:
U   
 php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt

 Modified: 
 php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
 ===
 --- 
 php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
  2009-07-27 22:12:35 UTC (rev 286430)
 +++ 
 php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
  2009-07-27 23:08:23 UTC (rev 286431)
 @@ -40,10 +40,12 @@
  string(20) a4b3a4f3a4cba4c1a4cf
  string(10) 69636f6e76
  string(2) 0a
 -string(20) a4b3a4f3a4cba4c1a4cf
 -string(10) 69636f6e76
 -string(2) 0a

 +Warning: stream_filter_append(): unable to create or locate filter 
 convert.iconv.ISO-2022-JP.EUC-JP in %s/iconv_stream_filter_delimiter.php 
 on line %d
 +string(20) 1b244224332473244b24
 +string(10) 41244f1b28
 +string(2) 42
 +
  Warning: stream_filter_append(): unable to create or locate filter 
 convert.iconv.ISO-2022-JP\0EUC-JP in %s/iconv_stream_filter_delimiter.php 
 on line %d
  string(20) 1b244224332473244b24
  string(10) 41244f1b28


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

 


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



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/session/config.m4 branches/PHP_5_2/ext/session/session.c branches/PHP_5_3/ext/session/config.m4 branches/PHP_5_3/ext/session/session.c trunk/ext/sessi

2009-07-28 Thread Antony Dovgal
tony2001 Tue, 28 Jul 2009 08:54:23 +

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

Log:
fix segfault in session/tests/031.phpt by adding optional extension
dependency (php_hash_hashtable has to be initialized when setting
session.hash_function)

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/session/config.m4
U   php/php-src/branches/PHP_5_2/ext/session/session.c
U   php/php-src/branches/PHP_5_3/ext/session/config.m4
U   php/php-src/branches/PHP_5_3/ext/session/session.c
U   php/php-src/trunk/ext/session/config.m4
U   php/php-src/trunk/ext/session/session.c

Modified: php/php-src/branches/PHP_5_2/ext/session/config.m4
===
--- php/php-src/branches/PHP_5_2/ext/session/config.m4  2009-07-28 08:39:07 UTC 
(rev 286442)
+++ php/php-src/branches/PHP_5_2/ext/session/config.m4  2009-07-28 08:54:23 UTC 
(rev 286443)
@@ -12,6 +12,7 @@
   PHP_PWRITE_TEST
   PHP_PREAD_TEST
   PHP_NEW_EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, 
$ext_shared)
+  PHP_ADD_EXTENSION_DEP(session, hash)
   PHP_SUBST(SESSION_SHARED_LIBADD)
   PHP_INSTALL_HEADERS(ext/session, [php_session.h mod_files.h mod_user.h])
   AC_DEFINE(HAVE_PHP_SESSION,1,[ ])

Modified: php/php-src/branches/PHP_5_2/ext/session/session.c
===
--- php/php-src/branches/PHP_5_2/ext/session/session.c  2009-07-28 08:39:07 UTC 
(rev 286442)
+++ php/php-src/branches/PHP_5_2/ext/session/session.c  2009-07-28 08:54:23 UTC 
(rev 286443)
@@ -2107,8 +2107,16 @@
 }
 /* }}} */

+static const zend_module_dep session_deps[] = { /* {{{ */
+   ZEND_MOD_OPTIONAL(hash)
+   {NULL, NULL, NULL}
+};
+/* }}} */
+
 zend_module_entry session_module_entry = {
-   STANDARD_MODULE_HEADER,
+   STANDARD_MODULE_HEADER_EX,
+   NULL,
+   session_deps,
session,
session_functions,
PHP_MINIT(session), PHP_MSHUTDOWN(session),

Modified: php/php-src/branches/PHP_5_3/ext/session/config.m4
===
--- php/php-src/branches/PHP_5_3/ext/session/config.m4  2009-07-28 08:39:07 UTC 
(rev 286442)
+++ php/php-src/branches/PHP_5_3/ext/session/config.m4  2009-07-28 08:54:23 UTC 
(rev 286443)
@@ -12,6 +12,7 @@
   PHP_PWRITE_TEST
   PHP_PREAD_TEST
   PHP_NEW_EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, 
$ext_shared)
+  PHP_ADD_EXTENSION_DEP(session, hash)
   PHP_SUBST(SESSION_SHARED_LIBADD)
   PHP_INSTALL_HEADERS(ext/session, [php_session.h mod_files.h mod_user.h])
   AC_DEFINE(HAVE_PHP_SESSION,1,[ ])

Modified: php/php-src/branches/PHP_5_3/ext/session/session.c
===
--- php/php-src/branches/PHP_5_3/ext/session/session.c  2009-07-28 08:39:07 UTC 
(rev 286442)
+++ php/php-src/branches/PHP_5_3/ext/session/session.c  2009-07-28 08:54:23 UTC 
(rev 286443)
@@ -2248,8 +2248,16 @@
 }
 /* }}} */

+static const zend_module_dep session_deps[] = { /* {{{ */
+   ZEND_MOD_OPTIONAL(hash)
+   {NULL, NULL, NULL}
+};
+/* }}} */
+
 zend_module_entry session_module_entry = {
-   STANDARD_MODULE_HEADER,
+   STANDARD_MODULE_HEADER_EX,
+   NULL,
+   session_deps,
session,
session_functions,
PHP_MINIT(session), PHP_MSHUTDOWN(session),

Modified: php/php-src/trunk/ext/session/config.m4
===
--- php/php-src/trunk/ext/session/config.m4 2009-07-28 08:39:07 UTC (rev 
286442)
+++ php/php-src/trunk/ext/session/config.m4 2009-07-28 08:54:23 UTC (rev 
286443)
@@ -12,6 +12,7 @@
   PHP_PWRITE_TEST
   PHP_PREAD_TEST
   PHP_NEW_EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, 
$ext_shared)
+  PHP_ADD_EXTENSION_DEP(session, hash)
   PHP_SUBST(SESSION_SHARED_LIBADD)
   PHP_INSTALL_HEADERS(ext/session, [php_session.h mod_files.h mod_user.h])
   AC_DEFINE(HAVE_PHP_SESSION,1,[ ])

Modified: php/php-src/trunk/ext/session/session.c
===
--- php/php-src/trunk/ext/session/session.c 2009-07-28 08:39:07 UTC (rev 
286442)
+++ php/php-src/trunk/ext/session/session.c 2009-07-28 08:54:23 UTC (rev 
286443)
@@ -2352,8 +2352,16 @@

 } /* }}} */

+static const zend_module_dep session_deps[] = { /* {{{ */
+   ZEND_MOD_OPTIONAL(hash)
+   {NULL, NULL, NULL}
+};
+/* }}} */
+
 zend_module_entry session_module_entry = {
-   STANDARD_MODULE_HEADER,
+   STANDARD_MODULE_HEADER_EX,
+   NULL,
+   session_deps,
session,
session_functions,
PHP_MINIT(session), PHP_MSHUTDOWN(session),

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/session/config.m4 branches/PHP_5_3/ext/session/config.m4 trunk/ext/session/config.m4

2009-07-28 Thread Antony Dovgal
tony2001 Tue, 28 Jul 2009 08:59:08 +

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

Log:
configure dependency has to be optional as well

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/session/config.m4
U   php/php-src/branches/PHP_5_3/ext/session/config.m4
U   php/php-src/trunk/ext/session/config.m4

Modified: php/php-src/branches/PHP_5_2/ext/session/config.m4
===
--- php/php-src/branches/PHP_5_2/ext/session/config.m4  2009-07-28 08:57:34 UTC 
(rev 286444)
+++ php/php-src/branches/PHP_5_2/ext/session/config.m4  2009-07-28 08:59:08 UTC 
(rev 286445)
@@ -12,7 +12,7 @@
   PHP_PWRITE_TEST
   PHP_PREAD_TEST
   PHP_NEW_EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, 
$ext_shared)
-  PHP_ADD_EXTENSION_DEP(session, hash)
+  PHP_ADD_EXTENSION_DEP(session, hash, true)
   PHP_SUBST(SESSION_SHARED_LIBADD)
   PHP_INSTALL_HEADERS(ext/session, [php_session.h mod_files.h mod_user.h])
   AC_DEFINE(HAVE_PHP_SESSION,1,[ ])

Modified: php/php-src/branches/PHP_5_3/ext/session/config.m4
===
--- php/php-src/branches/PHP_5_3/ext/session/config.m4  2009-07-28 08:57:34 UTC 
(rev 286444)
+++ php/php-src/branches/PHP_5_3/ext/session/config.m4  2009-07-28 08:59:08 UTC 
(rev 286445)
@@ -12,7 +12,7 @@
   PHP_PWRITE_TEST
   PHP_PREAD_TEST
   PHP_NEW_EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, 
$ext_shared)
-  PHP_ADD_EXTENSION_DEP(session, hash)
+  PHP_ADD_EXTENSION_DEP(session, hash, true)
   PHP_SUBST(SESSION_SHARED_LIBADD)
   PHP_INSTALL_HEADERS(ext/session, [php_session.h mod_files.h mod_user.h])
   AC_DEFINE(HAVE_PHP_SESSION,1,[ ])

Modified: php/php-src/trunk/ext/session/config.m4
===
--- php/php-src/trunk/ext/session/config.m4 2009-07-28 08:57:34 UTC (rev 
286444)
+++ php/php-src/trunk/ext/session/config.m4 2009-07-28 08:59:08 UTC (rev 
286445)
@@ -12,7 +12,7 @@
   PHP_PWRITE_TEST
   PHP_PREAD_TEST
   PHP_NEW_EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, 
$ext_shared)
-  PHP_ADD_EXTENSION_DEP(session, hash)
+  PHP_ADD_EXTENSION_DEP(session, hash, true)
   PHP_SUBST(SESSION_SHARED_LIBADD)
   PHP_INSTALL_HEADERS(ext/session, [php_session.h mod_files.h mod_user.h])
   AC_DEFINE(HAVE_PHP_SESSION,1,[ ])

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

Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ext/iconv/tests/ iconv_stream_filter_delimiter.phpt

2009-07-28 Thread Moriyoshi Koizumi
Hmm.. it should have been there. I'm gonna fix it then. Sorry for bothering you.

Moriyoshi

On Tue, Jul 28, 2009 at 5:40 PM, Rasmus Lerdorfras...@lerdorf.com wrote:
 I don't see the code in 5.2.

 Look at the php_iconv_stream_filter_factory_create() function in iconv.c
 On line 2787 in 5.2 it says:

    if ((to_charset = strchr(from_charset, '/')) == NULL) {

 In the same function in 5.3 it says:

    if ((to_charset = strpbrk(from_charset, /.)) == NULL) {

 Unless I am completely reading the code wrong, '.' is not supporrted in
 5.2, and since the test case is failing on the . separator the test
 seems to agree.

 -Rasmus


 Moriyoshi Koizumi wrote:
 Huh? I guess this was added to 5.2 as well, and I don't think it got
 reverted at some point.

 Moriyoshi

 On Tue, Jul 28, 2009 at 8:08 AM, Rasmus Lerdorfras...@php.net wrote:
 rasmus                                   Mon, 27 Jul 2009 23:08:23 +

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

 Log:
 We don't support . as a delimiter here in PHP 5.2.  Support was added in 5.3

 Changed paths:
    U   
 php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt

 Modified: 
 php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
 ===
 --- 
 php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
      2009-07-27 22:12:35 UTC (rev 286430)
 +++ 
 php/php-src/branches/PHP_5_2/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
      2009-07-27 23:08:23 UTC (rev 286431)
 @@ -40,10 +40,12 @@
  string(20) a4b3a4f3a4cba4c1a4cf
  string(10) 69636f6e76
  string(2) 0a
 -string(20) a4b3a4f3a4cba4c1a4cf
 -string(10) 69636f6e76
 -string(2) 0a

 +Warning: stream_filter_append(): unable to create or locate filter 
 convert.iconv.ISO-2022-JP.EUC-JP in %s/iconv_stream_filter_delimiter.php 
 on line %d
 +string(20) 1b244224332473244b24
 +string(10) 41244f1b28
 +string(2) 42
 +
  Warning: stream_filter_append(): unable to create or locate filter 
 convert.iconv.ISO-2022-JP\0EUC-JP in %s/iconv_stream_filter_delimiter.php 
 on line %d
  string(20) 1b244224332473244b24
  string(10) 41244f1b28


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




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



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



[PHP-CVS] svn: /php/php-src/trunk/ext/mysql/ php_mysql.c

2009-07-28 Thread Ilia Alshanetsky
iliaaTue, 28 Jul 2009 12:26:16 +

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

Log:
Fixed compiler warning

Changed paths:
U   php/php-src/trunk/ext/mysql/php_mysql.c

Modified: php/php-src/trunk/ext/mysql/php_mysql.c
===
--- php/php-src/trunk/ext/mysql/php_mysql.c 2009-07-28 11:22:26 UTC (rev 
286450)
+++ php/php-src/trunk/ext/mysql/php_mysql.c 2009-07-28 12:26:16 UTC (rev 
286451)
@@ -625,7 +625,7 @@
int hashed_details_length, port = MYSQL_PORT;
long client_flags = 0;
php_mysql_conn *mysql=NULL;
-#if !defined(MYSQL_USE_MYSQLND)  !defined(MYSQL_HASH_SET_CHARSET)
+#if !defined(MYSQL_USE_MYSQLND)  !defined(MYSQL_HAS_SET_CHARSET)
char *encoding;
 #endif
 #if MYSQL_VERSION_ID = 32230

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS Zend/tests/bug48912.phpt Zend/zend_vm_def.h Zend/zend_vm_execute.h

2009-07-28 Thread Dmitry Stogov
dmitry   Tue, 28 Jul 2009 12:35:27 +

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

Log:
Fixed bug #48912 (Namespace causes unexpected strict behaviour with extract())

Bug: http://bugs.php.net/48912 (Assigned) Namespace causes unexpected strict 
behaviour with extract()
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
A   php/php-src/branches/PHP_5_3/Zend/tests/bug48912.phpt
U   php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h
U   php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-07-28 12:26:16 UTC (rev 286451)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-07-28 12:35:27 UTC (rev 286452)
@@ -27,6 +27,8 @@
   (Ilia)
 - Fixed bug #48929 (Double \r\n after HTTP headers when header context
   option is an array). (David Zülke)
+- Fixed bug #48912 (Namespace causes unexpected strict behaviour with
+  extract()). (Dmitry)
 - Fixed bug #48899 (is_callable returns true even if method does not exist in
   parent class). (Felipe)
 - Fixed bug #48893 (Problems compiling with Curl). (Felipe)

Added: php/php-src/branches/PHP_5_3/Zend/tests/bug48912.phpt
===
--- php/php-src/branches/PHP_5_3/Zend/tests/bug48912.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/Zend/tests/bug48912.phpt   2009-07-28 
12:35:27 UTC (rev 286452)
@@ -0,0 +1,16 @@
+--TEST--
+Bug #48912 (Namespace causes unexpected strict behaviour with extract())
+--FILE--
+?php
+namespace A;
+
+function test()
+{
+   extract(func_get_arg(0));
+}
+
+test(array('x' = 1));
+echo ok\n;
+?
+--EXPECT--
+ok

Modified: php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h
===
--- php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h 2009-07-28 12:26:16 UTC 
(rev 286451)
+++ php/php-src/branches/PHP_5_3/Zend/zend_vm_def.h 2009-07-28 12:35:27 UTC 
(rev 286452)
@@ -2662,7 +2662,9 @@
} else {
zval *valptr;

-   if (!(opline-extended_value  ZEND_ARG_SEND_SILENT)) {
+   if ((opline-extended_value  ZEND_ARG_COMPILE_TIME_BOUND) ?
+   !(opline-extended_value  ZEND_ARG_SEND_SILENT) :
+   !ARG_MAY_BE_SENT_BY_REF(EX(fbc), 
opline-op2.u.opline_num)) {
zend_error(E_STRICT, Only variables should be passed 
by reference);
}
ALLOC_ZVAL(valptr);

Modified: php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h
===
--- php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h 2009-07-28 12:26:16 UTC 
(rev 286451)
+++ php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h 2009-07-28 12:35:27 UTC 
(rev 286452)
@@ -8278,7 +8278,9 @@
} else {
zval *valptr;

-   if (!(opline-extended_value  ZEND_ARG_SEND_SILENT)) {
+   if ((opline-extended_value  ZEND_ARG_COMPILE_TIME_BOUND) ?
+   !(opline-extended_value  ZEND_ARG_SEND_SILENT) :
+   !ARG_MAY_BE_SENT_BY_REF(EX(fbc), 
opline-op2.u.opline_num)) {
zend_error(E_STRICT, Only variables should be passed 
by reference);
}
ALLOC_ZVAL(valptr);
@@ -22128,7 +22130,9 @@
} else {
zval *valptr;

-   if (!(opline-extended_value  ZEND_ARG_SEND_SILENT)) {
+   if ((opline-extended_value  ZEND_ARG_COMPILE_TIME_BOUND) ?
+   !(opline-extended_value  ZEND_ARG_SEND_SILENT) :
+   !ARG_MAY_BE_SENT_BY_REF(EX(fbc), 
opline-op2.u.opline_num)) {
zend_error(E_STRICT, Only variables should be passed 
by reference);
}
ALLOC_ZVAL(valptr);

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

[PHP-CVS] svn: /php/php-src/trunk/Zend/ tests/bug48912.phpt zend_vm_def.h zend_vm_execute.h

2009-07-28 Thread Dmitry Stogov
dmitry   Tue, 28 Jul 2009 12:36:08 +

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

Log:
Fixed bug #48912 (Namespace causes unexpected strict behaviour with extract())

Bug: http://bugs.php.net/48912 (Assigned) Namespace causes unexpected strict 
behaviour with extract()
  
Changed paths:
A   php/php-src/trunk/Zend/tests/bug48912.phpt
U   php/php-src/trunk/Zend/zend_vm_def.h
U   php/php-src/trunk/Zend/zend_vm_execute.h

Added: php/php-src/trunk/Zend/tests/bug48912.phpt
===
--- php/php-src/trunk/Zend/tests/bug48912.phpt  (rev 0)
+++ php/php-src/trunk/Zend/tests/bug48912.phpt  2009-07-28 12:36:08 UTC (rev 
286453)
@@ -0,0 +1,16 @@
+--TEST--
+Bug #48912 (Namespace causes unexpected strict behaviour with extract())
+--FILE--
+?php
+namespace A;
+
+function test()
+{
+   extract(func_get_arg(0));
+}
+
+test(array('x' = 1));
+echo ok\n;
+?
+--EXPECT--
+ok

Modified: php/php-src/trunk/Zend/zend_vm_def.h
===
--- php/php-src/trunk/Zend/zend_vm_def.h2009-07-28 12:35:27 UTC (rev 
286452)
+++ php/php-src/trunk/Zend/zend_vm_def.h2009-07-28 12:36:08 UTC (rev 
286453)
@@ -2749,7 +2749,9 @@
} else {
zval *valptr;

-   if (!(opline-extended_value  ZEND_ARG_SEND_SILENT)) {
+   if ((opline-extended_value  ZEND_ARG_COMPILE_TIME_BOUND) ?
+   !(opline-extended_value  ZEND_ARG_SEND_SILENT) :
+   !ARG_MAY_BE_SENT_BY_REF(EX(fbc), 
opline-op2.u.opline_num)) {
zend_error(E_STRICT, Only variables should be passed 
by reference);
}
ALLOC_ZVAL(valptr);

Modified: php/php-src/trunk/Zend/zend_vm_execute.h
===
--- php/php-src/trunk/Zend/zend_vm_execute.h2009-07-28 12:35:27 UTC (rev 
286452)
+++ php/php-src/trunk/Zend/zend_vm_execute.h2009-07-28 12:36:08 UTC (rev 
286453)
@@ -24,9 +24,6 @@

 static opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* 
op);

-#ifdef PHP_WIN32
-#pragma warning (disable:4101)
-#endif

 #define ZEND_VM_CONTINUE()   return 0
 #define ZEND_VM_RETURN() return 1
@@ -653,12 +650,12 @@
for (i=0; iEX(op_array)-last_brk_cont; i++) {
if (EX(op_array)-brk_cont_array[i].start  0) {
continue;
-   } else if ((zend_uint)EX(op_array)-brk_cont_array[i].start  
op_num) {
+   } else if (EX(op_array)-brk_cont_array[i].start  op_num) {
/* further blocks will not be relevant... */
break;
-   } else if (op_num  
(zend_uint)EX(op_array)-brk_cont_array[i].brk) {
+   } else if (op_num  EX(op_array)-brk_cont_array[i].brk) {
if (!catched ||
-   catch_op_num = 
(zend_uint)EX(op_array)-brk_cont_array[i].brk) {
+   catch_op_num = 
EX(op_array)-brk_cont_array[i].brk) {
zend_op *brk_opline = 
EX(op_array)-opcodes[EX(op_array)-brk_cont_array[i].brk];

switch (brk_opline-opcode) {
@@ -8573,7 +8570,9 @@
} else {
zval *valptr;

-   if (!(opline-extended_value  ZEND_ARG_SEND_SILENT)) {
+   if ((opline-extended_value  ZEND_ARG_COMPILE_TIME_BOUND) ?
+   !(opline-extended_value  ZEND_ARG_SEND_SILENT) :
+   !ARG_MAY_BE_SENT_BY_REF(EX(fbc), 
opline-op2.u.opline_num)) {
zend_error(E_STRICT, Only variables should be passed 
by reference);
}
ALLOC_ZVAL(valptr);
@@ -23106,7 +23105,9 @@
} else {
zval *valptr;

-   if (!(opline-extended_value  ZEND_ARG_SEND_SILENT)) {
+   if ((opline-extended_value  ZEND_ARG_COMPILE_TIME_BOUND) ?
+   !(opline-extended_value  ZEND_ARG_SEND_SILENT) :
+   !ARG_MAY_BE_SENT_BY_REF(EX(fbc), 
opline-op2.u.opline_num)) {
zend_error(E_STRICT, Only variables should be passed 
by reference);
}
ALLOC_ZVAL(valptr);
@@ -31297,7 +31298,6 @@
 static int ZEND_FASTCALL ZEND_NULL_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
 {
zend_error_noreturn(E_ERROR, Invalid opcode %d/%d/%d., 
EX(opline)-opcode, EX(opline)-op1.op_type, EX(opline)-op2.op_type);
-   return 0;
 }



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

[PHP-CVS] svn: /php/php-src/trunk/Zend/ tests/bug49037.phpt zend_vm_def.h zend_vm_execute.h

2009-07-28 Thread Dmitry Stogov
dmitry   Tue, 28 Jul 2009 13:01:40 +

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

Log:
Fixed bug #49037 (@list( $b ) = $a; causes a crash)

Bug: http://bugs.php.net/49037 (Assigned) @list( $b ) = $a; causes a crash
  
Changed paths:
A   php/php-src/trunk/Zend/tests/bug49037.phpt
U   php/php-src/trunk/Zend/zend_vm_def.h
U   php/php-src/trunk/Zend/zend_vm_execute.h

Added: php/php-src/trunk/Zend/tests/bug49037.phpt
===
--- php/php-src/trunk/Zend/tests/bug49037.phpt  (rev 0)
+++ php/php-src/trunk/Zend/tests/bug49037.phpt  2009-07-28 13:01:40 UTC (rev 
286454)
@@ -0,0 +1,14 @@
+--TEST--
+Bug #49037 (@list( $b ) = $a; causes a crash)
+--FILE--
+?php
+$a = array( c );
+...@list( $b ) = $a;
+print_r( $a );
+?
+--EXPECT--
+Array
+(
+[0] = c
+)
+

Modified: php/php-src/trunk/Zend/zend_vm_def.h
===
--- php/php-src/trunk/Zend/zend_vm_def.h2009-07-28 12:36:08 UTC (rev 
286453)
+++ php/php-src/trunk/Zend/zend_vm_def.h2009-07-28 13:01:40 UTC (rev 
286454)
@@ -1491,6 +1491,9 @@
if (OP1_TYPE == IS_VAR  EX_T(opline-op1.u.var).var.ptr == NULL) {
zend_error_noreturn(E_ERROR, Cannot use string offset as an 
array);
}
+   if (OP1_TYPE == IS_VAR  EX_T(opline-op1.u.var).var.ptr_ptr) {
+   PZVAL_LOCK(*EX_T(opline-op1.u.var).var.ptr_ptr);
+   }
container = GET_OP1_ZVAL_PTR(BP_VAR_R);
if (Z_TYPE_P(container) != IS_ARRAY) {
if (!RETURN_VALUE_UNUSED(opline-result)) {

Modified: php/php-src/trunk/Zend/zend_vm_execute.h
===
--- php/php-src/trunk/Zend/zend_vm_execute.h2009-07-28 12:36:08 UTC (rev 
286453)
+++ php/php-src/trunk/Zend/zend_vm_execute.h2009-07-28 13:01:40 UTC (rev 
286454)
@@ -2680,6 +2680,9 @@
if (IS_CONST == IS_VAR  EX_T(opline-op1.u.var).var.ptr == NULL) {
zend_error_noreturn(E_ERROR, Cannot use string offset as an 
array);
}
+   if (IS_CONST == IS_VAR  EX_T(opline-op1.u.var).var.ptr_ptr) {
+   PZVAL_LOCK(*EX_T(opline-op1.u.var).var.ptr_ptr);
+   }
container = opline-op1.u.constant;
if (Z_TYPE_P(container) != IS_ARRAY) {
if (!RETURN_VALUE_UNUSED(opline-result)) {
@@ -6117,6 +6120,9 @@
if (IS_TMP_VAR == IS_VAR  EX_T(opline-op1.u.var).var.ptr == NULL) {
zend_error_noreturn(E_ERROR, Cannot use string offset as an 
array);
}
+   if (IS_TMP_VAR == IS_VAR  EX_T(opline-op1.u.var).var.ptr_ptr) {
+   PZVAL_LOCK(*EX_T(opline-op1.u.var).var.ptr_ptr);
+   }
container = _get_zval_ptr_tmp(opline-op1, EX(Ts), free_op1 
TSRMLS_CC);
if (Z_TYPE_P(container) != IS_ARRAY) {
if (!RETURN_VALUE_UNUSED(opline-result)) {
@@ -10579,6 +10585,9 @@
if (IS_VAR == IS_VAR  EX_T(opline-op1.u.var).var.ptr == NULL) {
zend_error_noreturn(E_ERROR, Cannot use string offset as an 
array);
}
+   if (IS_VAR == IS_VAR  EX_T(opline-op1.u.var).var.ptr_ptr) {
+   PZVAL_LOCK(*EX_T(opline-op1.u.var).var.ptr_ptr);
+   }
container = _get_zval_ptr_var(opline-op1, EX(Ts), free_op1 
TSRMLS_CC);
if (Z_TYPE_P(container) != IS_ARRAY) {
if (!RETURN_VALUE_UNUSED(opline-result)) {
@@ -24941,6 +24950,9 @@
if (IS_CV == IS_VAR  EX_T(opline-op1.u.var).var.ptr == NULL) {
zend_error_noreturn(E_ERROR, Cannot use string offset as an 
array);
}
+   if (IS_CV == IS_VAR  EX_T(opline-op1.u.var).var.ptr_ptr) {
+   PZVAL_LOCK(*EX_T(opline-op1.u.var).var.ptr_ptr);
+   }
container = _get_zval_ptr_cv(opline-op1, EX(Ts), BP_VAR_R TSRMLS_CC);
if (Z_TYPE_P(container) != IS_ARRAY) {
if (!RETURN_VALUE_UNUSED(opline-result)) {

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/iconv/tests/bug16069.phpt branches/PHP_5_3/ext/iconv/tests/bug16069.phpt trunk/ext/iconv/tests/bug16069.phpt

2009-07-28 Thread Rasmus Lerdorf
rasmus   Tue, 28 Jul 2009 14:56:08 +

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

Log:
Get rid of this platform-specific test

Changed paths:
D   php/php-src/branches/PHP_5_2/ext/iconv/tests/bug16069.phpt
D   php/php-src/branches/PHP_5_3/ext/iconv/tests/bug16069.phpt
D   php/php-src/trunk/ext/iconv/tests/bug16069.phpt

Deleted: php/php-src/branches/PHP_5_2/ext/iconv/tests/bug16069.phpt
===
--- php/php-src/branches/PHP_5_2/ext/iconv/tests/bug16069.phpt  2009-07-28 
14:32:55 UTC (rev 286458)
+++ php/php-src/branches/PHP_5_2/ext/iconv/tests/bug16069.phpt  2009-07-28 
14:56:08 UTC (rev 286459)
@@ -1,22 +0,0 @@
---TEST--
-Bug #16069 (ICONV transliteration failure)
---SKIPIF--
-?php
-include( 'skipif.inc' );
-if (@iconv('CP932', 'EUC-JP//TRANSLIT', \x87\x6d)=='') {
-   die(skip  CP932 to EUC-JP translit not available\n);
-}
-?
---INI--
-error_reporting=2039
---FILE--
-?php
-/* include('test.inc'); */
-/* charset=CP932, KOI8-R */
-$str = 
\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d;
-print iconv( CP932, EUC-JP//TRANSLIT, $str );
-$str = (\x9c\xe4\x9c);
-print iconv( KOI8-R, EUC-JP//TRANSLIT, $str );
-?
---EXPECT--
-�ߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��С���(�맥��)

Deleted: php/php-src/branches/PHP_5_3/ext/iconv/tests/bug16069.phpt
===
--- php/php-src/branches/PHP_5_3/ext/iconv/tests/bug16069.phpt  2009-07-28 
14:32:55 UTC (rev 286458)
+++ php/php-src/branches/PHP_5_3/ext/iconv/tests/bug16069.phpt  2009-07-28 
14:56:08 UTC (rev 286459)
@@ -1,22 +0,0 @@
---TEST--
-Bug #16069 (ICONV transliteration failure)
---SKIPIF--
-?php
-include( 'skipif.inc' );
-if (@iconv('CP932', 'EUC-JP//TRANSLIT', \x87\x6d)=='') {
-   die(skip  CP932 to EUC-JP translit not available\n);
-}
-?
---INI--
-error_reporting=2039
---FILE--
-?php
-/* include('test.inc'); */
-/* charset=CP932, KOI8-R */
-$str = 
\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d;
-print iconv( CP932, EUC-JP//TRANSLIT, $str );
-$str = (\x9c\xe4\x9c);
-print iconv( KOI8-R, EUC-JP//TRANSLIT, $str );
-?
---EXPECT--
-�ߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��С���(�맥��)

Deleted: php/php-src/trunk/ext/iconv/tests/bug16069.phpt
===
--- php/php-src/trunk/ext/iconv/tests/bug16069.phpt 2009-07-28 14:32:55 UTC 
(rev 286458)
+++ php/php-src/trunk/ext/iconv/tests/bug16069.phpt 2009-07-28 14:56:08 UTC 
(rev 286459)
@@ -1,21 +0,0 @@
---TEST--
-Bug #16069 (ICONV transliteration failure)
---SKIPIF--
-?php
-include( 'skipif.inc' );
-if (@iconv('CP932', 'EUC-JP//TRANSLIT', \x87\x6d)=='') {
-   die(skip  CP932 to EUC-JP translit not available\n);
-}
-?
---INI--
-error_reporting=2039
---FILE--
-?php
-/* charset=CP932, KOI8-R */
-$str = 
\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d\x87\x6d;
-print iconv( CP932, EUC-JP//TRANSLIT, $str );
-$str = (\x9c\xe4\x9c);
-print iconv( KOI8-R, EUC-JP//TRANSLIT, $str );
-?
---EXPECT--
-�ߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��Сߥ��С���(�맥��)

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/date/lib/timezonedb.h branches/PHP_5_3/ext/date/lib/timezonedb.h trunk/ext/date/lib/timezonedb.h

2009-07-28 Thread Derick Rethans
derick   Tue, 28 Jul 2009 15:25:16 +

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

Log:
- Updated to version 2009.11 (2009k)

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/date/lib/timezonedb.h
U   php/php-src/branches/PHP_5_3/ext/date/lib/timezonedb.h
U   php/php-src/trunk/ext/date/lib/timezonedb.h

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/gd/tests/bug43073.phpt branches/PHP_5_2/ext/gd/tests/bug48555.phpt branches/PHP_5_2/ext/gd/tests/bug48732.phpt branches/PHP_5_2/ext/standard/tests/str

2009-07-28 Thread Jani Taskinen
jani Tue, 28 Jul 2009 19:16:02 +

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

Log:
- Skip some tests in 32bit systems, add cleanups where missing

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/gd/tests/bug43073.phpt
U   php/php-src/branches/PHP_5_2/ext/gd/tests/bug48555.phpt
U   php/php-src/branches/PHP_5_2/ext/gd/tests/bug48732.phpt
U   php/php-src/branches/PHP_5_2/ext/standard/tests/strings/bug38770.phpt
U   
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation5.phpt
U   
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation8.phpt
U   php/php-src/branches/PHP_5_3/ext/gd/tests/bug43073.phpt
U   php/php-src/branches/PHP_5_3/ext/gd/tests/bug48555.phpt
U   php/php-src/branches/PHP_5_3/ext/gd/tests/bug48732.phpt
U   php/php-src/branches/PHP_5_3/ext/standard/tests/strings/bug38770.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation5.phpt
U   
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation8.phpt
U   php/php-src/trunk/ext/gd/tests/bug43073.phpt
U   php/php-src/trunk/ext/gd/tests/bug48555.phpt
U   php/php-src/trunk/ext/gd/tests/bug48732.phpt
U   php/php-src/trunk/ext/standard/tests/strings/bug38770.phpt
U   php/php-src/trunk/ext/standard/tests/strings/chunk_split_variation5.phpt
U   php/php-src/trunk/ext/standard/tests/strings/chunk_split_variation8.phpt

Modified: php/php-src/branches/PHP_5_2/ext/gd/tests/bug43073.phpt
===
--- php/php-src/branches/PHP_5_2/ext/gd/tests/bug43073.phpt	2009-07-28 15:44:49 UTC (rev 286463)
+++ php/php-src/branches/PHP_5_2/ext/gd/tests/bug43073.phpt	2009-07-28 19:16:02 UTC (rev 286464)
@@ -27,6 +27,8 @@
 }
 imagepng($g, $cwd/bug43073.png);
 ?
+--CLEAN--
+?php @unlink(dirname(__FILE__) . '/bug43073.png'); ?
 --EXPECTF--
 (500, 402), (610, 402), (610, 376), (500, 376)
 (492, 363), (591, 322), (580, 295), (480, 336)

Modified: php/php-src/branches/PHP_5_2/ext/gd/tests/bug48555.phpt
===
--- php/php-src/branches/PHP_5_2/ext/gd/tests/bug48555.phpt	2009-07-28 15:44:49 UTC (rev 286463)
+++ php/php-src/branches/PHP_5_2/ext/gd/tests/bug48555.phpt	2009-07-28 19:16:02 UTC (rev 286464)
@@ -9,9 +9,9 @@
 ?php
 $cwd = dirname(__FILE__);
 $font = $cwd/Tuffy.ttf;
-$box = ImageFTBBox(13, 0, $font, Text without line-break);
+$box = ImageFTBBox(14, 0, $font, Text without line-break);
 echo 'Top without line-break: ' . $box[7] . \n;
-$box = ImageFTBBox(13, 0, $font, Text with\nline-break\none more);
+$box = ImageFTBBox(14, 0, $font, Text with\nline-break\none more);
 echo 'Top with line-break: ' . $box[7] . \n;
 ?
 --EXPECTF--

Modified: php/php-src/branches/PHP_5_2/ext/gd/tests/bug48732.phpt
===
--- php/php-src/branches/PHP_5_2/ext/gd/tests/bug48732.phpt	2009-07-28 15:44:49 UTC (rev 286463)
+++ php/php-src/branches/PHP_5_2/ext/gd/tests/bug48732.phpt	2009-07-28 19:16:02 UTC (rev 286464)
@@ -16,5 +16,7 @@
 imagepng($g, $cwd/bug48732.png);
 echo 'Left Bottom: (' . $bbox[0]  . ', ' . $bbox[1] . ')';
 ?
+--CLEAN--
+?php @unlink(dirname(__FILE__) . '/bug48732.png'); ?
 --EXPECTF--
-Left Bottom: (0, 47)
\ No newline at end of file
+Left Bottom: (0, 47)

Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/strings/bug38770.phpt
===
--- php/php-src/branches/PHP_5_2/ext/standard/tests/strings/bug38770.phpt	2009-07-28 15:44:49 UTC (rev 286463)
+++ php/php-src/branches/PHP_5_2/ext/standard/tests/strings/bug38770.phpt	2009-07-28 19:16:02 UTC (rev 286464)
@@ -1,5 +1,9 @@
 --TEST--
 Bug #38770 (unpack() broken with longs on 64 bit machines)
+--SKIPIF--
+?php
+if (PHP_INT_SIZE != 8) die(skip this test is for 64bit platform only);
+?
 --FILE--
 ?php


Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation5.phpt
===
--- php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation5.phpt	2009-07-28 15:44:49 UTC (rev 286463)
+++ php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation5.phpt	2009-07-28 19:16:02 UTC (rev 286464)
@@ -1,5 +1,9 @@
 --TEST--
 Test chunk_split() function : usage variations - different integer values for 'chunklen' argument(Bug#42796)
+--SKIPIF--
+?php
+if (PHP_INT_SIZE != 8) die(skip this test is for 64bit platform only);
+?
 --FILE--
 ?php
 /* Prototype  : string chunk_split(string $str [, int $chunklen [, string $ending]])

Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation8.phpt
===
--- 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/openssl/tests/bug48182.phpt branches/PHP_5_2/ext/openssl/xp_ssl.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/openssl/tests/bug48

2009-07-28 Thread Sriram Natarajan
srinatar Tue, 28 Jul 2009 19:28:08 +

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

Log:
- 48182 ssl handshake fails during asynchronous socket connection

Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
A   php/php-src/branches/PHP_5_2/ext/openssl/tests/bug48182.phpt
U   php/php-src/branches/PHP_5_2/ext/openssl/xp_ssl.c
U   php/php-src/branches/PHP_5_3/NEWS
A   php/php-src/branches/PHP_5_3/ext/openssl/tests/bug48182.phpt
U   php/php-src/branches/PHP_5_3/ext/openssl/xp_ssl.c
A   php/php-src/trunk/ext/openssl/tests/bug48182.phpt
U   php/php-src/trunk/ext/openssl/xp_ssl.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS	2009-07-28 19:16:02 UTC (rev 286464)
+++ php/php-src/branches/PHP_5_2/NEWS	2009-07-28 19:28:08 UTC (rev 286465)
@@ -65,6 +65,8 @@
   (Paul Richards, Kalle)
 - Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()).
   (Sriram Natarajan)
+- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
+  (Sriram Natarajan)

 17 Jun 2009, PHP 5.2.10
 - Updated timezone database to version 2009.9 (2009i) (Derick)

Added: php/php-src/branches/PHP_5_2/ext/openssl/tests/bug48182.phpt
===
--- php/php-src/branches/PHP_5_2/ext/openssl/tests/bug48182.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/openssl/tests/bug48182.phpt	2009-07-28 19:28:08 UTC (rev 286465)
@@ -0,0 +1,92 @@
+--TEST--
+#48182,ssl handshake fails during asynchronous socket connection
+--SKIPIF--
+?php
+if (!extension_loaded(openssl)) die(skip, openssl required);
+if (!extension_loaded(pcntl)) die(skip, pcntl required);
+if (OPENSSL_VERSION_NUMBER  0x009070af) die(skip);
+?
+--FILE--
+?php
+
+function ssl_server($port) {
+	$host = 'ssl://127.0.0.1'.':'.$port;
+	$flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN;
+	$data = Sending bug48182\n;
+
+	$pem = dirname(__FILE__) . '/bug46127.pem';
+	$ssl_params = array( 'verify_peer' = false, 'allow_self_signed' = true, 'local_cert' = $pem);
+	$ssl = array('ssl' = $ssl_params);
+
+	$context = stream_context_create($ssl);
+	$sock = stream_socket_server($host, $errno, $errstr, $flags, $context);
+	if (!$sock) return false;
+
+	$link = stream_socket_accept($sock);
+	if (!$link) return false; // bad link?
+
+	$r = array($link);
+	$w = array();
+	$e = array();
+	if (stream_select($r, $w, $e, 0, 1000) != 0)
+		$data .= fread($link, 8192);
+
+	$r = array();
+	$w = array($link);
+	if (stream_select($r, $w, $e, 0, 1000) != 0)
+		$wrote = fwrite($link, $data, strlen($data));
+
+	// close stuff
+	fclose($link);
+	fclose($sock);
+
+	exit;
+}
+
+function ssl_async_client($port) {
+	$host = 'ssl://127.0.0.1'.':'.$port;
+	$flags = STREAM_CLIENT_CONNECT | STREAM_CLIENT_ASYNC_CONNECT;
+	$data = Sending data over to SSL server in async mode with contents like Hello World\n;
+
+	$socket = stream_socket_client($host, $errno, $errstr, 10, $flags);
+	stream_set_blocking($socket, 0);
+
+	while ($data) {
+		$wrote = fwrite($socket, $data, strlen($data));
+		$data = substr($data, $wrote);
+	}
+
+	$r = array($socket);
+	$w = array();
+	$e = array();
+	if (stream_select($r, $w, $e, 0, 10) != 0)
+	{
+		$data .= fread($socket, 1024);
+	}
+
+	echo $data;
+
+	fclose($socket);
+}
+
+echo Running bug48182\n;
+
+$port = rand(15000, 32000);
+
+$pid = pcntl_fork();
+if ($pid == 0) { // child
+	ssl_server($port);
+	exit;
+}
+
+// client or failed
+sleep(1);
+ssl_async_client($port);
+
+pcntl_waitpid($pid, $status);
+
+?
+--EXPECTF--
+Running bug48182
+Sending bug48182
+Sending data over to SSL server in async mode with contents like Hello World

Modified: php/php-src/branches/PHP_5_2/ext/openssl/xp_ssl.c
===
--- php/php-src/branches/PHP_5_2/ext/openssl/xp_ssl.c	2009-07-28 19:16:02 UTC (rev 286464)
+++ php/php-src/branches/PHP_5_2/ext/openssl/xp_ssl.c	2009-07-28 19:28:08 UTC (rev 286465)
@@ -685,7 +685,11 @@
 	 * we notice that the connect has actually been established */
 	php_stream_socket_ops.set_option(stream, option, value, ptrparam TSRMLS_CC);

-	if (xparam-outputs.returncode == 0  sslsock-enable_on_connect) {
+	if ((sslsock-enable_on_connect) 
+		((xparam-outputs.returncode == 0) ||
+		(xparam-op == STREAM_XPORT_OP_CONNECT_ASYNC 
+		xparam-outputs.returncode == 1  xparam-outputs.error_code == EINPROGRESS)))
+	{
 		if (php_stream_xport_crypto_setup(stream, sslsock-method, NULL TSRMLS_CC)  0 ||
 php_stream_xport_crypto_enable(stream, 1 TSRMLS_CC)  0) {
 			php_error_docref(NULL TSRMLS_CC, E_WARNING, Failed to enable crypto);

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2009-07-28 19:16:02 UTC (rev 286464)
+++ 

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/openssl/tests/bug48182.phpt branches/PHP_5_2/ext/openssl/xp_ssl.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/openssl/tests/b

2009-07-28 Thread Jani Taskinen

Sriram Natarajan wrote:

srinatar Tue, 28 Jul 2009 19:28:08 +

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

Log:
- 48182 ssl handshake fails during asynchronous socket connection


Your commit message was a bit flawed. It should have been like this:

  - Fixed bug #48182 (ssl handshake fails during asynchronous socket connection)

The commit stuff is able to pick almost (!) anything as the bug number, but not 
just any random number. :)


--Jani



Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
A   php/php-src/branches/PHP_5_2/ext/openssl/tests/bug48182.phpt
U   php/php-src/branches/PHP_5_2/ext/openssl/xp_ssl.c
U   php/php-src/branches/PHP_5_3/NEWS
A   php/php-src/branches/PHP_5_3/ext/openssl/tests/bug48182.phpt
U   php/php-src/branches/PHP_5_3/ext/openssl/xp_ssl.c
A   php/php-src/trunk/ext/openssl/tests/bug48182.phpt
U   php/php-src/trunk/ext/openssl/xp_ssl.c





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



[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/gd/libgd/gd.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/gd/libgd/gd.c trunk/ext/gd/libgd/gd.c

2009-07-28 Thread Kalle Sommer Nielsen
kalleTue, 28 Jul 2009 20:35:06 +

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

Log:
Fixed bug #42434 (ImageLine w/ antialias = 1px shorter)
 - patch by wojjie at gmail dot com

Bug: http://bugs.php.net/42434 (Assigned) ImageLine w/ antialias = 1px shorter
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/gd/libgd/gd.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/gd/libgd/gd.c
U   php/php-src/trunk/ext/gd/libgd/gd.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-07-28 19:28:08 UTC (rev 286465)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-07-28 20:35:06 UTC (rev 286466)
@@ -1,4 +1,4 @@
-PHPNEWS
+PHP
NEWS
 |||
 ?? ??? 2009, PHP 5.2.11
 - Fixed regression in cURL extension that prevented flush of data to output
@@ -67,6 +67,8 @@
   (Sriram Natarajan)
 - Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
   (Sriram Natarajan)
+- Fixed bug #42434 (ImageLine w/ antialias = 1px shorter). (wojjie at gmail dot
+  com, Kalle)

 17 Jun 2009, PHP 5.2.10
 - Updated timezone database to version 2009.9 (2009i) (Derick)

Modified: php/php-src/branches/PHP_5_2/ext/gd/libgd/gd.c
===
--- php/php-src/branches/PHP_5_2/ext/gd/libgd/gd.c  2009-07-28 19:28:08 UTC 
(rev 286465)
+++ php/php-src/branches/PHP_5_2/ext/gd/libgd/gd.c  2009-07-28 20:35:06 UTC 
(rev 286466)
@@ -1351,7 +1351,7 @@
x = x1  16;
y = y1  16;
inc = (dy * 65536) / dx;
-   while ((x  16)  x2) {
+   while ((x  16) = x2) {
gdImageSetAAPixelColor(im, x  16, y  16, col, (y  
8)  0xFF);
if ((y  16) + 1  im-sy) {
gdImageSetAAPixelColor(im, x  16, (y  16) + 
1,col, (~y  8)  0xFF);
@@ -1373,7 +1373,7 @@
x = x1  16;
y = y1  16;
inc = (dx * 65536) / dy;
-   while ((y16)  y2) {
+   while ((y16) = y2) {
gdImageSetAAPixelColor(im, x  16, y  16, col, (x  
8)  0xFF);
if ((x  16) + 1  im-sx) {
gdImageSetAAPixelColor(im, (x  16) + 1, (y  
16),col, (~x  8)  0xFF);

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-07-28 19:28:08 UTC (rev 286465)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-07-28 20:35:06 UTC (rev 286466)
@@ -75,6 +75,8 @@
   (Sriram Natarajan)
 - Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
   (Sriram Natarajan)
+- Fixed bug #42434 (ImageLine w/ antialias = 1px shorter). (wojjie at gmail dot
+  com, Kalle)

 30 Jun 2009, PHP 5.3.0
 - Upgraded bundled PCRE to version 7.9. (Nuno)

Modified: php/php-src/branches/PHP_5_3/ext/gd/libgd/gd.c
===
--- php/php-src/branches/PHP_5_3/ext/gd/libgd/gd.c  2009-07-28 19:28:08 UTC 
(rev 286465)
+++ php/php-src/branches/PHP_5_3/ext/gd/libgd/gd.c  2009-07-28 20:35:06 UTC 
(rev 286466)
@@ -1358,7 +1358,7 @@
x = x1  16;
y = y1  16;
inc = (dy * 65536) / dx;
-   while ((x  16)  x2) {
+   while ((x  16) = x2) {
gdImageSetAAPixelColor(im, x  16, y  16, col, (y  
8)  0xFF);
if ((y  16) + 1  im-sy) {
gdImageSetAAPixelColor(im, x  16, (y  16) + 
1,col, (~y  8)  0xFF);
@@ -1380,7 +1380,7 @@
x = x1  16;
y = y1  16;
inc = (dx * 65536) / dy;
-   while ((y16)  y2) {
+   while ((y16) = y2) {
gdImageSetAAPixelColor(im, x  16, y  16, col, (x  
8)  0xFF);
if ((x  16) + 1  im-sx) {
gdImageSetAAPixelColor(im, (x  16) + 1, (y  
16),col, (~x  8)  0xFF);

Modified: php/php-src/trunk/ext/gd/libgd/gd.c
===
--- php/php-src/trunk/ext/gd/libgd/gd.c 2009-07-28 19:28:08 UTC (rev 286465)
+++ php/php-src/trunk/ext/gd/libgd/gd.c 2009-07-28 20:35:06 UTC (rev 286466)
@@ -1358,7 +1358,7 @@
x = x1  16;
y = y1  16;
inc = (dy * 65536) / dx;
-   while ((x  16)  x2) {
+   while ((x  16) = x2) {
gdImageSetAAPixelColor(im, x  16, y  16, 

[PHP-CVS] svn: /php/phpruntests/trunk/ src/configuration/rtCommandLineOptions.php src/configuration/rtExternalTool.php src/configuration/rtRuntestsConfiguration.php src/configuration/tools/rtValgrind.

2009-07-28 Thread Zoe Slattery
zoe  Tue, 28 Jul 2009 20:48:15 +

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

Log:
code to use an external memory checker (valgrind)
framework to add others

Changed paths:
U   php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php
A   php/phpruntests/trunk/src/configuration/rtExternalTool.php
U   php/phpruntests/trunk/src/configuration/rtRuntestsConfiguration.php
A   php/phpruntests/trunk/src/configuration/tools/
A   php/phpruntests/trunk/src/configuration/tools/rtValgrind.php
U   php/phpruntests/trunk/src/rtClassMap.php
U   php/phpruntests/trunk/src/testcase/rtTestConfiguration.php
U   
php/phpruntests/trunk/src/testcase/sections/executablesections/rtFileSection.php
A   php/phpruntests/trunk/tests/configuration/rtExternalToolTest.php

Modified: php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php
===
--- php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php	2009-07-28 20:35:06 UTC (rev 286466)
+++ php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php	2009-07-28 20:48:15 UTC (rev 286467)
@@ -74,6 +74,7 @@
 'temp-source',
 'temp-target',
 'set-timeout',
+'mopts',
 );

 /**

Added: php/phpruntests/trunk/src/configuration/rtExternalTool.php
===
--- php/phpruntests/trunk/src/configuration/rtExternalTool.php	(rev 0)
+++ php/phpruntests/trunk/src/configuration/rtExternalTool.php	2009-07-28 20:48:15 UTC (rev 286467)
@@ -0,0 +1,45 @@
+?php
+/**
+ * rtExternalTool
+ *
+ * Class to handle using an external tool (default is valgrind)
+ *
+ * @category   Testing
+ * @packageRUNTESTS
+ * @author Zoe Slattery z...@php.net
+ * @author Stefan Priebsch sprieb...@php.net
+ * @copyright  2009 The PHP Group
+ * @licensehttp://www.php.net/license/3_01.txt  PHP License 3.01
+ * @link   http://qa.php.net/
+ *
+ */
+
+class rtExternalTool
+{
+protected $command;
+protected $options;
+protected $version;
+
+public static function getInstance($configuration)
+{
+if($configuration-hasCommandLineOption('m')) {
+return new rtValgrind();
+} else {
+$name = 'rt' . $configuration-getCommandLineOption('mtool');
+return new $name();
+}
+}
+
+public function init(rtRuntestsConfiguration $configuration) {
+$this-setVersion();
+$this-setCommand($configuration);
+$this-setOptions($configuration);
+}
+
+public function getCommand() {
+return $this-command;
+}
+
+
+}
+?
\ No newline at end of file

Modified: php/phpruntests/trunk/src/configuration/rtRuntestsConfiguration.php
===
--- php/phpruntests/trunk/src/configuration/rtRuntestsConfiguration.php	2009-07-28 20:35:06 UTC (rev 286466)
+++ php/phpruntests/trunk/src/configuration/rtRuntestsConfiguration.php	2009-07-28 20:48:15 UTC (rev 286467)
@@ -22,6 +22,8 @@
 private $settings;
 private $environmentVariables;
 private $commandLine;
+
+private $externalTool = null;

 private $settingNames = array (

@@ -67,6 +69,15 @@
 //extend test command line using TEST_PHP_ARGS
 $options = new rtAddToCommandLine();
 $options-parseAdditionalOptions($this-commandLine, $this-environmentVariables);
+
+//if there is an external tool - configure it
+
+if($this-commandLine-hasOption('m') || $this-commandLine-hasOption('mtool')) {
+$this-externalTool = rtExternalTool::getInstance($this);
+$this-externalTool-checkAvailable($this);
+$this-externalTool-init($this);
+
+}

 //set configuration
 foreach ($this-settingNames as $name = $className) {
@@ -144,5 +155,17 @@
 public function getUserEnvironment() {
 $this-environmentVariables-getUserSuppliedVariables();
 }
+
+public function hasExternalTool() {
+if($this-externalTool != null) {
+return true;
+}
+return false;
+}
+
+public function getExternalToolCommand() {
+return $this-externalTool-getCommand();
+}
+
 }
 ?

Added: php/phpruntests/trunk/src/configuration/tools/rtValgrind.php
===
--- php/phpruntests/trunk/src/configuration/tools/rtValgrind.php	(rev 0)
+++ php/phpruntests/trunk/src/configuration/tools/rtValgrind.php	2009-07-28 20:48:15 UTC (rev 286467)
@@ -0,0 +1,52 @@
+?php
+/**
+ * rtvalgrind
+ *
+ * Class to handle using an external tool (default is valgrind)
+ *
+ * @category   Testing
+ * @packageRUNTESTS
+ * @author Zoe Slattery z...@php.net
+ * @author Stefan Priebsch sprieb...@php.net
+ * @copyright  2009 The PHP Group
+ * 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/sapi/embed/php_embed.c branches/PHP_5_2/sapi/embed/php_embed.h branches/PHP_5_3/sapi/embed/php_embed.c branches/PHP_5_3/sapi/embed/php_embed.h trunk/sapi/

2009-07-28 Thread Jani Taskinen
jani Tue, 28 Jul 2009 21:07:43 +

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

Log:
- Fixed bug #48911 (embed sapi misses SAPI_API)

Bug: http://bugs.php.net/48911 (Open) embed sapi misses SAPI_API
  
Changed paths:
U   php/php-src/branches/PHP_5_2/sapi/embed/php_embed.c
U   php/php-src/branches/PHP_5_2/sapi/embed/php_embed.h
U   php/php-src/branches/PHP_5_3/sapi/embed/php_embed.c
U   php/php-src/branches/PHP_5_3/sapi/embed/php_embed.h
U   php/php-src/trunk/sapi/embed/php_embed.c
U   php/php-src/trunk/sapi/embed/php_embed.h

Modified: php/php-src/branches/PHP_5_2/sapi/embed/php_embed.c
===
--- php/php-src/branches/PHP_5_2/sapi/embed/php_embed.c 2009-07-28 20:48:15 UTC 
(rev 286467)
+++ php/php-src/branches/PHP_5_2/sapi/embed/php_embed.c 2009-07-28 21:07:43 UTC 
(rev 286468)
@@ -107,7 +107,7 @@
return SUCCESS;
 }

-sapi_module_struct php_embed_module = {
+extern SAPI_API sapi_module_struct php_embed_module = {
embed,   /* name */
PHP Embedded Library,/* pretty name */

@@ -139,7 +139,7 @@
 };
 /* }}} */

-int php_embed_init(int argc, char **argv PTSRMLS_DC)
+SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC)
 {
zend_llist global_vars;
 #ifdef ZTS
@@ -202,7 +202,7 @@
   return SUCCESS;
 }

-void php_embed_shutdown(TSRMLS_D)
+SAPI_API void php_embed_shutdown(TSRMLS_D)
 {
php_request_shutdown((void *) 0);
php_module_shutdown(TSRMLS_C);

Modified: php/php-src/branches/PHP_5_2/sapi/embed/php_embed.h
===
--- php/php-src/branches/PHP_5_2/sapi/embed/php_embed.h 2009-07-28 20:48:15 UTC 
(rev 286467)
+++ php/php-src/branches/PHP_5_2/sapi/embed/php_embed.h 2009-07-28 21:07:43 UTC 
(rev 286468)
@@ -58,9 +58,9 @@
 }

 BEGIN_EXTERN_C()
-int php_embed_init(int argc, char **argv PTSRMLS_DC);
-void php_embed_shutdown(TSRMLS_D);
-extern sapi_module_struct php_embed_module;
+SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC);
+SAPI_API void php_embed_shutdown(TSRMLS_D);
+extern SAPI_API sapi_module_struct php_embed_module;
 END_EXTERN_C()



Modified: php/php-src/branches/PHP_5_3/sapi/embed/php_embed.c
===
--- php/php-src/branches/PHP_5_3/sapi/embed/php_embed.c 2009-07-28 20:48:15 UTC 
(rev 286467)
+++ php/php-src/branches/PHP_5_3/sapi/embed/php_embed.c 2009-07-28 21:07:43 UTC 
(rev 286468)
@@ -108,7 +108,7 @@
return SUCCESS;
 }

-sapi_module_struct php_embed_module = {
+extern SAPI_API sapi_module_struct php_embed_module = {
embed,   /* name */
PHP Embedded Library,/* pretty name */

@@ -152,7 +152,7 @@
{NULL, NULL, NULL}
 };

-int php_embed_init(int argc, char **argv PTSRMLS_DC)
+SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC)
 {
zend_llist global_vars;
 #ifdef ZTS
@@ -217,7 +217,7 @@
   return SUCCESS;
 }

-void php_embed_shutdown(TSRMLS_D)
+SAPI_API void php_embed_shutdown(TSRMLS_D)
 {
php_request_shutdown((void *) 0);
php_module_shutdown(TSRMLS_C);

Modified: php/php-src/branches/PHP_5_3/sapi/embed/php_embed.h
===
--- php/php-src/branches/PHP_5_3/sapi/embed/php_embed.h 2009-07-28 20:48:15 UTC 
(rev 286467)
+++ php/php-src/branches/PHP_5_3/sapi/embed/php_embed.h 2009-07-28 21:07:43 UTC 
(rev 286468)
@@ -58,9 +58,9 @@
 }

 BEGIN_EXTERN_C()
-int php_embed_init(int argc, char **argv PTSRMLS_DC);
-void php_embed_shutdown(TSRMLS_D);
-extern sapi_module_struct php_embed_module;
+SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC);
+SAPI_API void php_embed_shutdown(TSRMLS_D);
+extern SAPI_API sapi_module_struct php_embed_module;
 END_EXTERN_C()



Modified: php/php-src/trunk/sapi/embed/php_embed.c
===
--- php/php-src/trunk/sapi/embed/php_embed.c2009-07-28 20:48:15 UTC (rev 
286467)
+++ php/php-src/trunk/sapi/embed/php_embed.c2009-07-28 21:07:43 UTC (rev 
286468)
@@ -108,7 +108,7 @@
return SUCCESS;
 }

-sapi_module_struct php_embed_module = {
+extern SAPI_API sapi_module_struct php_embed_module = {
embed,   /* name */
PHP Embedded Library,/* pretty name */

@@ -152,7 +152,7 @@
{NULL, NULL, NULL}
 };

-int php_embed_init(int argc, char **argv PTSRMLS_DC)
+SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC)
 {
zend_llist global_vars;
 #ifdef ZTS
@@ -217,7 +217,7 @@
   return SUCCESS;
 }

-void php_embed_shutdown(TSRMLS_D)
+SAPI_API void php_embed_shutdown(TSRMLS_D)
 {
php_request_shutdown((void *) 0);
php_module_shutdown(TSRMLS_C);

Modified: php/php-src/trunk/sapi/embed/php_embed.h

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/zend_API.h trunk/Zend/zend_API.h

2009-07-28 Thread Jani Taskinen
jani Tue, 28 Jul 2009 21:12:42 +

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

Log:
- Fixed bug #48971 (Missing ZEND_NS_NAMED_FE macro)

Bug: http://bugs.php.net/48971 (Open) Missing ZEND_NS_NAMED_FE macro
  
Changed paths:
U   php/php-src/branches/PHP_5_3/Zend/zend_API.h
U   php/php-src/trunk/Zend/zend_API.h

Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.h
===
--- php/php-src/branches/PHP_5_3/Zend/zend_API.h2009-07-28 21:07:43 UTC 
(rev 286468)
+++ php/php-src/branches/PHP_5_3/Zend/zend_API.h2009-07-28 21:12:42 UTC 
(rev 286469)
@@ -90,7 +90,7 @@
 #define ZEND_NS_RAW_FENTRY(ns, zend_name, name, arg_info, flags)   
ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, zend_name), name, arg_info, flags)
 #define ZEND_NS_RAW_NAMED_FE(ns, zend_name, name, arg_info)
ZEND_NS_RAW_FENTRY(ns, #zend_name, name, arg_info, 0)

-#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info)
+#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info)
ZEND_NS_FENTRY(ns, #zend_name, name, arg_info, 0)
 #define ZEND_NS_FE(ns, name, arg_info) 
ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, 0)
 #define ZEND_NS_DEP_FE(ns, name, arg_info) 
ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED)
 #define ZEND_NS_FALIAS(ns, name, alias, arg_info)  
ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, 0)

Modified: php/php-src/trunk/Zend/zend_API.h
===
--- php/php-src/trunk/Zend/zend_API.h   2009-07-28 21:07:43 UTC (rev 286468)
+++ php/php-src/trunk/Zend/zend_API.h   2009-07-28 21:12:42 UTC (rev 286469)
@@ -90,7 +90,7 @@
 #define ZEND_NS_RAW_FENTRY(ns, zend_name, name, arg_info, flags)   
ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, zend_name), name, arg_info, flags)
 #define ZEND_NS_RAW_NAMED_FE(ns, zend_name, name, arg_info)
ZEND_NS_RAW_FENTRY(ns, #zend_name, name, arg_info, 0)

-#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info)
+#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info)
ZEND_NS_FENTRY(ns, #zend_name, name, arg_info, 0)
 #define ZEND_NS_FE(ns, name, arg_info) 
ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, 0)
 #define ZEND_NS_DEP_FE(ns, name, arg_info) 
ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED)
 #define ZEND_NS_FALIAS(ns, name, alias, arg_info)  
ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, 0)

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/spl/php_spl.c branches/PHP_5_2/ext/spl/tests/bug40091.phpt branches/PHP_5_2/ext/spl/tests/bug44144.phpt branches/PHP_5_3/ext/spl

2009-07-28 Thread Hannes Magnusson
bjoriTue, 28 Jul 2009 22:25:31 +

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

Log:
MFH: Fixed bug #44144  add test

Bug: http://bugs.php.net/44144 (Closed) spl_autoload_functions() should return 
object instance when appropriate
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/spl/php_spl.c
U   php/php-src/branches/PHP_5_2/ext/spl/tests/bug40091.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/bug44144.phpt
A   php/php-src/branches/PHP_5_3/ext/spl/tests/bug44144.phpt
A   php/php-src/trunk/ext/spl/tests/bug44144.phpt

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-07-28 21:42:05 UTC (rev 286475)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-07-28 22:25:31 UTC (rev 286476)
@@ -67,6 +67,8 @@
   (Sriram Natarajan)
 - Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
   (Sriram Natarajan)
+- Fixed bug #44144 (spl_autoload_functions() should return object instance
+  when appropriate). (Hannes, Etienne)
 - Fixed bug #42434 (ImageLine w/ antialias = 1px shorter). (wojjie at gmail dot
   com, Kalle)


Modified: php/php-src/branches/PHP_5_2/ext/spl/php_spl.c
===
--- php/php-src/branches/PHP_5_2/ext/spl/php_spl.c  2009-07-28 21:42:05 UTC 
(rev 286475)
+++ php/php-src/branches/PHP_5_2/ext/spl/php_spl.c  2009-07-28 22:25:31 UTC 
(rev 286476)
@@ -564,8 +564,9 @@
  Return all registered __autoload() functionns */
 PHP_FUNCTION(spl_autoload_functions)
 {
-   zend_function *fptr, **func_ptr_ptr;
+   zend_function *fptr;
HashPosition function_pos;
+   autoload_func_info *alfi;

if (!EG(autoload_func)) {
if (zend_hash_find(EG(function_table), ZEND_AUTOLOAD_FUNC_NAME, 
sizeof(ZEND_AUTOLOAD_FUNC_NAME), (void **) fptr) == SUCCESS) {
@@ -582,17 +583,22 @@
array_init(return_value);
zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions), 
function_pos);
while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions), 
function_pos) == SUCCESS) {
-   
zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **) 
func_ptr_ptr, function_pos);
-   if ((*func_ptr_ptr)-common.scope) {
+   
zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **) alfi, 
function_pos);
+   if (alfi-func_ptr-common.scope) {
zval *tmp;
MAKE_STD_ZVAL(tmp);
array_init(tmp);

-   add_next_index_string(tmp, 
(*func_ptr_ptr)-common.scope-name, 1);
-   add_next_index_string(tmp, 
(*func_ptr_ptr)-common.function_name, 1);
+   if (alfi-obj) {
+   alfi-obj-refcount++;
+   add_next_index_zval(tmp, alfi-obj);
+   } else {
+   add_next_index_string(tmp, 
alfi-ce-name, 1);
+   }
+   add_next_index_string(tmp, 
alfi-func_ptr-common.function_name, 1);
add_next_index_zval(return_value, tmp);
} else
-   add_next_index_string(return_value, 
(*func_ptr_ptr)-common.function_name, 1);
+   add_next_index_string(return_value, 
alfi-func_ptr-common.function_name, 1);

zend_hash_move_forward_ex(SPL_G(autoload_functions), 
function_pos);
}

Modified: php/php-src/branches/PHP_5_2/ext/spl/tests/bug40091.phpt
===
--- php/php-src/branches/PHP_5_2/ext/spl/tests/bug40091.phpt2009-07-28 
21:42:05 UTC (rev 286475)
+++ php/php-src/branches/PHP_5_2/ext/spl/tests/bug40091.phpt2009-07-28 
22:25:31 UTC (rev 286476)
@@ -25,13 +25,19 @@
 (
 [0] = Array
 (
-[0] = MyAutoloader
+[0] = MyAutoloader Object
+(
+)
+
 [1] = autoload
 )

 [1] = Array
 (
-[0] = MyAutoloader
+[0] = MyAutoloader Object
+(
+)
+
 [1] = autoload
 )


Added: php/php-src/branches/PHP_5_2/ext/spl/tests/bug44144.phpt
===
--- php/php-src/branches/PHP_5_2/ext/spl/tests/bug44144.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/spl/tests/bug44144.phpt2009-07-28 
22:25:31 UTC (rev 286476)
@@ -0,0 +1,27 @@
+--TEST--
+Bug #44144 (spl_autoload_functions() 

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

2009-07-28 Thread Stanislav Malyshev
stas Wed, 29 Jul 2009 00:17:10 +

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

Log:
fix extension functions disabling (bug #49065)

Bug: http://bugs.php.net/49065 (Verified) disable_functions php.ini option 
does not work on Zend extensions
  
Changed paths:
U   php/php-src/branches/PHP_5_3/main/main.c
U   php/php-src/trunk/main/main.c

Modified: php/php-src/branches/PHP_5_3/main/main.c
===
--- php/php-src/branches/PHP_5_3/main/main.c2009-07-28 23:59:55 UTC (rev 
286477)
+++ php/php-src/branches/PHP_5_3/main/main.c2009-07-29 00:17:10 UTC (rev 
286478)
@@ -2006,10 +2006,6 @@
php_ini_register_extensions(TSRMLS_C);
zend_startup_modules(TSRMLS_C);

-   /* disable certain classes and functions as requested by php.ini */
-   php_disable_functions(TSRMLS_C);
-   php_disable_classes(TSRMLS_C);
-
/* start Zend extensions */
zend_startup_extensions();

@@ -2022,12 +2018,17 @@
}
}

+   /* disable certain classes and functions as requested by php.ini */
+   php_disable_functions(TSRMLS_C);
+   php_disable_classes(TSRMLS_C);
+
/* make core report what it should */
if (zend_hash_find(module_registry, core, sizeof(core), 
(void**)module)==SUCCESS) {
module-version = PHP_VERSION;
module-info_func = PHP_MINFO(php_core);
}

+
 #ifdef PHP_WIN32
/* Disable incompatible functions for the running platform */
if (php_win32_disable_functions() == FAILURE) {

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-07-28 23:59:55 UTC (rev 286477)
+++ php/php-src/trunk/main/main.c   2009-07-29 00:17:10 UTC (rev 286478)
@@ -2121,10 +2121,6 @@
php_ini_register_extensions(TSRMLS_C);
zend_startup_modules(TSRMLS_C);

-   /* disable certain classes and functions as requested by php.ini */
-   php_disable_functions(TSRMLS_C);
-   php_disable_classes(TSRMLS_C);
-
/* start Zend extensions */
zend_startup_extensions();

@@ -2137,12 +2133,17 @@
}
}

+   /* disable certain classes and functions as requested by php.ini */
+   php_disable_functions(TSRMLS_C);
+   php_disable_classes(TSRMLS_C);
+
/* make core report what it should */
if (zend_hash_find(module_registry, core, sizeof(core), 
(void**)module)==SUCCESS) {
module-version = PHP_VERSION;
module-info_func = PHP_MINFO(php_core);
}

+
 #ifdef PHP_WIN32
/* Disable incompatible functions for the running platform */
if (php_win32_disable_functions() == FAILURE) {

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2009-07-28 Thread Stanislav Malyshev
stas Wed, 29 Jul 2009 00:18:19 +

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

Log:
report fix for bug #49065

Bug: http://bugs.php.net/49065 (Verified) disable_functions php.ini option 
does not work on Zend extensions
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-07-29 00:17:10 UTC (rev 286478)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-07-29 00:18:19 UTC (rev 286479)
@@ -7,6 +7,8 @@
   Stas)
 - Fixed signature generation/validation for zip archives in ext/phar. (Greg)

+- Fixed bug #49065 (disable_functions php.ini option does not work on
+  Zend extensions). (Stas)
 - Fixed bug #49064 (--enable-session=shared does not work: undefined symbol:
   php_url_scanner_reset_vars). (Jani)
 - Fixed bug #49052 (context option headers freed too early when using

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c branches/PHP_5_2/ext/mbstring/tests/bug48645.phpt branches/PHP_5_3/ext/mbstring/libm

2009-07-28 Thread Moriyoshi Koizumi
moriyoshiWed, 29 Jul 2009 04:44:08 +

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

Log:
* Fix bug #48645 (mb_convert_encoding() doesn't understand hexadecimal 
html-entities)

Bug: http://bugs.php.net/48645 (Assigned) mb_convert_encoding() doesn't 
understand hexadecimal html-entities
  
Changed paths:
_U  php/php-src/branches/PHP_5_2/
U   php/php-src/branches/PHP_5_2/NEWS
U   
php/php-src/branches/PHP_5_2/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c
A   php/php-src/branches/PHP_5_2/ext/mbstring/tests/bug48645.phpt
_U  php/php-src/branches/PHP_5_3/
U   
php/php-src/branches/PHP_5_3/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c
A   php/php-src/branches/PHP_5_3/ext/mbstring/tests/bug48645.phpt
U   php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c
A   php/php-src/trunk/ext/mbstring/tests/bug48645.phpt


Property changes on: php/php-src/branches/PHP_5_2
___
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3:284120
   + /php/php-src/branches/PHP_5_3:284120
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS	2009-07-29 04:29:30 UTC (rev 286482)
+++ php/php-src/branches/PHP_5_2/NEWS	2009-07-29 04:44:08 UTC (rev 286483)
@@ -1,6 +1,7 @@
 PHPNEWS
 |||
 ?? ??? 2009, PHP 5.2.11
+- Fixed bug #48645 (mb_convert_encoding() doesn't understand hexadecimal html-entities). (Moriyoshi)
 - Fixed regression in cURL extension that prevented flush of data to output
   defined as a file handle. (Ilia)


Modified: php/php-src/branches/PHP_5_2/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c
===
--- php/php-src/branches/PHP_5_2/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c	2009-07-29 04:29:30 UTC (rev 286482)
+++ php/php-src/branches/PHP_5_2/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c	2009-07-29 04:44:08 UTC (rev 286483)
@@ -186,18 +186,58 @@
 		}
 	} else {
 		if (c == ';') {
-			buffer[filter-status] = 0;
 			if (buffer[1]=='#') {
-/* numeric entity */
-for (pos=2; posfilter-status; pos++) {
-	ent = ent*10 + (buffer[pos] - '0');
+if (filter-status  2  (buffer[2] == 'x' || buffer[2] == 'X')) {
+	if (filter-status  3) {
+		/* numeric entity */
+		for (pos=3; posfilter-status; pos++) {
+			int v =  buffer[pos];
+			if (v = '0'  v = '9') {
+v = v - '0';
+			} else if (v = 'A'  v = 'F') {
+v = v - 'A' + 10;
+			} else if (v = 'a'  v = 'f') {
+v = v - 'a' + 10;
+			} else {
+ent = -1;
+break;
+			}
+			ent = ent * 16 + v;
+		}
+	} else {
+		ent = -1;
+	}
+} else {
+	/* numeric entity */
+	if (filter-status  2) {
+		for (pos=2; posfilter-status; pos++) {
+			int v = buffer[pos];
+			if (v = '0'  v = '9') {
+v = v - '0';
+			} else {
+ent = -1;
+break;
+			}
+			ent = ent*10 + v;
+		}
+	} else {
+		ent = -1;
+	}
 }
-CK((*filter-output_function)(ent, filter-data));
+if (ent = 0  ent  0x11) {
+	CK((*filter-output_function)(ent, filter-data));
+} else {
+	for (pos = 0; pos  filter-status; pos++) {
+		CK((*filter-output_function)(buffer[pos], filter-data));
+	}
+	CK((*filter-output_function)(c, filter-data));
+}
 filter-status = 0;
 /*php_error_docref(ref.mbstring TSRMLS_CC, E_NOTICE, mbstring decoded '%s'=%d, buffer, ent);*/
 			} else {
 /* named entity */
-			entity = (mbfl_html_entity_entry *)mbfl_html_entity_list;
+buffer[filter-status] = 0;
+entity = (mbfl_html_entity_entry *)mbfl_html_entity_list;
 while (entity-name) {
 	if (!strcmp(buffer+1, entity-name))	{
 		ent = entity-code;

Added: php/php-src/branches/PHP_5_2/ext/mbstring/tests/bug48645.phpt
===
--- php/php-src/branches/PHP_5_2/ext/mbstring/tests/bug48645.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/mbstring/tests/bug48645.phpt	2009-07-29 04:44:08 UTC (rev 286483)
@@ -0,0 +1,162 @@
+--TEST--
+Bug #48645 (mb_convert_encoding() doesn't understand hexadecimal html-entities)
+--SKIPIF--
+?php extension_loaded('mbstring') or die('skip mbstring not available'); ?
+--FILE--
+?php
+var_dump(bin2hex(mb_convert_encoding(#x0;, UTF-8, HTML-ENTITIES)));
+var_dump(bin2hex(mb_convert_encoding(#x1;, UTF-8, HTML-ENTITIES)));
+var_dump(bin2hex(mb_convert_encoding(#x2;, UTF-8, HTML-ENTITIES)));
+var_dump(bin2hex(mb_convert_encoding(#x3;, UTF-8, HTML-ENTITIES)));
+var_dump(bin2hex(mb_convert_encoding(#x4;, UTF-8,