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

2011-05-17 Thread Andrey Hristov
andrey   Tue, 17 May 2011 09:44:11 +

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

Log:
exchange a trap with an error

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

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   2011-05-17 
05:16:29 UTC (rev 311121)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c   2011-05-17 
09:44:11 UTC (rev 311122)
@@ -1583,7 +1583,7 @@
} else if (result-m.fetch_row == 
result-m.fetch_row_normal_unbuffered) {
DBG_RETURN(mysqlnd_fetch_row_unbuffered_c(result 
TSRMLS_CC));
} else {
-   *((int*)NULL) = 1;
+   php_error_docref(NULL TSRMLS_CC, E_ERROR, 
result-m.fetch_row has invalid value. Report to the developers);
}
}
DBG_RETURN(ret);

Modified: php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_result.c
===
--- php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_result.c   2011-05-17 
05:16:29 UTC (rev 311121)
+++ php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd_result.c   2011-05-17 
09:44:11 UTC (rev 311122)
@@ -1546,7 +1546,7 @@
} else if (result-m.fetch_row == 
result-m.fetch_row_normal_unbuffered) {
DBG_RETURN(mysqlnd_fetch_row_unbuffered_c(result 
TSRMLS_CC));
} else {
-   *((int*)NULL) = 1;
+   php_error_docref(NULL TSRMLS_CC, E_ERROR, 
result-m.fetch_row has invalid value. Report to the developers);
}
}
DBG_RETURN(ret);

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c
===
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c  2011-05-17 05:16:29 UTC 
(rev 311121)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c  2011-05-17 09:44:11 UTC 
(rev 311122)
@@ -1546,7 +1546,7 @@
} else if (result-m.fetch_row == 
result-m.fetch_row_normal_unbuffered) {
DBG_RETURN(mysqlnd_fetch_row_unbuffered_c(result 
TSRMLS_CC));
} else {
-   *((int*)NULL) = 1;
+   php_error_docref(NULL TSRMLS_CC, E_ERROR, 
result-m.fetch_row has invalid value. Report to the developers);
}
}
DBG_RETURN(ret);

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/Zend/zend_compile.c trunk/Zend/zend_compile.c

2011-05-17 Thread Pierre Joye
pajoye   Tue, 17 May 2011 10:39:18 +

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

Log:
- WS

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

