[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS Zend/zend_API.c

2010-05-04 Thread Dmitry Stogov
dmitry   Tue, 04 May 2010 08:02:51 +

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

Log:
Fixed a possible memory corruption in addcslashes().

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/Zend/zend_API.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-05-04 07:33:12 UTC (rev 298944)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-05-04 08:02:51 UTC (rev 298945)
@@ -23,6 +23,8 @@
 - Fixed very rare memory leak in mysqlnd, when binding thousands of columns.
   (Andrey)

+- Fixed a possible memory corruption in addcslashes(). Reporeted by Stefan
+  Esser (Dmitry)
 - Fixed a possible stack exaustion inside fnmatch(). Reporeted by Stefan
   Esser (Ilia)
 - Fixed a possible dechunking filter buffer overflow. Reported by Stefan Esser.

Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_API.c2010-05-04 07:33:12 UTC 
(rev 298944)
+++ php/php-src/branches/PHP_5_3/Zend/zend_API.c2010-05-04 08:02:51 UTC 
(rev 298945)
@@ -251,22 +251,18 @@
 }
 /* }}} */

-static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int type 
TSRMLS_DC) /* {{{ */
+static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */
 {
if (Z_OBJ_HANDLER_PP(arg, cast_object)) {
SEPARATE_ZVAL_IF_NOT_REF(arg);
-   if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, type 
TSRMLS_CC) == SUCCESS) {
-   *pl = Z_STRLEN_PP(arg);
-   *p = Z_STRVAL_PP(arg);
+   if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING 
TSRMLS_CC) == SUCCESS) {
return SUCCESS;
}
}
/* Standard PHP objects */
if (Z_OBJ_HT_PP(arg) == std_object_handlers || !Z_OBJ_HANDLER_PP(arg, 
cast_object)) {
SEPARATE_ZVAL_IF_NOT_REF(arg);
-   if (zend_std_cast_object_tostring(*arg, *arg, type TSRMLS_CC) 
== SUCCESS) {
-   *pl = Z_STRLEN_PP(arg);
-   *p = Z_STRVAL_PP(arg);
+   if (zend_std_cast_object_tostring(*arg, *arg, IS_STRING 
TSRMLS_CC) == SUCCESS) {
return SUCCESS;
}
}
@@ -281,8 +277,6 @@
if (!use_copy) {
ZVAL_ZVAL(*arg, z, 1, 1);
}
-   *pl = Z_STRLEN_PP(arg);
-   *p = Z_STRVAL_PP(arg);
return SUCCESS;
}
zval_ptr_dtor(z);
@@ -423,10 +417,6 @@
break;

case IS_OBJECT:
-   if 
(parse_arg_object_to_string(arg, p, pl, IS_STRING TSRMLS_CC) == SUCCESS) {
-   break;
-   }
-
case IS_ARRAY:
case IS_RESOURCE:
default:
@@ -680,7 +670,7 @@
int max_num_args = 0;
int post_varargs = 0;
zval **arg;
-   int arg_count;
+   int arg_count = (int)(zend_uintptr_t) *(zend_vm_stack_top(TSRMLS_C) - 
1);
int quiet = flags  ZEND_PARSE_PARAMS_QUIET;
zend_bool have_varargs = 0;
zval varargs = NULL;
@@ -689,14 +679,21 @@
for (spec_walk = type_spec; *spec_walk; spec_walk++) {
c = *spec_walk;
switch (c) {
+   case 's':
+   if (max_num_args  arg_count) {
+   arg = (zval **) 
(zend_vm_stack_top(TSRMLS_C) - 1 - (arg_count - max_num_args));
+   if (Z_TYPE_PP(arg) == IS_OBJECT) {
+   parse_arg_object_to_string(arg 
TSRMLS_CC);
+   }
+   }
+   /* break missing intentionally */
case 'l': case 'd':
-   case 's': case 'b':
+   case 'H': case 'b':
case 'r': case 'a':
case 'o': case 'O':
case 'z': case 'Z':
case 'C': case 'h':
case 'f': case 'A':
-   case 'H':
max_num_args++;
break;

@@ -770,8 +767,6 @@
return FAILURE;
}

-   arg_count = (int)(zend_uintptr_t) *(zend_vm_stack_top(TSRMLS_C) - 1);
-
if (num_args  arg_count) {

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/fileinfo/fileinfo.c branches/PHP_5_3/ext/fileinfo/tests/finfo_open_001.phpt trunk/ext/fileinfo/fileinfo.c trunk/ext/fileinfo/tes

2010-05-04 Thread Pierre Joye
pajoye   Tue, 04 May 2010 08:48:58 +

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

Log:
- Fixed bug #51732, Fileinfo __construct or open does not work with NULL

Bug: http://bugs.php.net/51732 (Bogus) Fileinfo __construct with explicit magic 
file
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c
U   php/php-src/branches/PHP_5_3/ext/fileinfo/tests/finfo_open_001.phpt
U   php/php-src/trunk/ext/fileinfo/fileinfo.c
U   php/php-src/trunk/ext/fileinfo/tests/finfo_open_001.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-05-04 08:28:38 UTC (rev 298946)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-05-04 08:48:58 UTC (rev 298947)
@@ -39,6 +39,8 @@
   requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert)
 - Fixed 64-bit integer overflow in mhash_keygen_s2k(). (Clément LECIGNE, Stas)

+- Fixed bug #51732 (Fileinfo __construct or open does not work with NULL).
+  (Pierre)
 - Fixed bug #51723 (Content-length header is limited to 32bit integer with
   Apache2 on Windows). (Pierre)
 - Fixed bug #51690 (Phar::setStub looks for case-sensitive

Modified: php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c
===
--- php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c2010-05-04 
08:28:38 UTC (rev 298946)
+++ php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c2010-05-04 
08:48:58 UTC (rev 298947)
@@ -291,7 +291,9 @@
RETURN_FALSE;
}

-   if (file  *file) { /* user specified file, perform open_basedir 
checks */
+   if (file_len == 0) {
+   file = NULL;
+   } else if (file  *file) { /* user specified file, perform 
open_basedir checks */
if (!VCWD_REALPATH(file, resolved_path)) {
RETURN_FALSE;
}

Modified: php/php-src/branches/PHP_5_3/ext/fileinfo/tests/finfo_open_001.phpt
===
--- php/php-src/branches/PHP_5_3/ext/fileinfo/tests/finfo_open_001.phpt 
2010-05-04 08:28:38 UTC (rev 298946)
+++ php/php-src/branches/PHP_5_3/ext/fileinfo/tests/finfo_open_001.phpt 
2010-05-04 08:48:58 UTC (rev 298947)
@@ -16,12 +16,8 @@
 --EXPECTF--
 Warning: finfo_open(): Failed to load magic database at ''. in %s on line %d
 bool(false)
-
-Warning: finfo_open(): Failed to load magic database at ''. in %s on line %d
+resource(%d) of type (file_info)
+resource(%d) of type (file_info)
 bool(false)
-
-Warning: finfo_open(): Failed to load magic database at ''. in %s on line %d
 bool(false)
 bool(false)
-bool(false)
-bool(false)

Modified: php/php-src/trunk/ext/fileinfo/fileinfo.c
===
--- php/php-src/trunk/ext/fileinfo/fileinfo.c   2010-05-04 08:28:38 UTC (rev 
298946)
+++ php/php-src/trunk/ext/fileinfo/fileinfo.c   2010-05-04 08:48:58 UTC (rev 
298947)
@@ -291,7 +291,9 @@
RETURN_FALSE;
}

-   if (file  *file) { /* user specified file, perform open_basedir 
checks */
+   if (file_len == 0) {
+   file = NULL;
+   } else if (file  *file) { /* user specified file, perform 
open_basedir checks */
if (!VCWD_REALPATH(file, resolved_path)) {
RETURN_FALSE;
}

Modified: php/php-src/trunk/ext/fileinfo/tests/finfo_open_001.phpt
===
--- php/php-src/trunk/ext/fileinfo/tests/finfo_open_001.phpt2010-05-04 
08:28:38 UTC (rev 298946)
+++ php/php-src/trunk/ext/fileinfo/tests/finfo_open_001.phpt2010-05-04 
08:48:58 UTC (rev 298947)
@@ -16,12 +16,8 @@
 --EXPECTF--
 Warning: finfo_open(): Failed to load magic database at ''. in %s on line %d
 bool(false)
-
-Warning: finfo_open(): Failed to load magic database at ''. in %s on line %d
+resource(%d) of type (file_info)
+resource(%d) of type (file_info)
 bool(false)
-
-Warning: finfo_open(): Failed to load magic database at ''. in %s on line %d
 bool(false)
 bool(false)
-bool(false)
-bool(false)

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/tests/network/getmxrr.phpt trunk/ext/standard/tests/network/getmxrr.phpt

2010-05-04 Thread Adam Harvey
aharvey  Tue, 04 May 2010 09:41:47 +

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

Log:
Alter the getmxrr() test to use lists.php.net (which we presumably control)
instead of ez.no (which we presumably don't) for the single MX record test.

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/tests/network/getmxrr.phpt
U   php/php-src/trunk/ext/standard/tests/network/getmxrr.phpt

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/network/getmxrr.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/network/getmxrr.phpt
2010-05-04 09:10:38 UTC (rev 298948)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/network/getmxrr.phpt
2010-05-04 09:41:47 UTC (rev 298949)
@@ -8,7 +8,7 @@
 ?
 --FILE--
 ?php
-$domains = array( 'php.net', 'ez.no' );
+$domains = array( 'php.net', 'lists.php.net' );
 foreach ( $domains as $domain )
 {
 if ( getmxrr( $domain, $hosts, $weights ) )

Modified: php/php-src/trunk/ext/standard/tests/network/getmxrr.phpt
===
--- php/php-src/trunk/ext/standard/tests/network/getmxrr.phpt   2010-05-04 
09:10:38 UTC (rev 298948)
+++ php/php-src/trunk/ext/standard/tests/network/getmxrr.phpt   2010-05-04 
09:41:47 UTC (rev 298949)
@@ -8,7 +8,7 @@
 ?
 --FILE--
 ?php
-$domains = array( 'php.net', 'ez.no' );
+$domains = array( 'php.net', 'lists.php.net' );
 foreach ( $domains as $domain )
 {
 if ( getmxrr( $domain, $hosts, $weights ) )

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

2010-05-04 Thread Pierre Joye
pajoye   Tue, 04 May 2010 09:51:03 +

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

Log:
- fix build

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

Modified: php/php-src/branches/PHP_5_3/sapi/apache2handler/sapi_apache2.c
===
--- php/php-src/branches/PHP_5_3/sapi/apache2handler/sapi_apache2.c 
2010-05-04 09:45:12 UTC (rev 298950)
+++ php/php-src/branches/PHP_5_3/sapi/apache2handler/sapi_apache2.c 
2010-05-04 09:51:03 UTC (rev 298951)
@@ -53,8 +53,10 @@

 #include php_apache.h

-#if _MSC_VER = 1300
-# include win32/php_strtoi64.h
+#ifdef PHP_WIN32
+# if _MSC_VER = 1300
+#  include win32/php_strtoi64.h
+# endif
 #endif

 /* UnixWare and Netware define shutdown to _shutdown, which causes problems 
later
@@ -124,7 +126,7 @@
}
ctx-content_type = estrdup(val);
} else if (!strcasecmp(sapi_header-header, 
content-length)) {
-#ifdef PHP_WINDOWS
+#ifdef PHP_WIN32
 # ifdef APR_HAS_LARGE_FILES
ap_set_content_length(ctx-r, (apr_off_t) 
_strtoui64(val, (char **)NULL, 10));
 # else

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

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/tests/network/getmxrr.phpt trunk/ext/standard/tests/network/getmxrr.phpt

2010-05-04 Thread Martin Jansen
On 4.5.2010 11:41, Adam Harvey wrote:
 aharvey  Tue, 04 May 2010 09:41:47 +
 
 Revision: http://svn.php.net/viewvc?view=revisionrevision=298949
 
 Log:
 Alter the getmxrr() test to use lists.php.net (which we presumably control)
 instead of ez.no (which we presumably don't) for the single MX record test.

We could probably rig something like

mx1.tests.php.net
mx2.tests.php.net
...

up in our DNS zone in order to have a stable scaffolding for those tests.

- Martin

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



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/tests/network/getmxrr.phpt trunk/ext/standard/tests/network/getmxrr.phpt

2010-05-04 Thread Adam Harvey
On 4 May 2010 18:53, Martin Jansen mar...@divbyzero.net wrote:
 We could probably rig something like

        mx1.tests.php.net
        mx2.tests.php.net
        ...

 up in our DNS zone in order to have a stable scaffolding for those tests.

Indeed, that would be even better, since there's obviously no way to
rule out potential changes to the MX records for php.net and
lists.php.net in the future.

Adam

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



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

2010-05-04 Thread Felipe Pena
felipe   Tue, 04 May 2010 10:59:26 +

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

Log:
- Fix typo

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   2010-05-04 10:36:23 UTC (rev 298960)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-05-04 10:59:26 UTC (rev 298961)
@@ -23,9 +23,9 @@
 - Fixed very rare memory leak in mysqlnd, when binding thousands of columns.
   (Andrey)

-- Fixed a possible memory corruption in addcslashes(). Reporeted by Stefan
+- Fixed a possible memory corruption in addcslashes(). Reported by Stefan
   Esser (Dmitry)
-- Fixed a possible stack exaustion inside fnmatch(). Reporeted by Stefan
+- Fixed a possible stack exaustion inside fnmatch(). Reported by Stefan
   Esser (Ilia)
 - Fixed a possible dechunking filter buffer overflow. Reported by Stefan Esser.
   (Pierre)

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

2010-05-04 Thread Adam Harvey
aharvey  Tue, 04 May 2010 11:01:46 +

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

Log:
Well, as long as we're dealing with typos... :)

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   2010-05-04 10:59:26 UTC (rev 298961)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-05-04 11:01:46 UTC (rev 298962)
@@ -25,7 +25,7 @@

 - Fixed a possible memory corruption in addcslashes(). Reported by Stefan
   Esser (Dmitry)
-- Fixed a possible stack exaustion inside fnmatch(). Reported by Stefan
+- Fixed a possible stack exhaustion inside fnmatch(). Reported by Stefan
   Esser (Ilia)
 - Fixed a possible dechunking filter buffer overflow. Reported by Stefan Esser.
   (Pierre)

-- 
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/iconv/iconv.c branches/PHP_5_2/ext/iconv/tests/bug48289.phpt branches/PHP_5_3/NEWS branches/PHP_5_3/ext/iconv/iconv.c branches/P

2010-05-04 Thread Adam Harvey
aharvey  Tue, 04 May 2010 11:56:59 +

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

Log:
Fix for bug #48289 (iconv_mime_encode() quoted-printable scheme is broken).
Thanks to Hiroaki Kawai for the original patch.

Bug: http://bugs.php.net/48289 (Assigned) iconv_mime_encode() quoted-printable 
scheme is broken
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/iconv/iconv.c
A   php/php-src/branches/PHP_5_2/ext/iconv/tests/bug48289.phpt
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/iconv/iconv.c
A   php/php-src/branches/PHP_5_3/ext/iconv/tests/bug48289.phpt
U   php/php-src/trunk/ext/iconv/iconv.c
A   php/php-src/trunk/ext/iconv/tests/bug48289.phpt

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2010-05-04 11:01:46 UTC (rev 298962)
+++ php/php-src/branches/PHP_5_2/NEWS   2010-05-04 11:56:59 UTC (rev 298963)
@@ -66,6 +66,8 @@
 - Fixed bug #49723 (LimitIterator with empty SeekableIterator). (Etienne)
 - Fixed bug #49576 (FILTER_VALIDATE_EMAIL filter needs updating) (Rasmus)
 - Fixed bug #49267 (Linking fails for iconv). (Moriyosh)
+- Fixed bug #48289 (iconv_mime_encode() quoted-printable scheme is broken).
+  (Adam, patch from hiroaki dot kawai at gmail dot com).
 - Fixed bug #43314 (iconv_mime_encode(), broken Q scheme). (Rasmus)
 - Fixed bug #23229 (syslog() truncates messages). (Adam)


Modified: php/php-src/branches/PHP_5_2/ext/iconv/iconv.c
===
--- php/php-src/branches/PHP_5_2/ext/iconv/iconv.c  2010-05-04 11:01:46 UTC 
(rev 298962)
+++ php/php-src/branches/PHP_5_2/ext/iconv/iconv.c  2010-05-04 11:56:59 UTC 
(rev 298963)
@@ -1217,7 +1217,7 @@
prev_in_left = ini_in_left = in_left;
ini_in_p = in_p;

-   for (out_size = char_cnt; out_size  0;) {
+   for (out_size = (char_cnt - 2) / 3; out_size  
0;) {
size_t prev_out_left;

nbytes_required = 0;

Added: php/php-src/branches/PHP_5_2/ext/iconv/tests/bug48289.phpt
===
--- php/php-src/branches/PHP_5_2/ext/iconv/tests/bug48289.phpt  
(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/iconv/tests/bug48289.phpt  2010-05-04 
11:56:59 UTC (rev 298963)
@@ -0,0 +1,22 @@
+--TEST--
+Bug #48289 (iconv_mime_encode() quoted-printable scheme is broken)
+--SKIPIF--
+?php extension_loaded('iconv') or die('skip iconv extension is not 
available'); ?
+--FILE--
+?php
+$text = 
\xE3\x83\x86\xE3\x82\xB9\xE3\x83\x88\xE3\x83\x86\xE3\x82\xB9\xE3\x83\x88;
+$options = array(
+'scheme' = 'Q',
+'input-charset' = 'UTF-8',
+'output-charset' = 'UTF-8',
+'line-length' = 30,
+);
+
+echo iconv_mime_encode('Subject', $text, $options);
+--EXPECT--
+Subject: =?UTF-8?Q?=E3=83=86?=
+ =?UTF-8?Q?=E3=82=B9?=
+ =?UTF-8?Q?=E3=83=88?=
+ =?UTF-8?Q?=E3=83=86?=
+ =?UTF-8?Q?=E3=82=B9?=
+ =?UTF-8?Q?=E3=83=88?=

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-05-04 11:01:46 UTC (rev 298962)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-05-04 11:56:59 UTC (rev 298963)
@@ -131,6 +131,8 @@
   (yoa...@gmail.com, Derick)
 - Fixed bug #48983 (DomDocument : saveHTMLFile wrong charset). (Rob)
 - Fixed bug #48902 (Timezone database fallback map is outdated). (Derick)
+- Fixed bug #48289 (iconv_mime_encode() quoted-printable scheme is broken).
+  (Adam, patch from hiroaki dot kawai at gmail dot com).
 - Fixed bug #48781 (Cyclical garbage collector memory leak). (Dmitry)
 - Fixed bug #48361 (SplFileInfo::getPathInfo should return the
   parent dir). (Etienne)

Modified: php/php-src/branches/PHP_5_3/ext/iconv/iconv.c
===
--- php/php-src/branches/PHP_5_3/ext/iconv/iconv.c  2010-05-04 11:01:46 UTC 
(rev 298962)
+++ php/php-src/branches/PHP_5_3/ext/iconv/iconv.c  2010-05-04 11:56:59 UTC 
(rev 298963)
@@ -1206,7 +1206,7 @@
prev_in_left = ini_in_left = in_left;
ini_in_p = in_p;

-   for (out_size = char_cnt; out_size  0;) {
+   for (out_size = (char_cnt - 2) / 3; out_size  
0;) {
size_t prev_out_left;

nbytes_required = 0;

Added: php/php-src/branches/PHP_5_3/ext/iconv/tests/bug48289.phpt
===
--- php/php-src/branches/PHP_5_3/ext/iconv/tests/bug48289.phpt   

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

2010-05-04 Thread Adam Harvey
aharvey  Tue, 04 May 2010 11:59:54 +

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

Log:
Fix misordered news item.

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   2010-05-04 11:58:04 UTC (rev 298964)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-05-04 11:59:54 UTC (rev 298965)
@@ -131,11 +131,11 @@
   (yoa...@gmail.com, Derick)
 - Fixed bug #48983 (DomDocument : saveHTMLFile wrong charset). (Rob)
 - Fixed bug #48902 (Timezone database fallback map is outdated). (Derick)
-- Fixed bug #48289 (iconv_mime_encode() quoted-printable scheme is broken).
-  (Adam, patch from hiroaki dot kawai at gmail dot com).
 - Fixed bug #48781 (Cyclical garbage collector memory leak). (Dmitry)
 - Fixed bug #48361 (SplFileInfo::getPathInfo should return the
   parent dir). (Etienne)
+- Fixed bug #48289 (iconv_mime_encode() quoted-printable scheme is broken).
+  (Adam, patch from hiroaki dot kawai at gmail dot com).
 - Fixed bug #46111 (Some timezone identifiers can not be parsed). (Derick)
 - Fixed bug #35673 (formatOutput does not work with saveHTML). (Rob)


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

[PHP-CVS] svn: /php/php-src/trunk/sapi/apache2handler/ sapi_apache2.c

2010-05-04 Thread Rob Richards
rrichardsTue, 04 May 2010 12:12:28 +

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

Log:
fix non-windows builds

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

Modified: php/php-src/trunk/sapi/apache2handler/sapi_apache2.c
===
--- php/php-src/trunk/sapi/apache2handler/sapi_apache2.c2010-05-04 
11:59:54 UTC (rev 298965)
+++ php/php-src/trunk/sapi/apache2handler/sapi_apache2.c2010-05-04 
12:12:28 UTC (rev 298966)
@@ -53,8 +53,10 @@

 #include php_apache.h

-#if _MSC_VER = 1300
-# include win32/php_strtoi64.h
+#ifdef PHP_WIN32
+# if _MSC_VER = 1300
+#  include win32/php_strtoi64.h
+# endif
 #endif

 /* UnixWare and Netware define shutdown to _shutdown, which causes problems 
later

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

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

2010-05-04 Thread Rob Richards
rrichardsTue, 04 May 2010 12:55:26 +

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

Log:
fix bug #51721 (mark DOMNodeList and DOMNamedNodeMap as Traversable)

Bug: http://bugs.php.net/51721 (Open) Patch: mark DOMNodeList and 
DOMNamedNodeMap as Traversable
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/dom/php_dom.c
U   php/php-src/trunk/ext/dom/php_dom.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-05-04 12:12:28 UTC (rev 298966)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-05-04 12:55:26 UTC (rev 298967)
@@ -43,6 +43,8 @@
   (Pierre)
 - Fixed bug #51723 (Content-length header is limited to 32bit integer with
   Apache2 on Windows). (Pierre)
+- Fixed bug #51721 (mark DOMNodeList and DOMNamedNodeMap as Traversable).
+  (David Zuelke)
 - Fixed bug #51690 (Phar::setStub looks for case-sensitive
   __HALT_COMPILER()). (Ilia)
 - Fixed bug #51688 (ini per dir crashes when invalid document root  are given).

Modified: php/php-src/branches/PHP_5_3/ext/dom/php_dom.c
===
--- php/php-src/branches/PHP_5_3/ext/dom/php_dom.c  2010-05-04 12:12:28 UTC 
(rev 298966)
+++ php/php-src/branches/PHP_5_3/ext/dom/php_dom.c  2010-05-04 12:55:26 UTC 
(rev 298967)
@@ -29,6 +29,7 @@
 #include ext/standard/php_rand.h
 #include php_dom.h
 #include dom_properties.h
+#include zend_interfaces.h

 #include ext/standard/info.h
 #define PHP_XPATH 1
@@ -680,6 +681,7 @@
ce.create_object = dom_nnodemap_objects_new;
dom_nodelist_class_entry = zend_register_internal_class_ex(ce, NULL, 
NULL TSRMLS_CC);
dom_nodelist_class_entry-get_iterator = php_dom_get_iterator;
+   zend_class_implements(dom_nodelist_class_entry TSRMLS_CC, 1, 
zend_ce_traversable);

zend_hash_init(dom_nodelist_prop_handlers, 0, NULL, NULL, 1);
dom_register_prop_handler(dom_nodelist_prop_handlers, length, 
dom_nodelist_length_read, NULL TSRMLS_CC);
@@ -689,6 +691,7 @@
ce.create_object = dom_nnodemap_objects_new;
dom_namednodemap_class_entry = zend_register_internal_class_ex(ce, 
NULL, NULL TSRMLS_CC);
dom_namednodemap_class_entry-get_iterator = php_dom_get_iterator;
+   zend_class_implements(dom_namednodemap_class_entry TSRMLS_CC, 1, 
zend_ce_traversable);

zend_hash_init(dom_namednodemap_prop_handlers, 0, NULL, NULL, 1);
dom_register_prop_handler(dom_namednodemap_prop_handlers, length, 
dom_namednodemap_length_read, NULL TSRMLS_CC);

Modified: php/php-src/trunk/ext/dom/php_dom.c
===
--- php/php-src/trunk/ext/dom/php_dom.c 2010-05-04 12:12:28 UTC (rev 298966)
+++ php/php-src/trunk/ext/dom/php_dom.c 2010-05-04 12:55:26 UTC (rev 298967)
@@ -29,6 +29,7 @@
 #include ext/standard/php_rand.h
 #include php_dom.h
 #include dom_properties.h
+#include zend_interfaces.h

 #include ext/standard/info.h
 #define PHP_XPATH 1
@@ -680,6 +681,7 @@
ce.create_object = dom_nnodemap_objects_new;
dom_nodelist_class_entry = zend_register_internal_class_ex(ce, NULL, 
NULL TSRMLS_CC);
dom_nodelist_class_entry-get_iterator = php_dom_get_iterator;
+   zend_class_implements(dom_nodelist_class_entry TSRMLS_CC, 1, 
zend_ce_traversable);

zend_hash_init(dom_nodelist_prop_handlers, 0, NULL, NULL, 1);
dom_register_prop_handler(dom_nodelist_prop_handlers, length, 
dom_nodelist_length_read, NULL TSRMLS_CC);
@@ -689,6 +691,7 @@
ce.create_object = dom_nnodemap_objects_new;
dom_namednodemap_class_entry = zend_register_internal_class_ex(ce, 
NULL, NULL TSRMLS_CC);
dom_namednodemap_class_entry-get_iterator = php_dom_get_iterator;
+   zend_class_implements(dom_namednodemap_class_entry TSRMLS_CC, 1, 
zend_ce_traversable);

zend_hash_init(dom_namednodemap_prop_handlers, 0, NULL, NULL, 1);
dom_register_prop_handler(dom_namednodemap_prop_handlers, length, 
dom_namednodemap_length_read, NULL TSRMLS_CC);

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd.h branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c branches/PHP_5_3/ext/mysqlnd/php_mysqlnd.c trunk/ext/mysqlnd/mysqlnd.h trunk/ext/mysqln

2010-05-04 Thread Andrey Hristov
andrey   Tue, 04 May 2010 13:49:43 +

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

Log:
Add possibility to control the allocator in when PHP is compiled
with debug

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/php_mysqlnd.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd.h
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.c
U   php/php-src/trunk/ext/mysqlnd/php_mysqlnd.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h	2010-05-04 13:07:27 UTC (rev 298968)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.h	2010-05-04 13:49:43 UTC (rev 298969)
@@ -278,6 +278,12 @@
 	long			log_mask;
 	long			net_read_timeout;
 	long			mempool_default_size;
+	long			debug_emalloc_fail_threshold;
+	long			debug_ecalloc_fail_threshold;
+	long			debug_erealloc_fail_threshold;
+	long			debug_malloc_fail_threshold;
+	long			debug_calloc_fail_threshold;
+	long			debug_realloc_fail_threshold;
 ZEND_END_MODULE_GLOBALS(mysqlnd)

 ZEND_EXTERN_MODULE_GLOBALS(mysqlnd);

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c	2010-05-04 13:07:27 UTC (rev 298968)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c	2010-05-04 13:49:43 UTC (rev 298969)
@@ -660,12 +660,22 @@
 {
 	void *ret;
 	zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
-
+	long * threshold = MYSQLND_G(debug_emalloc_fail_threshold);
 	DBG_ENTER(mysqlnd_emalloc_name);

 	DBG_INF_FMT(file=%-15s line=%4d, strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);

-	ret = emalloc(REAL_SIZE(size));
+#ifdef PHP_DEBUG
+	/* -1 is also true */
+	if (*threshold) {
+#endif
+		ret = emalloc(REAL_SIZE(size));
+#ifdef PHP_DEBUG
+		--*threshold;
+	} else if (*threshold == 0) {
+		ret = NULL;
+	}
+#endif

 	DBG_INF_FMT(size=%lu ptr=%p, size, ret);

@@ -683,10 +693,22 @@
 {
 	void *ret;
 	zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
+	long * threshold = persistent? MYSQLND_G(debug_malloc_fail_threshold):MYSQLND_G(debug_emalloc_fail_threshold);
 	DBG_ENTER(mysqlnd_pemalloc_name);
 	DBG_INF_FMT(file=%-15s line=%4d, strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);

-	ret = pemalloc(REAL_SIZE(size), persistent);
+#ifdef PHP_DEBUG
+	/* -1 is also true */
+	if (*threshold) {
+#endif
+		ret = pemalloc(REAL_SIZE(size), persistent);
+#ifdef PHP_DEBUG
+		--*threshold;
+	} else if (*threshold == 0) {
+		ret = NULL;
+	}
+#endif
+
 	DBG_INF_FMT(size=%lu ptr=%p persistent=%d, size, ret, persistent);

 	if (collect_memory_statistics) {
@@ -706,11 +728,22 @@
 {
 	void *ret;
 	zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
+	long * threshold = MYSQLND_G(debug_ecalloc_fail_threshold);
 	DBG_ENTER(mysqlnd_ecalloc_name);
 	DBG_INF_FMT(file=%-15s line=%4d, strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
 	DBG_INF_FMT(before: %lu, zend_memory_usage(FALSE TSRMLS_CC));

-	ret = ecalloc(nmemb, REAL_SIZE(size));
+#ifdef PHP_DEBUG
+	/* -1 is also true */
+	if (*threshold) {
+#endif
+		ret = ecalloc(nmemb, REAL_SIZE(size));
+#ifdef PHP_DEBUG
+		--*threshold;
+	} else if (*threshold == 0) {
+		ret = NULL;
+	}
+#endif

 	DBG_INF_FMT(after : %lu, zend_memory_usage(FALSE TSRMLS_CC));
 	DBG_INF_FMT(size=%lu ptr=%p, size, ret);
@@ -728,10 +761,22 @@
 {
 	void *ret;
 	zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
+	long * threshold = persistent? MYSQLND_G(debug_calloc_fail_threshold):MYSQLND_G(debug_ecalloc_fail_threshold);
 	DBG_ENTER(mysqlnd_pecalloc_name);
 	DBG_INF_FMT(file=%-15s line=%4d, strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);

-	ret = pecalloc(nmemb, REAL_SIZE(size), persistent);
+#ifdef PHP_DEBUG
+	/* -1 is also true */
+	if (*threshold) {
+#endif
+		ret = pecalloc(nmemb, REAL_SIZE(size), persistent);
+#ifdef PHP_DEBUG
+		--*threshold;
+	} else if (*threshold == 0) {
+		ret = NULL;
+	}
+#endif
+
 	DBG_INF_FMT(size=%lu ptr=%p, size, ret);

 	if (collect_memory_statistics) {
@@ -752,11 +797,22 @@
 	void *ret;
 	zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics);
 	size_t old_size = collect_memory_statistics  ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : 0;
+	long * threshold = MYSQLND_G(debug_erealloc_fail_threshold);
 	DBG_ENTER(mysqlnd_erealloc_name);
 	DBG_INF_FMT(file=%-15s line=%4d, strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno);
 	DBG_INF_FMT(ptr=%p old_size=%lu, new_size=%lu, ptr, old_size, new_size);

-	ret = erealloc(REAL_PTR(ptr), REAL_SIZE(new_size));
+#ifdef PHP_DEBUG
+	/* -1 is also true */
+	if 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c trunk/ext/mysqlnd/mysqlnd_ps.c

2010-05-04 Thread Andrey Hristov
andrey   Tue, 04 May 2010 14:02:42 +

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

Log:
OOM stability fixes

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c	2010-05-04 13:49:43 UTC (rev 298969)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c	2010-05-04 14:02:42 UTC (rev 298970)
@@ -1227,19 +1227,25 @@

 	if (CONN_GET_STATE(conn) == CONN_READY) {
 		size_t packet_len;
-		stmt-param_bind[param_no].flags |= MYSQLND_PARAM_BIND_BLOB_USED;
 		cmd_buf = mnd_emalloc(packet_len = STMT_ID_LENGTH + 2 + length);
+		if (cmd_buf) {
+			stmt-param_bind[param_no].flags |= MYSQLND_PARAM_BIND_BLOB_USED;

-		int4store(cmd_buf, stmt-stmt_id);
-		int2store(cmd_buf + STMT_ID_LENGTH, param_no);
-		memcpy(cmd_buf + STMT_ID_LENGTH + 2, data, length);
+			int4store(cmd_buf, stmt-stmt_id);
+			int2store(cmd_buf + STMT_ID_LENGTH, param_no);
+			memcpy(cmd_buf + STMT_ID_LENGTH + 2, data, length);

-		/* COM_STMT_SEND_LONG_DATA doesn't send an OK packet*/
-		ret = conn-m-simple_command(conn, cmd, (char *)cmd_buf, packet_len,
-	 PROT_LAST , FALSE, TRUE TSRMLS_CC);
-		mnd_efree(cmd_buf);
-		if (FAIL == ret) {
-			stmt-error_info = conn-error_info;
+			/* COM_STMT_SEND_LONG_DATA doesn't send an OK packet*/
+			ret = conn-m-simple_command(conn, cmd, (char *)cmd_buf, packet_len,
+		 PROT_LAST , FALSE, TRUE TSRMLS_CC);
+			mnd_efree(cmd_buf);
+			if (FAIL == ret) {
+stmt-error_info = conn-error_info;
+			}
+		} else {
+			ret = FAIL;
+			SET_OOM_ERROR(stmt-error_info);
+			SET_OOM_ERROR(conn-error_info);
 		}
 		/*
 		  Cover protocol error: COM_STMT_SEND_LONG_DATA was designed to be quick and not

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c	2010-05-04 13:49:43 UTC (rev 298969)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c	2010-05-04 14:02:42 UTC (rev 298970)
@@ -359,9 +359,16 @@
 	DBG_INF_FMT(stmt=%d, stmt? stmt-stmt_id:0);

 	ret = FAIL;
-	rset_header = conn-protocol-m.get_rset_header_packet(conn-protocol, FALSE TSRMLS_CC);
 	do {
+		rset_header = conn-protocol-m.get_rset_header_packet(conn-protocol, FALSE TSRMLS_CC);
+		if (!rset_header) {
+			SET_OOM_ERROR(conn-error_info);
+			ret = FAIL;
+			break;
+		}
+
 		SET_ERROR_AFF_ROWS(conn);
+
 		if (FAIL == (ret = PACKET_READ(rset_header, conn))) {
 			php_error_docref(NULL TSRMLS_CC, E_WARNING, Error reading result set's header);
 			break;

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c	2010-05-04 13:49:43 UTC (rev 298969)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c	2010-05-04 14:02:42 UTC (rev 298970)
@@ -777,6 +777,7 @@
 static enum_func_status
 php_mysqlnd_rset_header_read(void *_packet, MYSQLND *conn TSRMLS_DC)
 {
+	enum_func_status ret = PASS;
 	size_t buf_len = conn-net-cmd_buffer.length;
 	zend_uchar *buf = (zend_uchar *) conn-net-cmd_buffer.buffer;
 	zend_uchar *p = buf;
@@ -819,9 +820,14 @@
 			*/
 			len = packet-header.size - 1;
 			packet-info_or_local_file = mnd_emalloc(len + 1);
-			memcpy(packet-info_or_local_file, p, len);
-			packet-info_or_local_file[len] = '\0';
-			packet-info_or_local_file_len = len;
+			if (packet-info_or_local_file) {
+memcpy(packet-info_or_local_file, p, len);
+packet-info_or_local_file[len] = '\0';
+packet-info_or_local_file_len = len;
+			} else {
+SET_OOM_ERROR(conn-error_info);
+ret = FAIL;
+			}
 			break;
 		case 0x00:
 			DBG_INF(UPSERT);
@@ -841,9 +847,14 @@
 			/* Check for additional textual data */
 			if (packet-header.size   (size_t) (p - buf)  (len = php_mysqlnd_net_field_length(p))) {
 packet-info_or_local_file = mnd_emalloc(len + 1);
-memcpy(packet-info_or_local_file, p, len);
-packet-info_or_local_file[len] = '\0';
-packet-info_or_local_file_len = len;
+if (packet-info_or_local_file) {
+	memcpy(packet-info_or_local_file, p, len);
+	packet-info_or_local_file[len] = '\0';
+	packet-info_or_local_file_len = len;
+} else {
+	SET_OOM_ERROR(conn-error_info);
+	ret = FAIL;
+}
 			}
 			DBG_INF_FMT(affected_rows=%llu last_insert_id=%llu server_status=%d warning_count=%d,
 		packet-affected_rows, packet-last_insert_id,
@@ 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/date/lib/interval.c branches/PHP_5_3/ext/date/lib/tm2unixtime.c branches/PHP_5_3/ext/date/tests/bug49081.phpt branches/PHP_5_3/e

2010-05-04 Thread Derick Rethans
derick   Tue, 04 May 2010 15:11:41 +

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

Log:
- Fixed bug #49081 (DateTime::diff() mistake if start in January and interval 
  28 days). (Derick)

Bug: http://bugs.php.net/49081 (Assigned) [PATCH] DateTime::diff() mistake if 
start in January and interval  28 days
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/date/lib/interval.c
U   php/php-src/branches/PHP_5_3/ext/date/lib/tm2unixtime.c
A   php/php-src/branches/PHP_5_3/ext/date/tests/bug49081.phpt
A   php/php-src/branches/PHP_5_3/ext/date/tests/date_diff.phpt
U   php/php-src/trunk/ext/date/lib/interval.c
U   php/php-src/trunk/ext/date/lib/tm2unixtime.c
A   php/php-src/trunk/ext/date/tests/bug49081.phpt
A   php/php-src/trunk/ext/date/tests/date_diff.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2010-05-04 14:35:48 UTC (rev 298972)
+++ php/php-src/branches/PHP_5_3/NEWS	2010-05-04 15:11:41 UTC (rev 298973)
@@ -129,6 +129,8 @@
 - Fixed bug #49429 (odbc_autocommit doesn't work). (Felipe)
 - Fixed bug #49234 (mysqli_ssl_set not found). (Andrey)
 - Fixed bug #49192 (PHP crashes when GC invoked on COM object). (Stas)
+- Fixed bug #49081 (DateTime::diff() mistake if start in January and interval 
+  28 days). (Derick)
 - Fixed bug #49059 (DateTime::diff() repeats previous sub() operation).
   (yoa...@gmail.com, Derick)
 - Fixed bug #48983 (DomDocument : saveHTMLFile wrong charset). (Rob)

Modified: php/php-src/branches/PHP_5_3/ext/date/lib/interval.c
===
--- php/php-src/branches/PHP_5_3/ext/date/lib/interval.c	2010-05-04 14:35:48 UTC (rev 298972)
+++ php/php-src/branches/PHP_5_3/ext/date/lib/interval.c	2010-05-04 15:11:41 UTC (rev 298973)
@@ -56,7 +56,7 @@
 	rt-s = two-s - one-s;
 	rt-days = abs(floor((one-sse - two-sse - (dst_h_corr * 3600) - (dst_m_corr * 60)) / 86400));

-	timelib_do_rel_normalize(one, rt);
+	timelib_do_rel_normalize(rt-invert ? one : two, rt);

 timelib_apply_localtime(one, 1);
 timelib_apply_localtime(two, 1);

Modified: php/php-src/branches/PHP_5_3/ext/date/lib/tm2unixtime.c
===
--- php/php-src/branches/PHP_5_3/ext/date/lib/tm2unixtime.c	2010-05-04 14:35:48 UTC (rev 298972)
+++ php/php-src/branches/PHP_5_3/ext/date/lib/tm2unixtime.c	2010-05-04 15:11:41 UTC (rev 298973)
@@ -41,39 +41,64 @@
 	return 0;
 }

-static int do_range_limit_days_relative(timelib_sll *base_y, timelib_sll *base_m, timelib_sll *y, timelib_sll *m, timelib_sll *d)
+static void inc_month(timelib_sll *y, timelib_sll *m)
 {
+	(*m)++;
+	if (*m  12) {
+		*m -= 12;
+		(*y)++;
+	}
+}
+
+static void dec_month(timelib_sll *y, timelib_sll *m)
+{
+	(*m)--;
+	if (*m  1) {
+		*m += 12;
+		(*y)--;
+	}
+}
+
+static void do_range_limit_days_relative(timelib_sll *base_y, timelib_sll *base_m, timelib_sll *y, timelib_sll *m, timelib_sll *d, timelib_sll invert)
+{
 	timelib_sll leapyear;
-	timelib_sll days_this_month;
-	timelib_sll next_month, next_year;
-	timelib_sll days_next_month;
+	timelib_sll month, year;
+	timelib_sll days;

 	do_range_limit(1, 13, 12, base_m, base_y);

-	leapyear = timelib_is_leap(*base_y);
-	days_this_month = leapyear ? days_in_month_leap[*base_m] : days_in_month[*base_m];
-	next_month = (*base_m) + 1;
+	year = *base_y;
+	month = *base_m;

-	if (next_month  12) {
-		next_month -= 12;
-		next_year = (*base_y) + 1;
+/*
+	printf( S: Y%d M%d   %d %d %d   %d\n, year, month, *y, *m, *d, days);
+*/
+	if (!invert) {
+		while (*d  0) {
+			dec_month(year, month);
+			leapyear = timelib_is_leap(year);
+			days = leapyear ? days_in_month_leap[month] : days_in_month[month];
+
+			/* printf( I  Y%d M%d   %d %d %d   %d\n, year, month, *y, *m, *d, days); */
+
+			*d += days;
+			(*m)--;
+		}
 	} else {
-		next_year = (*base_y);
-	}
-	leapyear = timelib_is_leap(next_year);
-	days_next_month = leapyear ? days_in_month_leap[next_month] : days_in_month[next_month];
+		while (*d  0) {
+			leapyear = timelib_is_leap(year);
+			days = leapyear ? days_in_month_leap[month] : days_in_month[month];

-	if (*d  0) {
-		*d += days_this_month;
-		(*m)--;
-		return 1;
+			/* printf( I  Y%d M%d   %d %d %d   %d\n, year, month, *y, *m, *d, days); */
+
+			*d += days;
+			(*m)--;
+			inc_month(year, month);
+		}
 	}
-	if (*d  days_next_month) {
-		*d -= days_next_month;
-		(*m)++;
-		return 1;
-	}
-	return 0;
+	/*
+	printf( E: Y%d M%d   %d %d %d   %d\n, year, month, *y, *m, *d, days);
+	*/
 }

 static int do_range_limit_days(timelib_sll *y, timelib_sll *m, timelib_sll *d)
@@ -150,7 +175,7 @@
 	do {} while (do_range_limit(0, 24, 24, rt-h, rt-d));
 	do {} while (do_range_limit(0, 12, 12, rt-m, rt-y));

-	do {} while (do_range_limit_days_relative(base-y, base-m, rt-y, rt-m, 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/dom/tests/bug49490.phpt branches/PHP_5_3/ext/dom/xpath.c trunk/ext/dom/tests/bug49490.phpt trunk/ext/dom/xpath.c

2010-05-04 Thread Rob Richards
rrichardsTue, 04 May 2010 15:41:49 +

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

Log:
fix bug #49490 (XPath namespace prefix conflict)
add test

Bug: http://bugs.php.net/49490 (Assigned) XPath namespace prefix conflict
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
A   php/php-src/branches/PHP_5_3/ext/dom/tests/bug49490.phpt
U   php/php-src/branches/PHP_5_3/ext/dom/xpath.c
A   php/php-src/trunk/ext/dom/tests/bug49490.phpt
U   php/php-src/trunk/ext/dom/xpath.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-05-04 15:11:41 UTC (rev 298973)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-05-04 15:41:49 UTC (rev 298974)
@@ -126,6 +126,7 @@
 - Fixed bug #49700 (memory leaks in php_date.c if garbage collector is
   enabled). (Dmitry)
 - Fixed bug #49576 (FILTER_VALIDATE_EMAIL filter needs updating) (Rasmus)
+- Fixed bug #49490 (XPath namespace prefix conflict). (Rob)
 - Fixed bug #49429 (odbc_autocommit doesn't work). (Felipe)
 - Fixed bug #49234 (mysqli_ssl_set not found). (Andrey)
 - Fixed bug #49192 (PHP crashes when GC invoked on COM object). (Stas)

Added: php/php-src/branches/PHP_5_3/ext/dom/tests/bug49490.phpt
===
--- php/php-src/branches/PHP_5_3/ext/dom/tests/bug49490.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/dom/tests/bug49490.phpt2010-05-04 
15:41:49 UTC (rev 298974)
@@ -0,0 +1,17 @@
+--TEST--
+Bug #49490 (XPath namespace prefix conflict).
+--SKIPIF--
+?php require_once('skipif.inc'); ?
+--FILE--
+?php
+$doc = new DOMDocument();
+$doc-loadXML('prefix:root xmlns:prefix=urn:a /');
+
+$xp = new DOMXPath($doc);
+$xp-registerNamespace('prefix', 'urn:b');
+
+echo($xp-query('//prefix:root', null, false)-length . \n);
+
+?
+--EXPECT--
+0

Modified: php/php-src/branches/PHP_5_3/ext/dom/xpath.c
===
--- php/php-src/branches/PHP_5_3/ext/dom/xpath.c2010-05-04 15:11:41 UTC 
(rev 298973)
+++ php/php-src/branches/PHP_5_3/ext/dom/xpath.c2010-05-04 15:41:49 UTC 
(rev 298974)
@@ -48,12 +48,14 @@

 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_query, 0, 0, 1)
ZEND_ARG_INFO(0, expr)
-   ZEND_ARG_OBJ_INFO(0, context, DOMNode, 0)
+   ZEND_ARG_OBJ_INFO(0, context, DOMNode, 1)
+   ZEND_ARG_INFO(0, registerNodeNS)
 ZEND_END_ARG_INFO();

 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_evaluate, 0, 0, 1)
ZEND_ARG_INFO(0, expr)
-   ZEND_ARG_OBJ_INFO(0, context, DOMNode, 0)
+   ZEND_ARG_OBJ_INFO(0, context, DOMNode, 1)
+   ZEND_ARG_INFO(0, registerNodeNS)
 ZEND_END_ARG_INFO();

 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_register_php_functions, 0, 0, 0)
@@ -385,9 +387,10 @@
dom_object *nodeobj;
char *expr;
xmlDoc *docp = NULL;
-   xmlNsPtr *ns;
+   xmlNsPtr *ns = NULL;
+   zend_bool register_node_ns = 1;

-   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
Os|O, id, dom_xpath_class_entry, expr, expr_len, context, 
dom_node_class_entry) == FAILURE) {
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
Os|O!b, id, dom_xpath_class_entry, expr, expr_len, context, 
dom_node_class_entry, register_node_ns) == FAILURE) {
return;
}

@@ -420,13 +423,15 @@

ctxp-node = nodep;

-   /* Register namespaces in the node */
-   ns = xmlGetNsList(docp, nodep);
+   if (register_node_ns) {
+   /* Register namespaces in the node */
+   ns = xmlGetNsList(docp, nodep);

-if (ns != NULL) {
-while (ns[nsnbr] != NULL)
-   nsnbr++;
-}
+   if (ns != NULL) {
+   while (ns[nsnbr] != NULL)
+   nsnbr++;
+   }
+   }


 ctxp-namespaces = ns;
@@ -518,14 +523,14 @@
 }
 /* }}} */

-/* {{{ proto DOMNodeList dom_xpath_query(string expr [,DOMNode context]); */
+/* {{{ proto DOMNodeList dom_xpath_query(string expr [,DOMNode context [, 
boolean registerNodeNS]]); */
 PHP_FUNCTION(dom_xpath_query)
 {
php_xpath_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_DOM_XPATH_QUERY);
 }
 /* }}} end dom_xpath_query */

-/* {{{ proto mixed dom_xpath_evaluate(string expr [,DOMNode context]); */
+/* {{{ proto mixed dom_xpath_evaluate(string expr [,DOMNode context [, boolean 
registerNodeNS]]); */
 PHP_FUNCTION(dom_xpath_evaluate)
 {
php_xpath_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
PHP_DOM_XPATH_EVALUATE);

Added: php/php-src/trunk/ext/dom/tests/bug49490.phpt
===
--- php/php-src/trunk/ext/dom/tests/bug49490.phpt   
(rev 0)
+++ php/php-src/trunk/ext/dom/tests/bug49490.phpt   2010-05-04 15:41:49 UTC 
(rev 298974)
@@ -0,0 +1,17 @@

[PHP-CVS] svn: /php/php-src/trunk/Zend/ zend_compile.c zend_vm_def.h zend_vm_execute.h

2010-05-04 Thread Felipe Pena
felipe   Tue, 04 May 2010 18:21:00 +

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

Log:
- Added check for abstract class

  abstract class foo { }
  class T { use foo; } // T cannot use foo - it is not a trait

- Added check for trait on NEW

  trait a { }
  new a; // Cannot instantiate trait a

# Tests for errors comming soon :)

Changed paths:
U   php/php-src/trunk/Zend/zend_compile.c
U   php/php-src/trunk/Zend/zend_vm_def.h
U   php/php-src/trunk/Zend/zend_vm_execute.h

Modified: php/php-src/trunk/Zend/zend_compile.c
===
--- php/php-src/trunk/Zend/zend_compile.c   2010-05-04 18:08:14 UTC (rev 
298985)
+++ php/php-src/trunk/Zend/zend_compile.c   2010-05-04 18:21:00 UTC (rev 
298986)
@@ -4518,7 +4518,7 @@
opline-opcode = ZEND_ADD_TRAIT;
SET_NODE(opline-op1, CG(implementing_class));
zend_resolve_class_name(trait_name, opline-extended_value, 0 
TSRMLS_CC);
-   opline-extended_value = (opline-extended_value  
~ZEND_FETCH_CLASS_MASK) | ZEND_FETCH_CLASS_TRAIT;
+   opline-extended_value = ZEND_FETCH_CLASS_TRAIT;
opline-op2_type = IS_CONST;
opline-op2.constant = zend_add_class_name_literal(CG(active_op_array), 
trait_name-u.constant TSRMLS_CC);
CG(active_class_entry)-num_traits++;

Modified: php/php-src/trunk/Zend/zend_vm_def.h
===
--- php/php-src/trunk/Zend/zend_vm_def.h2010-05-04 18:08:14 UTC (rev 
298985)
+++ php/php-src/trunk/Zend/zend_vm_def.h2010-05-04 18:21:00 UTC (rev 
298986)
@@ -3230,6 +3230,8 @@

if (EX_T(opline-op1.var).class_entry-ce_flags  
ZEND_ACC_INTERFACE) {
class_type = interface;
+   } else if (EX_T(opline-op1.var).class_entry-ce_flags  
ZEND_ACC_TRAIT) {
+   class_type = trait;
} else {
class_type = abstract class;
}
@@ -4663,7 +4665,7 @@
  opline-extended_value TSRMLS_CC);

if (trait) {
-   if (!(trait-ce_flags  ZEND_ACC_TRAIT)) {
+   if (!((trait-ce_flags  ~ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)  
ZEND_ACC_TRAIT)) {
zend_error_noreturn(E_ERROR, %s cannot use %s - it is 
not a trait, ce-name, trait-name);
}
zend_do_implement_trait(ce, trait TSRMLS_CC);

Modified: php/php-src/trunk/Zend/zend_vm_execute.h
===
--- php/php-src/trunk/Zend/zend_vm_execute.h2010-05-04 18:08:14 UTC (rev 
298985)
+++ php/php-src/trunk/Zend/zend_vm_execute.h2010-05-04 18:21:00 UTC (rev 
298986)
@@ -520,6 +520,8 @@

if (EX_T(opline-op1.var).class_entry-ce_flags  
ZEND_ACC_INTERFACE) {
class_type = interface;
+   } else if (EX_T(opline-op1.var).class_entry-ce_flags  
ZEND_ACC_TRAIT) {
+   class_type = trait;
} else {
class_type = abstract class;
}
@@ -691,7 +693,7 @@
  opline-extended_value TSRMLS_CC);

if (trait) {
-   if (!(trait-ce_flags  ZEND_ACC_TRAIT)) {
+   if (!((trait-ce_flags  ~ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)  
ZEND_ACC_TRAIT)) {
zend_error_noreturn(E_ERROR, %s cannot use %s - it is 
not a trait, ce-name, trait-name);
}
zend_do_implement_trait(ce, trait TSRMLS_CC);

-- 
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/ zend_vm_def.h zend_vm_execute.h

2010-05-04 Thread Felipe Pena
felipe   Tue, 04 May 2010 18:31:40 +

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

Log:
- Fix trait flag identification

Changed paths:
U   php/php-src/trunk/Zend/zend_vm_def.h
U   php/php-src/trunk/Zend/zend_vm_execute.h

Modified: php/php-src/trunk/Zend/zend_vm_def.h
===
--- php/php-src/trunk/Zend/zend_vm_def.h2010-05-04 18:21:00 UTC (rev 
298986)
+++ php/php-src/trunk/Zend/zend_vm_def.h2010-05-04 18:31:40 UTC (rev 
298987)
@@ -3230,7 +3230,7 @@

if (EX_T(opline-op1.var).class_entry-ce_flags  
ZEND_ACC_INTERFACE) {
class_type = interface;
-   } else if (EX_T(opline-op1.var).class_entry-ce_flags  
ZEND_ACC_TRAIT) {
+   } else if ((EX_T(opline-op1.var).class_entry-ce_flags  
~ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)  ZEND_ACC_TRAIT) {
class_type = trait;
} else {
class_type = abstract class;

Modified: php/php-src/trunk/Zend/zend_vm_execute.h
===
--- php/php-src/trunk/Zend/zend_vm_execute.h2010-05-04 18:21:00 UTC (rev 
298986)
+++ php/php-src/trunk/Zend/zend_vm_execute.h2010-05-04 18:31:40 UTC (rev 
298987)
@@ -520,7 +520,7 @@

if (EX_T(opline-op1.var).class_entry-ce_flags  
ZEND_ACC_INTERFACE) {
class_type = interface;
-   } else if (EX_T(opline-op1.var).class_entry-ce_flags  
ZEND_ACC_TRAIT) {
+   } else if ((EX_T(opline-op1.var).class_entry-ce_flags  
~ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)  ZEND_ACC_TRAIT) {
class_type = trait;
} else {
class_type = abstract class;

-- 
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/ zend_compile.c

2010-05-04 Thread Felipe Pena
felipe   Tue, 04 May 2010 18:45:01 +

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

Log:
- Added check for trait when trying to extend it

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

Modified: php/php-src/trunk/Zend/zend_compile.c
===
--- php/php-src/trunk/Zend/zend_compile.c   2010-05-04 18:31:40 UTC (rev 
298987)
+++ php/php-src/trunk/Zend/zend_compile.c   2010-05-04 18:45:01 UTC (rev 
298988)
@@ -3932,6 +3932,8 @@

if (parent_ce-ce_flags  ZEND_ACC_INTERFACE) {
zend_error(E_COMPILE_ERROR, Class %s cannot extend from 
interface %s, ce-name, parent_ce-name);
+   } else if ((parent_ce-ce_flags  ~ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)  
ZEND_ACC_TRAIT) {
+   zend_error(E_COMPILE_ERROR, Class %s cannot extend from trait 
%s, ce-name, parent_ce-name);
}

zend_do_inheritance(ce, parent_ce TSRMLS_CC);

-- 
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/traits/ error_001.phpt error_002.phpt error_003.phpt error_004.phpt error_005.phpt error_006.phpt error_007.phpt error_008.phpt error_009.phpt

2010-05-04 Thread Felipe Pena
felipe   Tue, 04 May 2010 19:06:13 +

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

Log:
- New tests

Changed paths:
A   php/php-src/trunk/Zend/tests/traits/error_001.phpt
A   php/php-src/trunk/Zend/tests/traits/error_002.phpt
A   php/php-src/trunk/Zend/tests/traits/error_003.phpt
A   php/php-src/trunk/Zend/tests/traits/error_004.phpt
A   php/php-src/trunk/Zend/tests/traits/error_005.phpt
A   php/php-src/trunk/Zend/tests/traits/error_006.phpt
A   php/php-src/trunk/Zend/tests/traits/error_007.phpt
A   php/php-src/trunk/Zend/tests/traits/error_008.phpt
A   php/php-src/trunk/Zend/tests/traits/error_009.phpt

Added: php/php-src/trunk/Zend/tests/traits/error_001.phpt
===
--- php/php-src/trunk/Zend/tests/traits/error_001.phpt  
(rev 0)
+++ php/php-src/trunk/Zend/tests/traits/error_001.phpt  2010-05-04 19:06:13 UTC 
(rev 298989)
@@ -0,0 +1,28 @@
+--TEST--
+Trying to use instanceof for a method twice
+--FILE--
+?php
+
+trait foo {
+   public function foo() {
+   return 1;
+   }
+}
+
+trait foo2 {
+   public function foo() {
+   return 2;
+   }
+}
+
+
+class A extends foo {
+   use foo {
+   foo2::foo insteadof foo;
+   foo2::foo insteadof foo;
+   }
+}
+
+?
+--EXPECTF--
+Fatal error: Class A cannot extend from trait foo in %s on line %d


Property changes on: php/php-src/trunk/Zend/tests/traits/error_001.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Added: php/php-src/trunk/Zend/tests/traits/error_002.phpt
===
--- php/php-src/trunk/Zend/tests/traits/error_002.phpt  
(rev 0)
+++ php/php-src/trunk/Zend/tests/traits/error_002.phpt  2010-05-04 19:06:13 UTC 
(rev 298989)
@@ -0,0 +1,12 @@
+--TEST--
+Trying to use an undefined trait
+--FILE--
+?php
+
+class A {
+   use abc;
+}
+
+?
+--EXPECTF--
+Fatal error: Trait 'abc' not found in %s on line %d


Property changes on: php/php-src/trunk/Zend/tests/traits/error_002.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Added: php/php-src/trunk/Zend/tests/traits/error_003.phpt
===
--- php/php-src/trunk/Zend/tests/traits/error_003.phpt  
(rev 0)
+++ php/php-src/trunk/Zend/tests/traits/error_003.phpt  2010-05-04 19:06:13 UTC 
(rev 298989)
@@ -0,0 +1,15 @@
+--TEST--
+Trying to use an interface as trait
+--FILE--
+?php
+
+interface abc {
+}
+
+class A {
+   use abc;
+}
+
+?
+--EXPECTF--
+Fatal error: A cannot use abc - it is not a trait in %s on line %d


Property changes on: php/php-src/trunk/Zend/tests/traits/error_003.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Added: php/php-src/trunk/Zend/tests/traits/error_004.phpt
===
--- php/php-src/trunk/Zend/tests/traits/error_004.phpt  
(rev 0)
+++ php/php-src/trunk/Zend/tests/traits/error_004.phpt  2010-05-04 19:06:13 UTC 
(rev 298989)
@@ -0,0 +1,15 @@
+--TEST--
+Trying to use a class as trait
+--FILE--
+?php
+
+class abc {
+}
+
+class A {
+   use abc;
+}
+
+?
+--EXPECTF--
+Fatal error: A cannot use abc - it is not a trait in %s on line %d


Property changes on: php/php-src/trunk/Zend/tests/traits/error_004.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Added: php/php-src/trunk/Zend/tests/traits/error_005.phpt
===
--- php/php-src/trunk/Zend/tests/traits/error_005.phpt  
(rev 0)
+++ php/php-src/trunk/Zend/tests/traits/error_005.phpt  2010-05-04 19:06:13 UTC 
(rev 298989)
@@ -0,0 +1,15 @@
+--TEST--
+Trying to use a final class as trait
+--FILE--
+?php
+
+final class abc {
+}
+
+class A {
+   use abc;
+}
+
+?
+--EXPECTF--
+Fatal error: A cannot use abc - it is not a trait in %s on line %d


Property changes on: php/php-src/trunk/Zend/tests/traits/error_005.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Added: php/php-src/trunk/Zend/tests/traits/error_006.phpt
===
--- php/php-src/trunk/Zend/tests/traits/error_006.phpt  
(rev 0)
+++ php/php-src/trunk/Zend/tests/traits/error_006.phpt  2010-05-04 19:06:13 UTC 
(rev 298989)
@@ -0,0 +1,15 @@
+--TEST--