Modified: php/php-src/branches/PHP_5_4/Zend/zend_compile.c
===
--- php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-05-17 09:44:11 UTC 
(rev 311122)
+++ php/php-src/branches/PHP_5_4/Zend/zend_compile.c2011-05-17 10:39:18 UTC 
(rev 311123)
@@ -2256,7 +2256,7 @@
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
CG(zend_lineno) = opline-lineno;
-   zend_error(E_COMPILE_ERROR, 'goto' to undefined label '%s', 
Z_STRVAL_P(label));
+   zend_error(E_COMPILE_ERROR, 'goto' to undefined label 
'%s', Z_STRVAL_P(label));
} else {
/* Label is not defined. Delay to pass 2. */
INC_BPC(op_array);

Modified: php/php-src/trunk/Zend/zend_compile.c
===
--- php/php-src/trunk/Zend/zend_compile.c   2011-05-17 09:44:11 UTC (rev 
311122)
+++ php/php-src/trunk/Zend/zend_compile.c   2011-05-17 10:39:18 UTC (rev 
311123)
@@ -2256,7 +2256,7 @@
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
CG(zend_lineno) = opline-lineno;
-   zend_error(E_COMPILE_ERROR, 'goto' to undefined label '%s', 
Z_STRVAL_P(label));
+   zend_error(E_COMPILE_ERROR, 'goto' to undefined label 
'%s', Z_STRVAL_P(label));
} else {
/* Label is not defined. Delay to pass 2. */
INC_BPC(op_array);

-- 
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/soap/soap.c branches/PHP_5_3/ext/soap/soap.c trunk/ext/soap/soap.c

2011-05-17 Thread Dmitry Stogov
dmitry   Tue, 17 May 2011 12:27:21 +

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

Log:
Fixed crash on recursive error handler invocation

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/soap/soap.c
U   php/php-src/branches/PHP_5_3/ext/soap/soap.c
U   php/php-src/trunk/ext/soap/soap.c

Modified: php/php-src/branches/PHP_5_2/ext/soap/soap.c
===
--- php/php-src/branches/PHP_5_2/ext/soap/soap.c2011-05-17 11:43:55 UTC 
(rev 311124)
+++ php/php-src/branches/PHP_5_2/ext/soap/soap.c2011-05-17 12:27:21 UTC 
(rev 311125)
@@ -2111,7 +2111,7 @@
_old_http_response_code = SG(sapi_headers).http_response_code;
_old_http_status_line = SG(sapi_headers).http_status_line;

-   if (!SOAP_GLOBAL(use_soap_error_handler)) {
+   if (!SOAP_GLOBAL(use_soap_error_handler) || 
!EG(objects_store).object_buckets) {
call_old_error_handler(error_num, error_filename, error_lineno, 
format, args);
return;
}

Modified: php/php-src/branches/PHP_5_3/ext/soap/soap.c
===
--- php/php-src/branches/PHP_5_3/ext/soap/soap.c2011-05-17 11:43:55 UTC 
(rev 311124)
+++ php/php-src/branches/PHP_5_3/ext/soap/soap.c2011-05-17 12:27:21 UTC 
(rev 311125)
@@ -2284,7 +2284,7 @@
_old_http_response_code = SG(sapi_headers).http_response_code;
_old_http_status_line = SG(sapi_headers).http_status_line;

-   if (!SOAP_GLOBAL(use_soap_error_handler)) {
+   if (!SOAP_GLOBAL(use_soap_error_handler) || 
!EG(objects_store).object_buckets) {
call_old_error_handler(error_num, error_filename, error_lineno, 
format, args);
return;
}

Modified: php/php-src/trunk/ext/soap/soap.c
===
--- php/php-src/trunk/ext/soap/soap.c   2011-05-17 11:43:55 UTC (rev 311124)
+++ php/php-src/trunk/ext/soap/soap.c   2011-05-17 12:27:21 UTC (rev 311125)
@@ -2094,7 +2094,7 @@
_old_http_response_code = SG(sapi_headers).http_response_code;
_old_http_status_line = SG(sapi_headers).http_status_line;

-   if (!SOAP_GLOBAL(use_soap_error_handler)) {
+   if (!SOAP_GLOBAL(use_soap_error_handler) || 
!EG(objects_store).object_buckets) {
call_old_error_handler(error_num, error_filename, error_lineno, 
format, args);
return;
}

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

[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING ext/simplexml/simplexml.c ext/simplexml/tests/034.phpt ext/simplexml/tests/bug51615.phpt

2011-05-17 Thread Andrew Curioso
acurioso Tue, 17 May 2011 13:50:48 +

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

Log:
Use iterator when necessary to get the full properties hash - consistent with 
count (see test: ext/simplexml/tests/034.phpt)

Changed paths:
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/simplexml/simplexml.c
U   php/php-src/trunk/ext/simplexml/tests/034.phpt
U   php/php-src/trunk/ext/simplexml/tests/bug51615.phpt

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2011-05-17 13:20:28 UTC (rev 311137)
+++ php/php-src/trunk/UPGRADING 2011-05-17 13:50:48 UTC (rev 311138)
@@ -170,6 +170,10 @@
 - fclose() closes streams with resource refcount  1; it doesn't merely
   decrement the resource refcount.
 - socket_set_options() and socket_get_options() now support multicast options.
+- Arrays cast from SimpleXMLElement now always contain all nodes instead of
+  just the first matching node.
+- All SimpleXMLElement children are now always printed when using var_dump(),
+  var_export(), and print_r().

 ===
 5. Changes made to existing methods

Modified: php/php-src/trunk/ext/simplexml/simplexml.c
===
--- php/php-src/trunk/ext/simplexml/simplexml.c 2011-05-17 13:20:28 UTC (rev 
311137)
+++ php/php-src/trunk/ext/simplexml/simplexml.c 2011-05-17 13:50:48 UTC (rev 
311138)
@@ -1069,7 +1069,11 @@
xmlAttrPtr   attr;
int  namelen;
int  test;
+   char use_iter;
+   zval*iter_data;

+   use_iter = 0;
+
sxe = php_sxe_fetch_object(object TSRMLS_CC);

if (is_debug) {
@@ -1122,6 +1126,7 @@

GET_NODE(sxe, node);
node = php_sxe_get_first_node(sxe, node TSRMLS_CC);
+
if (node  sxe-iter.type != SXE_ITER_ATTRLIST) {
if (node-type == XML_ATTRIBUTE_NODE) {
MAKE_STD_ZVAL(value);
@@ -1129,7 +1134,17 @@
zend_hash_next_index_insert(rv, value, sizeof(zval *), 
NULL);
node = NULL;
} else if (sxe-iter.type != SXE_ITER_CHILD) {
-   node = node-children;
+
+   if ( !node-children || !node-parent || 
node-children-next || node-children-children || node-parent-children == 
node-parent-last ) {
+   node = node-children;
+   } else {
+   iter_data = sxe-iter.data;
+   sxe-iter.data = NULL;
+
+   node = php_sxe_reset_iterator(sxe, 0 TSRMLS_CC);
+
+   use_iter = 1;
+   }
}

while (node) {
@@ -1161,12 +1176,27 @@

_get_base_node_value(sxe, node, value, 
sxe-iter.nsprefix, sxe-iter.isprefix TSRMLS_CC);

-   sxe_properties_add(rv, name, namelen, value TSRMLS_CC);
+   if ( use_iter ) {
+   zend_hash_next_index_insert(rv, value, 
sizeof(zval *), NULL);
+   } else {
+   sxe_properties_add(rv, name, namelen, value 
TSRMLS_CC);
+   }
 next_iter:
-   node = node-next;
+   if ( use_iter ) {
+   node = php_sxe_iterator_fetch(sxe, node-next, 
0 TSRMLS_CC);
+   } else {
+   node = node-next;
+   }
}
}

+   if ( use_iter ) {
+   if (sxe-iter.data) {
+   zval_ptr_dtor(sxe-iter.data);
+   }
+   sxe-iter.data = iter_data;
+   }
+
return rv;
 }
 /* }}} */

Modified: php/php-src/trunk/ext/simplexml/tests/034.phpt
===
--- php/php-src/trunk/ext/simplexml/tests/034.phpt  2011-05-17 13:20:28 UTC 
(rev 311137)
+++ php/php-src/trunk/ext/simplexml/tests/034.phpt  2011-05-17 13:50:48 UTC 
(rev 311138)
@@ -1,7 +1,7 @@
 --TEST--
-SimpleXML: array casting bug
---XFAIL--
-Does anyone know why?
+SimpleXML: cast to array
+--FAIL--
+Length of cast array does not match expected length
 --SKIPIF--
 ?php if (!extension_loaded(simplexml)) print skip; ?
 --FILE--

Modified: php/php-src/trunk/ext/simplexml/tests/bug51615.phpt
===
--- php/php-src/trunk/ext/simplexml/tests/bug51615.phpt 2011-05-17 13:20:28 UTC 
(rev 311137)
+++ php/php-src/trunk/ext/simplexml/tests/bug51615.phpt 2011-05-17 13:50:48 UTC 
(rev 311138)
@@ -20,7 +20,7 @@
 Warning: DOMDocument::loadHTML(): error parsing attribute name in Entity, 
line: 1 in %s on line %d

 Warning: 

Re: [PHP-CVS] svn: /php/php-src/trunk/ UPGRADING ext/simplexml/simplexml.c ext/simplexml/tests/034.phpt ext/simplexml/tests/bug51615.phpt

2011-05-17 Thread Kalle Sommer Nielsen
Hi

2011/5/17 Andrew Curioso acuri...@php.net:
 acurioso                                 Tue, 17 May 2011 13:50:48 +

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

 Log:
 Use iterator when necessary to get the full properties hash - consistent with 
 count (see test: ext/simplexml/tests/034.phpt)

Shouldn't this be merged to PHP_5_4 aswell?

-- 
regards,

Kalle Sommer Nielsen
ka...@php.net

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



Re: [PHP-CVS] svn: /php/php-src/trunk/ UPGRADING ext/simplexml/simplexml.c ext/simplexml/tests/034.phpt ext/simplexml/tests/bug51615.phpt

2011-05-17 Thread Andrew Curioso
I didn't realize that branch was created. It should be in PHP_5_4, yes.

I'm new to the team... so can you help me out? What is the standard way to
do that?
Using svn merge or just patch the code directly in the branch?

Thanks in advance,
- Andrew


On Tue, May 17, 2011 at 10:26 AM, Kalle Sommer Nielsen ka...@php.netwrote:

 Hi

 2011/5/17 Andrew Curioso acuri...@php.net:
  acurioso Tue, 17 May 2011 13:50:48 +
 
  Revision: http://svn.php.net/viewvc?view=revisionrevision=311138
 
  Log:
  Use iterator when necessary to get the full properties hash - consistent
 with count (see test: ext/simplexml/tests/034.phpt)

 Shouldn't this be merged to PHP_5_4 aswell?

 --
 regards,

 Kalle Sommer Nielsen
 ka...@php.net



Re: [PHP-CVS] svn: /php/php-src/trunk/ UPGRADING ext/simplexml/simplexml.c ext/simplexml/tests/034.phpt ext/simplexml/tests/bug51615.phpt

2011-05-17 Thread Pierre Joye
hi,

Whatever fits for you for this commit.

For the next commits, please try to commit to all branches at once,
see https://wiki.php.net/vcs/svnfaq about how to do a sparse checkout,
then you can simply do a commit like:

cd php-src
svn commit branches/PHP_5_4 trunk/

Cheers,

On Tue, May 17, 2011 at 4:43 PM, Andrew Curioso acuri...@php.net wrote:
 I didn't realize that branch was created. It should be in PHP_5_4, yes.

 I'm new to the team... so can you help me out? What is the standard way to
 do that?
 Using svn merge or just patch the code directly in the branch?

 Thanks in advance,
 - Andrew


 On Tue, May 17, 2011 at 10:26 AM, Kalle Sommer Nielsen ka...@php.netwrote:

 Hi

 2011/5/17 Andrew Curioso acuri...@php.net:
  acurioso                                 Tue, 17 May 2011 13:50:48 +
 
  Revision: http://svn.php.net/viewvc?view=revisionrevision=311138
 
  Log:
  Use iterator when necessary to get the full properties hash - consistent
 with count (see test: ext/simplexml/tests/034.phpt)

 Shouldn't this be merged to PHP_5_4 aswell?

 --
 regards,

 Kalle Sommer Nielsen
 ka...@php.net





-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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



[PHP-CVS] svn: /php/php-src/trunk/tests/security/ open_basedir_readlink.phpt

2011-05-17 Thread Jeraimee Hughes
jeraimee Tue, 17 May 2011 15:06:48 +

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

Log:
Fix for failing test.

Changed paths:
U   php/php-src/trunk/tests/security/open_basedir_readlink.phpt

Modified: php/php-src/trunk/tests/security/open_basedir_readlink.phpt
===
--- php/php-src/trunk/tests/security/open_basedir_readlink.phpt 2011-05-17 
14:02:37 UTC (rev 311139)
+++ php/php-src/trunk/tests/security/open_basedir_readlink.phpt 2011-05-17 
15:06:48 UTC (rev 311140)
@@ -69,8 +69,6 @@

 Warning: readlink(): open_basedir restriction in effect. 
File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on 
line %d
 bool(false)
-
-Warning: unlink(): open_basedir restriction in effect. 
File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on 
line %d
-bool(false)
+bool(true)
 *** Finished testing open_basedir configuration [readlink] ***


-- 
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/mcrypt/tests/bug46010.phpt tests/security/open_basedir_linkinfo.phpt

2011-05-17 Thread Jeraimee Hughes
jeraimee Tue, 17 May 2011 15:08:15 +

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

Log:
Fixes for broken tests.

Changed paths:
U   php/php-src/trunk/ext/mcrypt/tests/bug46010.phpt
U   php/php-src/trunk/tests/security/open_basedir_linkinfo.phpt

Modified: php/php-src/trunk/ext/mcrypt/tests/bug46010.phpt
===
--- php/php-src/trunk/ext/mcrypt/tests/bug46010.phpt2011-05-17 15:06:48 UTC 
(rev 311140)
+++ php/php-src/trunk/ext/mcrypt/tests/bug46010.phpt2011-05-17 15:08:15 UTC 
(rev 311141)
@@ -1,5 +1,7 @@
 --TEST--
 Bug #46010 (warnings incorrectly generated for iv in ecb mode)
+--SKIPIF--
+?php if (!extension_loaded(mcrypt)) print skip; ?
 --FILE--
 ?php


Modified: php/php-src/trunk/tests/security/open_basedir_linkinfo.phpt
===
--- php/php-src/trunk/tests/security/open_basedir_linkinfo.phpt 2011-05-17 
15:06:48 UTC (rev 311140)
+++ php/php-src/trunk/tests/security/open_basedir_linkinfo.phpt 2011-05-17 
15:08:15 UTC (rev 311141)
@@ -57,8 +57,6 @@
 Warning: symlink(): open_basedir restriction in effect. 
File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line 
%d
 bool(false)
 int(%d)
-
-Warning: unlink(): open_basedir restriction in effect. 
File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on 
line %d
-bool(false)
+bool(true)
 *** Finished testing open_basedir configuration [linkinfo] ***


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

Re: [PHP-CVS] svn: /php/php-src/trunk/ UPGRADING ext/simplexml/simplexml.c ext/simplexml/tests/034.phpt ext/simplexml/tests/bug51615.phpt

2011-05-17 Thread Andrew Curioso
Thank you.

I'll read through that sparse checkout documentation and also commit to the
branch in a few hours.
I'd do it now but unfortunately I have a meeting to run to.

Thanks again,
- Andrew


On Tue, May 17, 2011 at 10:59 AM, Pierre Joye pierre@gmail.com wrote:

 hi,

 Whatever fits for you for this commit.

 For the next commits, please try to commit to all branches at once,
 see https://wiki.php.net/vcs/svnfaq about how to do a sparse checkout,
 then you can simply do a commit like:

 cd php-src
 svn commit branches/PHP_5_4 trunk/

 Cheers,

 On Tue, May 17, 2011 at 4:43 PM, Andrew Curioso acuri...@php.net wrote:
  I didn't realize that branch was created. It should be in PHP_5_4, yes.
 
  I'm new to the team... so can you help me out? What is the standard way
 to
  do that?
  Using svn merge or just patch the code directly in the branch?
 
  Thanks in advance,
  - Andrew
 
 
  On Tue, May 17, 2011 at 10:26 AM, Kalle Sommer Nielsen ka...@php.net
 wrote:
 
  Hi
 
  2011/5/17 Andrew Curioso acuri...@php.net:
   acurioso Tue, 17 May 2011 13:50:48
 +
  
   Revision: http://svn.php.net/viewvc?view=revisionrevision=311138
  
   Log:
   Use iterator when necessary to get the full properties hash -
 consistent
  with count (see test: ext/simplexml/tests/034.phpt)
 
  Shouldn't this be merged to PHP_5_4 aswell?
 
  --
  regards,
 
  Kalle Sommer Nielsen
  ka...@php.net
 
 



 --
 Pierre

 @pierrejoye | http://blog.thepimp.net | http://www.libgd.org

 --
 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_4/TSRM/acconfig.h branches/PHP_5_4/TSRM/build.mk branches/PHP_5_4/TSRM/configure.in branches/PHP_5_4/Zend/acconfig.h branches/PHP_5_4/Zend/build.mk bran

2011-05-17 Thread Johannes Schlüter
Hi,


On Mon, 2011-05-16 at 00:14 +, Rasmus Lerdorf wrote:
 rasmus   Mon, 16 May 2011 00:14:47 +
 
 Revision: http://svn.php.net/viewvc?view=revisionrevision=311067
 
 Log:
 Get rid of autoconf warnings

looks like this broke something. I'm not really sure what. mysqli tests
now fail massively. For ext/mysqli/tests/mysqli_warning_count.phpt
(randomly picked) gdb shows this:

Breakpoint 1, _zend_bailout (
filename=0xee4c28 php-src/trunk/main/main.c, lineno=1068) at 
php-src/trunk/Zend/zend.c:847
847 if (!EG(bailout)) {
(gdb) bt
#0  _zend_bailout (
filename=0xee4c28 php-src/trunk/main/main.c, lineno=1068) at 
php-src/trunk/Zend/zend.c:847
#1  0x009c7bce in php_error_cb (type=4096, 
error_filename=0xf93fe0 
php-src/trunk/ext/mysqli/tests/mysqli_warning_count.phpt, error_lineno=19, 
format=0xf03aa0 Argument %d passed to %s%s%s() must %s%s, %s%s given, 
args=0xfd7fffdfdc00)
at php-src/trunk/main/main.c:1068
#2  0x0080703f in soap_error_handler (error_num=4096, 
error_filename=0xf93fe0 
php-src/trunk/ext/mysqli/tests/mysqli_warning_count.phpt, error_lineno=19, 
format=0xf03aa0 Argument %d passed to %s%s%s() must %s%s, %s%s given, 
args=0xfd7fffdfdd80)
at php-src/trunk/ext/soap/soap.c:2098
#3  0x00a4df8f in zend_error (type=4096, 
format=0xf03aa0 Argument %d passed to %s%s%s() must %s%s, %s%s given)
at php-src/trunk/Zend/zend.c:1038
#4  0x00a856d8 in zend_verify_arg_error (error_type=4096, 
zf=0x1135d70, arg_num=1, need_msg=0xf03a26 be an instance of , 
need_kind=0xfc6220 mysqli, given_msg=0xefdc78 null, 
given_kind=0xf03a3c )
at php-src/trunk/Zend/zend_execute.c:595
#5  0x00a8a4ec in zend_verify_arg_type (zf=0x1135d70, arg_num=1, 
arg=0x13d54a0, fetch_type=0)
at php-src/trunk/Zend/zend_execute.c:627
[...]

While the current call is

   @mysqli_warning_count()

which should complain about a wrong arg count but it tries to verify the
type of an (non existing) argument. valgrind shows two leaks but no
corruption or such. This worked with svn rev. 311066.

Any idea what part of the change might have caused this?

johannes

 Changed paths:
 D   php/php-src/branches/PHP_5_4/TSRM/acconfig.h
 U   php/php-src/branches/PHP_5_4/TSRM/build.mk
 U   php/php-src/branches/PHP_5_4/TSRM/configure.in
 D   php/php-src/branches/PHP_5_4/Zend/acconfig.h
 U   php/php-src/branches/PHP_5_4/Zend/build.mk
 U   php/php-src/branches/PHP_5_4/Zend/configure.in
 D   php/php-src/branches/PHP_5_4/acconfig.h.in
 U   php/php-src/branches/PHP_5_4/build/build.mk
 U   php/php-src/branches/PHP_5_4/build/build2.mk
 U   php/php-src/branches/PHP_5_4/configure.in
 D   php/php-src/trunk/TSRM/acconfig.h
 U   php/php-src/trunk/TSRM/build.mk
 U   php/php-src/trunk/TSRM/configure.in
 D   php/php-src/trunk/Zend/acconfig.h
 U   php/php-src/trunk/Zend/build.mk
 U   php/php-src/trunk/Zend/configure.in
 D   php/php-src/trunk/acconfig.h.in
 U   php/php-src/trunk/build/build.mk
 U   php/php-src/trunk/build/build2.mk
 U   php/php-src/trunk/configure.in
 U   php/php-src/trunk/main/php_version.h
 
 -- 
 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_4/TSRM/acconfig.h branches/PHP_5_4/TSRM/build.mk branches/PHP_5_4/TSRM/configure.in branches/PHP_5_4/Zend/acconfig.h branches/PHP_5_4/Zend/build.mk bran

2011-05-17 Thread Rasmus Lerdorf

On 05/17/2011 01:18 PM, Johannes Schlüter wrote:

Hi,


On Mon, 2011-05-16 at 00:14 +, Rasmus Lerdorf wrote:

rasmus   Mon, 16 May 2011 00:14:47 +

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

Log:
Get rid of autoconf warnings


looks like this broke something. I'm not really sure what. mysqli tests
now fail massively. For ext/mysqli/tests/mysqli_warning_count.phpt
(randomly picked) gdb shows this:

Breakpoint 1, _zend_bailout (
 filename=0xee4c28 php-src/trunk/main/main.c, lineno=1068) at 
php-src/trunk/Zend/zend.c:847
847 if (!EG(bailout)) {
(gdb) bt
#0  _zend_bailout (
 filename=0xee4c28 php-src/trunk/main/main.c, lineno=1068) at 
php-src/trunk/Zend/zend.c:847
#1  0x009c7bce in php_error_cb (type=4096,
 error_filename=0xf93fe0 
php-src/trunk/ext/mysqli/tests/mysqli_warning_count.phpt, error_lineno=19,
 format=0xf03aa0 Argument %d passed to %s%s%s() must %s%s, %s%s given,
 args=0xfd7fffdfdc00)
 at php-src/trunk/main/main.c:1068


It doesn't seem likely that an autoconf change could have caused this. 
There were no code changes involved in that patch. Have you verified 
that this broke it by isolating this change?


-Rasmus

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



[PHP-CVS] svn: /SVNROOT/ global_avail

2011-05-17 Thread Rasmus Lerdorf
rasmus   Tue, 17 May 2011 20:40:36 +

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

Log:
ext/interbase karma for Marius

Changed paths:
U   SVNROOT/global_avail

Modified: SVNROOT/global_avail
===
--- SVNROOT/global_avail2011-05-17 20:06:25 UTC (rev 311146)
+++ SVNROOT/global_avail2011-05-17 20:40:36 UTC (rev 311147)
@@ -163,7 +163,7 @@
 avail|fmk|php/php-src/*/ext/iisfunc
 avail|veebert,musone,askalski,chagenbu,rjs3|php/php-src/*/ext/imap
 avail|danny,nyenyon,borg73,nobbie|php/php-src/*/ext/informix
-avail|jah,aeschbacher,daniela,ludoo,abies|php/php-src/*/ext/interbase
+avail|jah,aeschbacher,daniela,ludoo,abies,mariuz|php/php-src/*/ext/interbase
 
avail|jamuel,thewitness,lytboris|php/php-src/*/ext/snmp,phpdoc,php/php-src/*/NEWS,php/php-src/*/UPGRADING
 avail|akilov,stoddard,wenz,tjw|php/php-src/*/ext/java
 avail|amitay,cardoe|php/php-src/*/ext/ldap

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/Zend/zend_constants.c trunk/Zend/zend_constants.c

2011-05-17 Thread Scott MacVicar
scottmac Tue, 17 May 2011 22:24:44 +

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

Log:
ZEND_THREAD_SAFE and ZEND_DEBUG_BUILD are not meant to be case insensitive

Changed paths:
U   php/php-src/branches/PHP_5_4/Zend/zend_constants.c
U   php/php-src/trunk/Zend/zend_constants.c

Modified: php/php-src/branches/PHP_5_4/Zend/zend_constants.c
===
--- php/php-src/branches/PHP_5_4/Zend/zend_constants.c  2011-05-17 22:17:16 UTC 
(rev 311163)
+++ php/php-src/branches/PHP_5_4/Zend/zend_constants.c  2011-05-17 22:24:44 UTC 
(rev 311164)
@@ -141,7 +141,7 @@
c.value.type = IS_NULL;
zend_register_constant(c TSRMLS_CC);

-   c.flags = CONST_PERSISTENT;
+   c.flags = CONST_PERSISTENT | CONST_CS;

c.name = zend_strndup(ZEND_STRL(ZEND_THREAD_SAFE));
c.name_len = sizeof(ZEND_THREAD_SAFE);

Modified: php/php-src/trunk/Zend/zend_constants.c
===
--- php/php-src/trunk/Zend/zend_constants.c 2011-05-17 22:17:16 UTC (rev 
311163)
+++ php/php-src/trunk/Zend/zend_constants.c 2011-05-17 22:24:44 UTC (rev 
311164)
@@ -141,7 +141,7 @@
c.value.type = IS_NULL;
zend_register_constant(c TSRMLS_CC);

-   c.flags = CONST_PERSISTENT;
+   c.flags = CONST_PERSISTENT | CONST_CS;

c.name = zend_strndup(ZEND_STRL(ZEND_THREAD_SAFE));
c.name_len = sizeof(ZEND_THREAD_SAFE);

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ UPGRADING ext/simplexml/simplexml.c ext/simplexml/tests/034.phpt ext/simplexml/tests/bug51615.phpt

2011-05-17 Thread Andrew Curioso
acurioso Wed, 18 May 2011 04:43:21 +

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

Log:
Commiting r311138 into the 5.3 branch - fix to SimpleXML get properties hash

Changed paths:
U   php/php-src/branches/PHP_5_4/UPGRADING
U   php/php-src/branches/PHP_5_4/ext/simplexml/simplexml.c
U   php/php-src/branches/PHP_5_4/ext/simplexml/tests/034.phpt
U   php/php-src/branches/PHP_5_4/ext/simplexml/tests/bug51615.phpt

Modified: php/php-src/branches/PHP_5_4/UPGRADING
===
--- php/php-src/branches/PHP_5_4/UPGRADING  2011-05-18 04:02:09 UTC (rev 
311170)
+++ php/php-src/branches/PHP_5_4/UPGRADING  2011-05-18 04:43:21 UTC (rev 
311171)
@@ -170,6 +170,10 @@
 - fclose() closes streams with resource refcount  1; it doesn't merely
   decrement the resource refcount.
 - socket_set_options() and socket_get_options() now support multicast options.
+- Arrays cast from SimpleXMLElement now always contain all nodes instead of
+  just the first matching node.
+- All SimpleXMLElement children are now always printed when using var_dump(),
+  var_export(), and print_r().

 ===
 5. Changes made to existing methods

Modified: php/php-src/branches/PHP_5_4/ext/simplexml/simplexml.c
===
--- php/php-src/branches/PHP_5_4/ext/simplexml/simplexml.c  2011-05-18 
04:02:09 UTC (rev 311170)
+++ php/php-src/branches/PHP_5_4/ext/simplexml/simplexml.c  2011-05-18 
04:43:21 UTC (rev 311171)
@@ -1069,7 +1069,11 @@
xmlAttrPtr   attr;
int  namelen;
int  test;
+   char use_iter;
+   zval*iter_data;

+   use_iter = 0;
+
sxe = php_sxe_fetch_object(object TSRMLS_CC);

if (is_debug) {
@@ -1122,6 +1126,7 @@

GET_NODE(sxe, node);
node = php_sxe_get_first_node(sxe, node TSRMLS_CC);
+
if (node  sxe-iter.type != SXE_ITER_ATTRLIST) {
if (node-type == XML_ATTRIBUTE_NODE) {
MAKE_STD_ZVAL(value);
@@ -1129,7 +1134,17 @@
zend_hash_next_index_insert(rv, value, sizeof(zval *), 
NULL);
node = NULL;
} else if (sxe-iter.type != SXE_ITER_CHILD) {
-   node = node-children;
+
+   if ( !node-children || !node-parent || 
node-children-next || node-children-children || node-parent-children == 
node-parent-last ) {
+   node = node-children;
+   } else {
+   iter_data = sxe-iter.data;
+   sxe-iter.data = NULL;
+
+   node = php_sxe_reset_iterator(sxe, 0 TSRMLS_CC);
+
+   use_iter = 1;
+   }
}

while (node) {
@@ -1161,12 +1176,27 @@

_get_base_node_value(sxe, node, value, 
sxe-iter.nsprefix, sxe-iter.isprefix TSRMLS_CC);

-   sxe_properties_add(rv, name, namelen, value TSRMLS_CC);
+   if ( use_iter ) {
+   zend_hash_next_index_insert(rv, value, 
sizeof(zval *), NULL);
+   } else {
+   sxe_properties_add(rv, name, namelen, value 
TSRMLS_CC);
+   }
 next_iter:
-   node = node-next;
+   if ( use_iter ) {
+   node = php_sxe_iterator_fetch(sxe, node-next, 
0 TSRMLS_CC);
+   } else {
+   node = node-next;
+   }
}
}

+   if ( use_iter ) {
+   if (sxe-iter.data) {
+   zval_ptr_dtor(sxe-iter.data);
+   }
+   sxe-iter.data = iter_data;
+   }
+
return rv;
 }
 /* }}} */

Modified: php/php-src/branches/PHP_5_4/ext/simplexml/tests/034.phpt
===
--- php/php-src/branches/PHP_5_4/ext/simplexml/tests/034.phpt   2011-05-18 
04:02:09 UTC (rev 311170)
+++ php/php-src/branches/PHP_5_4/ext/simplexml/tests/034.phpt   2011-05-18 
04:43:21 UTC (rev 311171)
@@ -1,7 +1,7 @@
 --TEST--
-SimpleXML: array casting bug
---XFAIL--
-Does anyone know why?
+SimpleXML: cast to array
+--FAIL--
+Length of cast array does not match expected length
 --SKIPIF--
 ?php if (!extension_loaded(simplexml)) print skip; ?
 --FILE--

Modified: php/php-src/branches/PHP_5_4/ext/simplexml/tests/bug51615.phpt
===
--- php/php-src/branches/PHP_5_4/ext/simplexml/tests/bug51615.phpt  
2011-05-18 04:02:09 UTC (rev 311170)
+++ php/php-src/branches/PHP_5_4/ext/simplexml/tests/bug51615.phpt  
2011-05-18