[PHP-CVS] com php-src: Revise pgsql tests: ext/pgsql/tests/80_bug32223.phpt ext/pgsql/tests/80_bug32223b.phpt

2013-08-18 Thread Yasuo Ohgaki
Commit:e960eebfea1fccbb4a2f030949249d4d1d198728
Author:Yasuo Ohgaki yohg...@php.net Sun, 18 Aug 2013 18:24:34 
+0900
Parents:   0c4ba514bec77497fe54396b5e5c2b342ac68152
Branches:  master

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

Log:
Revise pgsql tests

Changed paths:
  M  ext/pgsql/tests/80_bug32223.phpt
  M  ext/pgsql/tests/80_bug32223b.phpt


Diff:
diff --git a/ext/pgsql/tests/80_bug32223.phpt b/ext/pgsql/tests/80_bug32223.phpt
index bf76959..07ca7b9 100644
--- a/ext/pgsql/tests/80_bug32223.phpt
+++ b/ext/pgsql/tests/80_bug32223.phpt
@@ -37,7 +37,8 @@ begin
 end;
 ' LANGUAGE plpgsql;);
 
-
+$res = pg_query($dbh, 'SET client_min_messages TO NOTICE;');
+var_dump($res);
 $res = pg_query($dbh, 'SELECT test_notice()');
 var_dump($res);
 $row = pg_fetch_row($res, 0);
@@ -54,6 +55,7 @@ pg_close($dbh);
 ===DONE===
 --EXPECTF--
 resource(%d) of type (pgsql result)
+resource(%d) of type (pgsql result)
 array(1) {
   [0]=
   string(1) f
diff --git a/ext/pgsql/tests/80_bug32223b.phpt 
b/ext/pgsql/tests/80_bug32223b.phpt
index 6e1a073..5291659 100644
--- a/ext/pgsql/tests/80_bug32223b.phpt
+++ b/ext/pgsql/tests/80_bug32223b.phpt
@@ -37,6 +37,9 @@ begin
 end;
 ' LANGUAGE plpgsql;);
 
+$res = pg_query($dbh, 'SET client_min_messages TO NOTICE;');
+var_dump($res);
+
 function tester() {
 $res = pg_query(dbh, 'SELECT test_notice()');
 $row = pg_fetch_row($res, 0);
@@ -54,6 +57,8 @@ pg_close(dbh);
 ?
 ===DONE===
 --EXPECTF--
+resource(%d) of type (pgsql result)
+resource(%d) of type (pgsql result)
 array(1) {
   [0]=
   string(1) f


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/standard/basic_functions.c

2013-08-18 Thread Stanislav Malyshev
Commit:03b2603ce043a9592ebcafe9adf5630421b36cd2
Author:Stanislav Malyshev s...@php.net Sun, 18 Aug 2013 13:47:00 
-0700
Parents:   e960eebfea1fccbb4a2f030949249d4d1d198728 
144eab0889c086bc31226bad98be9ce04d231f8a
Branches:  master

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

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  code related typo fixes
  Fix duplicated 5.5.2 NEWS in my tree

Changed paths:
  MM  ext/standard/basic_functions.c


Diff:



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



[PHP-CVS] com php-src: code related typo fixes: ext/odbc/config.m4 ext/standard/basic_functions.c ext/standard/math.c ext/xml/compat.c ext/xml/expat_compat.h

2013-08-18 Thread Stanislav Malyshev
Commit:144eab0889c086bc31226bad98be9ce04d231f8a
Author:Veres Lajos vla...@gmail.com Wed, 24 Jul 2013 00:54:16 
+0100
Committer: Stanislav Malyshev s...@php.net  Sun, 18 Aug 2013 13:46:32 
-0700
Parents:   803045e3c74c3360d141b4aec26f6a1507e7508c
Branches:  PHP-5.5 master

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

Log:
code related typo fixes

Changed paths:
  M  ext/odbc/config.m4
  M  ext/standard/basic_functions.c
  M  ext/standard/math.c
  M  ext/xml/compat.c
  M  ext/xml/expat_compat.h


Diff:
diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4
index 14ec97b..b463d34 100644
--- a/ext/odbc/config.m4
+++ b/ext/odbc/config.m4
@@ -359,7 +359,7 @@ PHP_ARG_WITH(custom-odbc,,
 ODBC_LIBS=$CUSTOM_ODBC_LIBS
 ODBC_TYPE=custom-odbc
 AC_DEFINE(HAVE_CODBC,1,[ ])
-AC_MSG_RESULT([$ext_ouput])
+AC_MSG_RESULT([$ext_output])
   fi
 fi
 
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 9c91404..eca7d90 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -1789,8 +1789,8 @@ ZEND_END_ARG_INFO()
 ZEND_BEGIN_ARG_INFO_EX(arginfo_number_format, 0, 0, 1)
ZEND_ARG_INFO(0, number)
ZEND_ARG_INFO(0, num_decimal_places)
-   ZEND_ARG_INFO(0, dec_seperator)
-   ZEND_ARG_INFO(0, thousands_seperator)
+   ZEND_ARG_INFO(0, dec_separator)
+   ZEND_ARG_INFO(0, thousands_separator)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO(arginfo_fmod, 0)
diff --git a/ext/standard/math.c b/ext/standard/math.c
index be2d655..f6b3d54 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -1226,7 +1226,7 @@ PHPAPI char *_php_math_number_format_ex(double d, int 
dec, char *dec_point,
 }
 /* }}} */
 
-/* {{{ proto string number_format(float number [, int num_decimal_places [, 
string dec_seperator, string thousands_seperator]])
+/* {{{ proto string number_format(float number [, int num_decimal_places [, 
string dec_separator, string thousands_separator]])
Formats a number with grouped thousands */
 PHP_FUNCTION(number_format)
 {
diff --git a/ext/xml/compat.c b/ext/xml/compat.c
index fbebb63..902365e 100644
--- a/ext/xml/compat.c
+++ b/ext/xml/compat.c
@@ -39,7 +39,7 @@ _qualify_namespace(XML_Parser parser, const xmlChar *name, 
const xmlChar *URI, x
if (URI) {
/* Use libxml functions otherwise its memory 
deallocation is screwed up */
*qualified = xmlStrdup(URI);
-   *qualified = xmlStrncat(*qualified, 
parser-_ns_seperator, 1);
+   *qualified = xmlStrncat(*qualified, 
parser-_ns_separator, 1);
*qualified = xmlStrncat(*qualified, name, 
xmlStrlen(name));
} else {
*qualified = xmlStrdup(name);
@@ -469,7 +469,7 @@ XML_ParserCreate_MM(const XML_Char *encoding, const 
XML_Memory_Handling_Suite *m
parser = (XML_Parser) emalloc(sizeof(struct _XML_Parser));
memset(parser, 0, sizeof(struct _XML_Parser));
parser-use_namespace = 0;
-   parser-_ns_seperator = NULL;
+   parser-_ns_separator = NULL;
 
parser-parser = xmlCreatePushParserCtxt((xmlSAXHandlerPtr) 
php_xml_compat_handlers, (void *) parser, NULL, 0, NULL);
if (parser-parser == NULL) {
@@ -491,7 +491,7 @@ XML_ParserCreate_MM(const XML_Char *encoding, const 
XML_Memory_Handling_Suite *m
if (sep != NULL) {
parser-use_namespace = 1;
parser-parser-sax2 = 1;
-   parser-_ns_seperator = xmlStrdup(sep);
+   parser-_ns_separator = xmlStrdup(sep);
} else {
/* Reset flag as XML_SAX2_MAGIC is needed for 
xmlCreatePushParserCtxt 
so must be set in the handlers */
@@ -770,8 +770,8 @@ PHPAPI void
 XML_ParserFree(XML_Parser parser)
 {
if (parser-use_namespace) {
-   if (parser-_ns_seperator) {
-   xmlFree(parser-_ns_seperator);
+   if (parser-_ns_separator) {
+   xmlFree(parser-_ns_separator);
}
}
if (parser-parser-myDoc) {
diff --git a/ext/xml/expat_compat.h b/ext/xml/expat_compat.h
index 424785f..1c94e45 100644
--- a/ext/xml/expat_compat.h
+++ b/ext/xml/expat_compat.h
@@ -38,6 +38,9 @@
 #include libxml/tree.h
 #include libxml/hash.h
 
+/* For compatibility with the misspelled version. */
+#define _ns_seperator _ns_separator
+
 typedef xmlChar XML_Char;
 
 typedef void (*XML_StartElementHandler)(void *, const XML_Char *, const 
XML_Char **);
@@ -61,7 +64,7 @@ typedef struct _XML_Memory_Handling_Suite {
 typedef struct _XML_Parser {
int use_namespace;
 
-   xmlChar *_ns_seperator;
+   xmlChar *_ns_separator;
 
void *user;
xmlParserCtxtPtr parser;


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



[PHP-CVS] com php-src: Fixbug: phpize --clean will delete include/*.h: scripts/phpize.in

2013-08-18 Thread Stanislav Malyshev
Commit:19312fa8f6ef28340f314d7848d3e7de99f95189
Author:Tianfeng mikan.te...@gmail.com Mon, 12 Aug 2013 13:55:23 
+0800
Parents:   3ada3aaea65bdfa11d6a70040ea7c63f7020d0ef
Branches:  master

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

Log:
Fixbug: phpize --clean will delete include/*.h

Changed paths:
  M  scripts/phpize.in


Diff:
diff --git a/scripts/phpize.in b/scripts/phpize.in
index 43cd8d3..b86925e 100644
--- a/scripts/phpize.in
+++ b/scripts/phpize.in
@@ -11,7 +11,7 @@ SED=@SED@
 
 FILES_BUILD=mkdep.awk scan_makefile_in.awk shtool libtool.m4
 FILES=acinclude.m4 Makefile.global config.sub config.guess ltmain.sh 
run-tests*.php
-CLEAN_FILES=$FILES *.o *.lo *.la .deps .libs/ build/ include/ modules/ 
install-sh \
+CLEAN_FILES=$FILES *.o *.lo *.la .deps .libs/ build/ modules/ install-sh \
mkinstalldirs missing config.nice config.sub config.guess configure 
configure.in \
aclocal.m4 config.h config.h.in conftest* ltmain.sh libtool 
config.cache autom4te.cache/ \
config.log config.status Makefile Makefile.fragments Makefile.objects 
confdefs.h \


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



[PHP-CVS] com php-src: Fixbug: phpize --clean will delete include/*.h: scripts/phpize.in

2013-08-18 Thread Stanislav Malyshev
Commit:4a0e87e497ae77ef9e98ba7906f3c659c3ef289d
Author:Tianfeng mikan.te...@gmail.com Mon, 12 Aug 2013 13:55:23 
+0800
Committer: Stanislav Malyshev s...@php.net  Sun, 18 Aug 2013 13:52:20 
-0700
Parents:   cb539b3e96dd0fc8df9564a60b66d8dea4439bc1
Branches:  PHP-5.4 PHP-5.5 master

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

Log:
Fixbug: phpize --clean will delete include/*.h

Changed paths:
  M  scripts/phpize.in


Diff:
diff --git a/scripts/phpize.in b/scripts/phpize.in
index 43cd8d3..b86925e 100644
--- a/scripts/phpize.in
+++ b/scripts/phpize.in
@@ -11,7 +11,7 @@ SED=@SED@
 
 FILES_BUILD=mkdep.awk scan_makefile_in.awk shtool libtool.m4
 FILES=acinclude.m4 Makefile.global config.sub config.guess ltmain.sh 
run-tests*.php
-CLEAN_FILES=$FILES *.o *.lo *.la .deps .libs/ build/ include/ modules/ 
install-sh \
+CLEAN_FILES=$FILES *.o *.lo *.la .deps .libs/ build/ modules/ install-sh \
mkinstalldirs missing config.nice config.sub config.guess configure 
configure.in \
aclocal.m4 config.h config.h.in conftest* ltmain.sh libtool 
config.cache autom4te.cache/ \
config.log config.status Makefile Makefile.fragments Makefile.objects 
confdefs.h \


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



[PHP-CVS] com php-src: Add -P option to use the current binary: run-tests.php

2013-08-18 Thread Stanislav Malyshev
Commit:3da2fb335db1f8ed64967164e090688ba0eb793d
Author:Stanislav Malyshev s...@php.net Sun, 18 Aug 2013 14:08:03 
-0700
Parents:   ac2d2b9b72d568fdd3d548d8fb22a85182a910a9
Branches:  PHP-5.4 PHP-5.5 master

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

Log:
Add -P option to use the current binary

Changed paths:
  M  run-tests.php


Diff:
diff --git a/run-tests.php b/run-tests.php
index 830dcd7..935f821 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -597,6 +597,15 @@ if (isset($argc)  $argc  1) {
putenv(TEST_PHP_EXECUTABLE=$php);
$environment['TEST_PHP_EXECUTABLE'] = 
$php;
break;
+   case 'P':
+   if(constant('PHP_BINARY')) {
+   $php = PHP_BINARY;
+   } else {
+   break;
+   }
+   putenv(TEST_PHP_EXECUTABLE=$php);
+   $environment['TEST_PHP_EXECUTABLE'] = 
$php;
+   break;
case 'q':
putenv('NO_INTERACTION=1');
break;
@@ -686,6 +695,8 @@ Options:
 
 -p phpSpecify PHP executable to run.
 
+-P  Use PHP_BINARY as PHP executable to run.
+
 -q  Quiet, no user interaction (same as environment 
NO_INTERACTION).
 
 -s file   Write output to file.


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



[PHP-CVS] com php-src: Create test to the extension xmlrpc: ext/xmlrpc/tests/003.phpt ext/xmlrpc/tests/004.phpt

2013-08-18 Thread Stanislav Malyshev
Commit:ac2d2b9b72d568fdd3d548d8fb22a85182a910a9
Author:root root@precise64.(none) Sun, 18 Aug 2013 18:44:52 +
Committer: Stanislav Malyshev s...@php.net  Sun, 18 Aug 2013 13:59:39 
-0700
Parents:   4a0e87e497ae77ef9e98ba7906f3c659c3ef289d
Branches:  PHP-5.4 PHP-5.5 master

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

Log:
Create test to the extension xmlrpc

Changed paths:
  A  ext/xmlrpc/tests/003.phpt
  A  ext/xmlrpc/tests/004.phpt


Diff:
diff --git a/ext/xmlrpc/tests/003.phpt b/ext/xmlrpc/tests/003.phpt
new file mode 100644
index 000..3d6796d
--- /dev/null
+++ b/ext/xmlrpc/tests/003.phpt
@@ -0,0 +1,109 @@
+--TEST--
+xmlrpc_encode() Simple test encode array
+--SKIPIF--
+?php if (!extension_loaded(xmlrpc)) print skip; ?
+--FILE--
+?php
+
+$params = array(
+   one = red,
+   two = blue,
+   three = green
+);
+
+$response = xmlrpc_encode($params);
+echo $response;
+
+$params = array(
+   red,
+   blue,
+   green
+);
+
+$response = xmlrpc_encode($params);
+echo $response;
+
+$params = array(
+   0 = red,
+   1 = blue,
+   3 = green
+);
+
+$response = xmlrpc_encode($params);
+echo $response;
+
+--EXPECT--
+?xml version=1.0 encoding=utf-8?
+params
+param
+ value
+  struct
+   member
+nameone/name
+value
+ stringred/string
+/value
+   /member
+   member
+nametwo/name
+value
+ stringblue/string
+/value
+   /member
+   member
+namethree/name
+value
+ stringgreen/string
+/value
+   /member
+  /struct
+ /value
+/param
+/params
+?xml version=1.0 encoding=utf-8?
+params
+param
+ value
+  array
+   data
+value
+ stringred/string
+/value
+value
+ stringblue/string
+/value
+value
+ stringgreen/string
+/value
+   /data
+  /array
+ /value
+/param
+/params
+?xml version=1.0 encoding=utf-8?
+params
+param
+ value
+  struct
+   member
+name0/name
+value
+ stringred/string
+/value
+   /member
+   member
+name1/name
+value
+ stringblue/string
+/value
+   /member
+   member
+name3/name
+value
+ stringgreen/string
+/value
+   /member
+  /struct
+ /value
+/param
+/params
\ No newline at end of file
diff --git a/ext/xmlrpc/tests/004.phpt b/ext/xmlrpc/tests/004.phpt
new file mode 100644
index 000..04f3ef3
--- /dev/null
+++ b/ext/xmlrpc/tests/004.phpt
@@ -0,0 +1,19 @@
+--TEST--
+xmlrpc_encode() Simple test encode int
+--SKIPIF--
+?php if (!extension_loaded(xmlrpc)) print skip; ?
+--FILE--
+?php
+
+$response = xmlrpc_encode(1);
+echo $response;
+
+--EXPECT--
+?xml version=1.0 encoding=utf-8?
+params
+param
+ value
+  int1/int
+ /value
+/param
+/params
\ No newline at end of file


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: run-tests.php

2013-08-18 Thread Stanislav Malyshev
Commit:2ee7e122a7aa03aaadb38ebccb9b5c2b07b2a1b3
Author:Stanislav Malyshev s...@php.net Sun, 18 Aug 2013 14:09:19 
-0700
Parents:   296a434d528b1c4c61e11b93890e605d0793612c 
3da2fb335db1f8ed64967164e090688ba0eb793d
Branches:  PHP-5.5 master

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

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

* PHP-5.4:
  Add -P option to use the current binary
  Create test to the extension xmlrpc

Changed paths:
  MM  run-tests.php


Diff:



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



[PHP-CVS] com php-src: Create test to the extension xmlrpc: ext/xmlrpc/tests/003.phpt ext/xmlrpc/tests/004.phpt

2013-08-18 Thread Stanislav Malyshev
Commit:acda3dab6c236ac47165ba5de7d512fd57d6f26d
Author:root root@precise64.(none) Sun, 18 Aug 2013 18:44:52 +
Parents:   e960eebfea1fccbb4a2f030949249d4d1d198728
Branches:  master

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

Log:
Create test to the extension xmlrpc

Changed paths:
  A  ext/xmlrpc/tests/003.phpt
  A  ext/xmlrpc/tests/004.phpt


Diff:
diff --git a/ext/xmlrpc/tests/003.phpt b/ext/xmlrpc/tests/003.phpt
new file mode 100644
index 000..3d6796d
--- /dev/null
+++ b/ext/xmlrpc/tests/003.phpt
@@ -0,0 +1,109 @@
+--TEST--
+xmlrpc_encode() Simple test encode array
+--SKIPIF--
+?php if (!extension_loaded(xmlrpc)) print skip; ?
+--FILE--
+?php
+
+$params = array(
+   one = red,
+   two = blue,
+   three = green
+);
+
+$response = xmlrpc_encode($params);
+echo $response;
+
+$params = array(
+   red,
+   blue,
+   green
+);
+
+$response = xmlrpc_encode($params);
+echo $response;
+
+$params = array(
+   0 = red,
+   1 = blue,
+   3 = green
+);
+
+$response = xmlrpc_encode($params);
+echo $response;
+
+--EXPECT--
+?xml version=1.0 encoding=utf-8?
+params
+param
+ value
+  struct
+   member
+nameone/name
+value
+ stringred/string
+/value
+   /member
+   member
+nametwo/name
+value
+ stringblue/string
+/value
+   /member
+   member
+namethree/name
+value
+ stringgreen/string
+/value
+   /member
+  /struct
+ /value
+/param
+/params
+?xml version=1.0 encoding=utf-8?
+params
+param
+ value
+  array
+   data
+value
+ stringred/string
+/value
+value
+ stringblue/string
+/value
+value
+ stringgreen/string
+/value
+   /data
+  /array
+ /value
+/param
+/params
+?xml version=1.0 encoding=utf-8?
+params
+param
+ value
+  struct
+   member
+name0/name
+value
+ stringred/string
+/value
+   /member
+   member
+name1/name
+value
+ stringblue/string
+/value
+   /member
+   member
+name3/name
+value
+ stringgreen/string
+/value
+   /member
+  /struct
+ /value
+/param
+/params
\ No newline at end of file
diff --git a/ext/xmlrpc/tests/004.phpt b/ext/xmlrpc/tests/004.phpt
new file mode 100644
index 000..04f3ef3
--- /dev/null
+++ b/ext/xmlrpc/tests/004.phpt
@@ -0,0 +1,19 @@
+--TEST--
+xmlrpc_encode() Simple test encode int
+--SKIPIF--
+?php if (!extension_loaded(xmlrpc)) print skip; ?
+--FILE--
+?php
+
+$response = xmlrpc_encode(1);
+echo $response;
+
+--EXPECT--
+?xml version=1.0 encoding=utf-8?
+params
+param
+ value
+  int1/int
+ /value
+/param
+/params
\ No newline at end of file


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



[PHP-CVS] com php-src: Merge branch 'pull-request/411': ext/odbc/config.m4

2013-08-18 Thread Stanislav Malyshev
Commit:88452629957fb196c81fc8ca7d0b057301ec182a
Author:Stanislav Malyshev s...@php.net Sun, 18 Aug 2013 14:15:53 
-0700
Parents:   958ee39fc7bd3f036b5bd6548f216590dc24a9e2 
7e7a8f00c42e0432f3b823388b499b41dacaa037
Branches:  master

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

Log:
Merge branch 'pull-request/411'

* pull-request/411:
  Use pkg-config to detect iodbc

Changed paths:
  MM  ext/odbc/config.m4


Diff:



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



[PHP-CVS] com php-src: Use pkg-config to detect iodbc: ext/odbc/config.m4

2013-08-18 Thread Stanislav Malyshev
Commit:a3fa25e857ca5d714e72b25c7f6a2999d1df8a6b
Author:Ole Markus With olemar...@olemarkus.org Sat, 17 Aug 2013 
14:22:11 +0200
Committer: Stanislav Malyshev s...@php.net  Sun, 18 Aug 2013 14:16:17 
-0700
Parents:   3da2fb335db1f8ed64967164e090688ba0eb793d
Branches:  PHP-5.4 PHP-5.5 master

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

Log:
Use pkg-config to detect iodbc

Changed paths:
  M  ext/odbc/config.m4


Diff:
diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4
index 5be3288..a1201db 100644
--- a/ext/odbc/config.m4
+++ b/ext/odbc/config.m4
@@ -370,18 +370,33 @@ PHP_ARG_WITH(iodbc,,
 
   if test $PHP_IODBC != no; then
 AC_MSG_CHECKING(for iODBC support)
-if test $PHP_IODBC = yes; then
-  PHP_IODBC=/usr/local
+if test -z $PKG_CONFIG; then
+  AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+fi 
+if test -x $PKG_CONFIG  $PKG_CONFIG --exists libiodbc ; then
+  PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
+  ODBC_TYPE=iodbc
+  ODBC_INCLUDE=`$PKG_CONFIG --cflags-only-I libiodbc`
+  ODBC_LFLAGS=`$PKG_CONFIG --libs-only-L libiodbc`
+  ODBC_LIBS=`$PKG_CONFIG --libs-only-l libiodbc`
+  PHP_EVAL_INCLINE($ODBC_INCLUDE)
+  AC_DEFINE(HAVE_IODBC,1,[ ])
+  AC_DEFINE(HAVE_ODBC2,1,[ ])
+  AC_MSG_RESULT([$ext_output])
+else
+  if test $PHP_IODBC = yes; then
+PHP_IODBC=/usr/local
+  fi
+  PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
+  PHP_ADD_INCLUDE($PHP_IODBC/include, 1)
+  ODBC_TYPE=iodbc
+  ODBC_INCLUDE=-I$PHP_IODBC/include
+  ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR
+  ODBC_LIBS=-liodbc
+  AC_DEFINE(HAVE_IODBC,1,[ ])
+  AC_DEFINE(HAVE_ODBC2,1,[ ])
+  AC_MSG_RESULT([$ext_output])
 fi
-PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
-PHP_ADD_INCLUDE($PHP_IODBC/include, 1)
-ODBC_TYPE=iodbc
-ODBC_INCLUDE=-I$PHP_IODBC/include
-ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR
-ODBC_LIBS=-liodbc
-AC_DEFINE(HAVE_IODBC,1,[ ])
-AC_DEFINE(HAVE_ODBC2,1,[ ])
-AC_MSG_RESULT([$ext_output])
   fi
 fi


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



[PHP-CVS] com php-src: Use pkg-config to detect iodbc: ext/odbc/config.m4

2013-08-18 Thread Stanislav Malyshev
Commit:7e7a8f00c42e0432f3b823388b499b41dacaa037
Author:Ole Markus With olemar...@olemarkus.org Sat, 17 Aug 2013 
14:22:11 +0200
Parents:   0c4ba514bec77497fe54396b5e5c2b342ac68152
Branches:  master

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

Log:
Use pkg-config to detect iodbc

Changed paths:
  M  ext/odbc/config.m4


Diff:
diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4
index 14ec97b..4a2371d 100644
--- a/ext/odbc/config.m4
+++ b/ext/odbc/config.m4
@@ -365,22 +365,37 @@ fi
 
 if test -z $ODBC_TYPE; then
 PHP_ARG_WITH(iodbc,,
-[  --with-iodbc[=DIR]Include iODBC support [/usr/local]])
+[  --with-iodbc[=DIR]Include iODBC support])
 
   if test $PHP_IODBC != no; then
 AC_MSG_CHECKING(for iODBC support)
-if test $PHP_IODBC = yes; then
-  PHP_IODBC=/usr/local
+if test -z $PKG_CONFIG; then
+  AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+fi 
+if test -x $PKG_CONFIG  $PKG_CONFIG --exists libiodbc ; then
+  PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
+  ODBC_TYPE=iodbc
+  ODBC_INCLUDE=`$PKG_CONFIG --cflags-only-I libiodbc`
+  ODBC_LFLAGS=`$PKG_CONFIG --libs-only-L libiodbc`
+  ODBC_LIBS=`$PKG_CONFIG --libs-only-l libiodbc`
+  PHP_EVAL_INCLINE($ODBC_INCLUDE)
+  AC_DEFINE(HAVE_IODBC,1,[ ])
+  AC_DEFINE(HAVE_ODBC2,1,[ ])
+  AC_MSG_RESULT([$ext_output])
+else
+  if test $PHP_IODBC = yes; then
+PHP_IODBC=/usr/local
+  fi
+  PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
+  PHP_ADD_INCLUDE($PHP_IODBC/include, 1)
+  ODBC_TYPE=iodbc
+  ODBC_INCLUDE=-I$PHP_IODBC/include
+  ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR
+  ODBC_LIBS=-liodbc
+  AC_DEFINE(HAVE_IODBC,1,[ ])
+  AC_DEFINE(HAVE_ODBC2,1,[ ])
+  AC_MSG_RESULT([$ext_output])
 fi
-PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
-PHP_ADD_INCLUDE($PHP_IODBC/include, 1)
-ODBC_TYPE=iodbc
-ODBC_INCLUDE=-I$PHP_IODBC/include
-ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR
-ODBC_LIBS=-liodbc
-AC_DEFINE(HAVE_IODBC,1,[ ])
-AC_DEFINE(HAVE_ODBC2,1,[ ])
-AC_MSG_RESULT([$ext_output])
   fi
 fi


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: ext/odbc/config.m4

2013-08-18 Thread Stanislav Malyshev
Commit:1794291ebe02d7a1c5387c1d404a9022925f5b47
Author:Stanislav Malyshev s...@php.net Sun, 18 Aug 2013 14:16:24 
-0700
Parents:   2ee7e122a7aa03aaadb38ebccb9b5c2b07b2a1b3 
a3fa25e857ca5d714e72b25c7f6a2999d1df8a6b
Branches:  PHP-5.5 master

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

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

* PHP-5.4:
  Use pkg-config to detect iodbc

Changed paths:
  MM  ext/odbc/config.m4


Diff:



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



[PHP-CVS] com php-src: new for fix #65225: NEWS

2013-08-18 Thread Stanislav Malyshev
Commit:0154db1c5fcfd0c4030a0aefb2861dc8386b4a1c
Author:Stanislav Malyshev s...@php.net Sun, 18 Aug 2013 14:20:17 
-0700
Parents:   98d29d20a1e5d2d8bc1699fbc61efde95f5ce87f
Branches:  PHP-5.4 PHP-5.5 master

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

Log:
new for fix #65225

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

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index 5db6792..0d0a053 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ PHP 
   NEWS
   . Fixed bug #65304 (Use of max int in array_sum). (Laruence)
   . Fixed bug #65291 (get_defined_constants() causes PHP to crash in a very
 limited case). (Arpad)
+  . Fixed bug #65225 (PHP_BINARY incorrectly set). (Patrick Allaert)
   . Improved fix for bug #63186 (compile failure on netbsd). (Matteo)
   . Fixed bug #62692 (PHP fails to build with DTrace). (Chris Jones, Kris Van 
Hees)
   . Fixed bug #61345 (CGI mode - make install don't work). (Michael Heimpold)


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



[PHP-CVS] com php-src: Fixed #65225: PHP_BINARY incorrectly set: main/main.c

2013-08-18 Thread Stanislav Malyshev
Commit:98d29d20a1e5d2d8bc1699fbc61efde95f5ce87f
Author:Patrick Allaert p...@ez.no Tue, 9 Jul 2013 15:05:10 +0200
Committer: Stanislav Malyshev s...@php.net  Sun, 18 Aug 2013 14:18:33 
-0700
Parents:   a3fa25e857ca5d714e72b25c7f6a2999d1df8a6b
Branches:  PHP-5.4 PHP-5.5 master

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

Log:
Fixed #65225: PHP_BINARY incorrectly set

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

Changed paths:
  M  main/main.c


Diff:
diff --git a/main/main.c b/main/main.c
index b639ab1..1fd82c8 100644
--- a/main/main.c
+++ b/main/main.c
@@ -115,6 +115,10 @@
 #endif
 /* }}} */
 
+#ifndef S_ISREG
+#define S_ISREG(mode) (((mode)  S_IFMT) == S_IFREG)
+#endif
+
 PHPAPI int (*php_register_internal_extensions_func)(TSRMLS_D) = 
php_register_internal_extensions;
 
 #ifndef ZTS
@@ -276,13 +280,14 @@ static void php_binary_init(TSRMLS_D)
if ((envpath = getenv(PATH)) != NULL) {
char *search_dir, search_path[MAXPATHLEN];
char *last = NULL;
+   struct stat s;
 
path = estrdup(envpath);
search_dir = php_strtok_r(path, :, last);
 
while (search_dir) {
snprintf(search_path, MAXPATHLEN, 
%s/%s, search_dir, sapi_module.executable_location);
-   if (VCWD_REALPATH(search_path, 
binary_location)  !VCWD_ACCESS(binary_location, X_OK)) {
+   if (VCWD_REALPATH(search_path, 
binary_location)  !VCWD_ACCESS(binary_location, X_OK)  
VCWD_STAT(binary_location, s) == 0  S_ISREG(s.st_mode)) {
found = 1;
break;
}


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: NEWS main/main.c

2013-08-18 Thread Stanislav Malyshev
Commit:bf0c6f2858226d787bb8c7abe9d24a391df53d7a
Author:Stanislav Malyshev s...@php.net Sun, 18 Aug 2013 14:20:38 
-0700
Parents:   1794291ebe02d7a1c5387c1d404a9022925f5b47 
0154db1c5fcfd0c4030a0aefb2861dc8386b4a1c
Branches:  PHP-5.5 master

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

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

* PHP-5.4:
  new for fix #65225
  Fixed #65225: PHP_BINARY incorrectly set

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

Changed paths:
  MM  NEWS
  MM  main/main.c


Diff:
diff --cc NEWS
index 914b2a4,0d0a053..cc469dd
--- a/NEWS
+++ b/NEWS
@@@ -1,11 -1,6 +1,13 @@@
  PHP
NEWS
  
|||
 -?? ??? 2013, PHP 5.4.19
 +?? ??? 2013, PHP 5.5.3
 +
 +- Core:
++  . Fixed bug #65225 (PHP_BINARY incorrectly set). (Patrick Allaert)
 +  . Fixed bug #62692 (PHP fails to build with DTrace). (Chris Jones, Kris Van 
Hees)
 +
++
 +15 Aug 2013, PHP 5.5.2
  
  - Core:
. Fixed bug #65372 (Segfault in gc_zval_possible_root when return reference


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



[PHP-CVS] com php-src: Merge branch 'pull-request/381': main/main.c

2013-08-18 Thread Stanislav Malyshev
Commit:4fbce676bd505f92be771ba1ce106b67a3317aff
Author:Stanislav Malyshev s...@php.net Sun, 18 Aug 2013 14:20:46 
-0700
Parents:   756ce65b92de3be5841cd7e0a4cdef1173bc31dd 
b980e4fedc945dd0a45d73349716f6ab18a97635
Branches:  master

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

Log:
Merge branch 'pull-request/381'

* pull-request/381:
  Fixed #65225: PHP_BINARY incorrectly set

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

Changed paths:
  MM  main/main.c


Diff:



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



[PHP-CVS] com php-src: Fixed #65225: PHP_BINARY incorrectly set: main/main.c

2013-08-18 Thread Stanislav Malyshev
Commit:b980e4fedc945dd0a45d73349716f6ab18a97635
Author:Patrick Allaert p...@ez.no Tue, 9 Jul 2013 15:05:10 +0200
Parents:   3cdd09a76eb21789bb10d02581b21fc9403e39a1
Branches:  master

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

Log:
Fixed #65225: PHP_BINARY incorrectly set

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

Changed paths:
  M  main/main.c


Diff:
diff --git a/main/main.c b/main/main.c
index de794ac..d11ef84 100644
--- a/main/main.c
+++ b/main/main.c
@@ -114,6 +114,10 @@
 #endif
 /* }}} */
 
+#ifndef S_ISREG
+#define S_ISREG(mode) (((mode)  S_IFMT) == S_IFREG)
+#endif
+
 PHPAPI int (*php_register_internal_extensions_func)(TSRMLS_D) = 
php_register_internal_extensions;
 
 #ifndef ZTS
@@ -275,13 +279,14 @@ static void php_binary_init(TSRMLS_D)
if ((envpath = getenv(PATH)) != NULL) {
char *search_dir, search_path[MAXPATHLEN];
char *last = NULL;
+   struct stat s;
 
path = estrdup(envpath);
search_dir = php_strtok_r(path, :, last);
 
while (search_dir) {
snprintf(search_path, MAXPATHLEN, 
%s/%s, search_dir, sapi_module.executable_location);
-   if (VCWD_REALPATH(search_path, 
binary_location)  !VCWD_ACCESS(binary_location, X_OK)) {
+   if (VCWD_REALPATH(search_path, 
binary_location)  !VCWD_ACCESS(binary_location, X_OK)  
VCWD_STAT(binary_location, s) == 0  S_ISREG(s.st_mode)) {
found = 1;
break;
}


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



[PHP-CVS] com php-src: add CVE-2011-4718: NEWS

2013-08-18 Thread Stanislav Malyshev
Commit:b33a1a139771b677ddc0858d66111667361d478c
Author:Stanislav Malyshev s...@php.net Sun, 18 Aug 2013 14:42:06 
-0700
Parents:   bf0c6f2858226d787bb8c7abe9d24a391df53d7a
Branches:  PHP-5.5 master

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

Log:
add CVE-2011-4718

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index cc469dd..948dcdc 100644
--- a/NEWS
+++ b/NEWS
@@ -54,7 +54,7 @@ PHP   
 NEWS
 - Sessions:
   . Implemented strict sessions RFC (https://wiki.php.net/rfc/strict_sessions)
 which protects against session fixation attacks and session collisions.
-(Yasuo Ohgaki)
+(CVE-2011-4718). (Yasuo Ohgaki)
   . Fixed possible buffer overflow under Windows. Note: Not a security fix.
 (Yasuo)
   . Changed session.auto_start to PHP_INI_PERDIR. (Yasuo)


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



[PHP-CVS] com php-src: https://bugs.php.net/bug.php?id=64979: Zend/tests/generators/generator_closure_static_variable.phpt

2013-08-18 Thread Stanislav Malyshev
Commit:47678c06c65be8cd844b1d6ee61f7645e0f9bfcf
Author:Marcel Araujo ceceld...@gmail.com Fri, 21 Jun 2013 
18:25:51 -0300
Committer: Stanislav Malyshev s...@php.net  Sun, 18 Aug 2013 15:09:43 
-0700
Parents:   b33a1a139771b677ddc0858d66111667361d478c
Branches:  PHP-5.5 master

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

Log:
https://bugs.php.net/bug.php?id=64979

Changed paths:
  A  Zend/tests/generators/generator_closure_static_variable.phpt


Diff:
diff --git a/Zend/tests/generators/generator_closure_static_variable.phpt 
b/Zend/tests/generators/generator_closure_static_variable.phpt
new file mode 100644
index 000..01d7240
--- /dev/null
+++ b/Zend/tests/generators/generator_closure_static_variable.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Closures with static variables can be generators
+--FILE--
+?php
+
+function new_closure_gen() {
+   return function() { 
+   static $foo = 0; 
+   yield ++$foo; 
+   };
+}
+
+$closure1 = new_closure_gen();
+$closure2 = new_closure_gen();
+
+$gen1 = $closure1();
+$gen2 = $closure1();
+$gen3 = $closure2();
+
+foreach (array($gen1, $gen2, $gen3) as $gen) {
+  foreach ($gen as $val) {
+print $val\n;
+  }
+}
+
+?
+--EXPECT--
+int(1)
+int(2)
+int(1)
\ No newline at end of file


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



[PHP-CVS] com php-src: Use in preg_replace_callback() using variables by reference and test for bug #64979: Zend/tests/bug64979.phpt Zend/tests/closure_047.phpt Zend/tests/closure_048.phpt Zend/tests/

2013-08-18 Thread Stanislav Malyshev
Commit:265224778bc340b16087e60a52b4ca4a3acb5c01
Author:Marcel Araujo ceceld...@gmail.com Fri, 21 Jun 2013 
23:08:15 -0300
Committer: Stanislav Malyshev s...@php.net  Sun, 18 Aug 2013 15:18:30 
-0700
Parents:   47678c06c65be8cd844b1d6ee61f7645e0f9bfcf
Branches:  PHP-5.5 master

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

Log:
Use in preg_replace_callback() using variables by reference and test for bug 
#64979

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

Changed paths:
  A  Zend/tests/bug64979.phpt
  A  Zend/tests/closure_047.phpt
  A  Zend/tests/closure_048.phpt
  D  Zend/tests/generators/generator_closure_static_variable.phpt


Diff:
diff --git a/Zend/tests/bug64979.phpt b/Zend/tests/bug64979.phpt
new file mode 100644
index 000..09de555
--- /dev/null
+++ b/Zend/tests/bug64979.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #64578 (Closures with static variables can be generators)
+--XFAIL--
+Bug #64979 not fixed yet.
+--FILE--
+?php
+
+function new_closure_gen() {
+   return function() { 
+   static $foo = 0; 
+   yield ++$foo; 
+   };
+}
+
+$closure1 = new_closure_gen();
+$closure2 = new_closure_gen();
+
+$gen1 = $closure1();
+$gen2 = $closure1();
+$gen3 = $closure2();
+
+foreach (array($gen1, $gen2, $gen3) as $gen) {
+  foreach ($gen as $val) {
+print $val\n;
+  }
+}
+
+?
+--EXPECT--
+int(1)
+int(2)
+int(1)
diff --git a/Zend/tests/closure_047.phpt b/Zend/tests/closure_047.phpt
new file mode 100644
index 000..2377bef
--- /dev/null
+++ b/Zend/tests/closure_047.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Closure 047: Use in preg_replace_callback() using variables by reference
+--FILE--
+?php
+
+function replace_variables($text, $params) {
+   
+   preg_replace_callback( '/(\?)/', function($matches) use ($params, 
$text) {
+   
+   $text = preg_replace( '/(\?)/', array_shift( $params ), $text, 
1 );
+   
+   }, $text );
+   
+   return $text;
+}
+
+echo replace_variables('a=?', array('0')) . \n;
+echo replace_variables('a=?, b=?', array('0', '1')) . \n;
+echo replace_variables('a=?, b=?, c=?', array('0', '1', '2')) . \n;
+echo Done\n;
+?
+--EXPECT--
+a=0
+a=0, b=1
+a=0, b=1, c=2
+Done
diff --git a/Zend/tests/closure_048.phpt b/Zend/tests/closure_048.phpt
new file mode 100644
index 000..40f2e2f
--- /dev/null
+++ b/Zend/tests/closure_048.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Closure 048: Use in preg_replace_callback() using variables by reference
+--FILE--
+?php
+
+function replace_variables($text, $params) {
+   
+   $c = function($matches) use ($params, $text) {
+   $text = preg_replace( '/(\?)/', array_shift( $params ), $text, 
1 );
+   };
+
+   preg_replace_callback( '/(\?)/', $c, $text );
+   
+   return $text;
+}
+
+echo replace_variables('a=?', array('0')) . \n;
+echo replace_variables('a=?, b=?', array('0', '1')) . \n;
+echo replace_variables('a=?, b=?, c=?', array('0', '1', '2')) . \n;
+echo Done\n;
+?
+--EXPECT--
+a=0
+a=0, b=1
+a=0, b=1, c=2
+Done
diff --git a/Zend/tests/generators/generator_closure_static_variable.phpt 
b/Zend/tests/generators/generator_closure_static_variable.phpt
deleted file mode 100644
index 01d7240..000
--- a/Zend/tests/generators/generator_closure_static_variable.phpt
+++ /dev/null
@@ -1,30 +0,0 @@
---TEST--
-Closures with static variables can be generators
---FILE--
-?php
-
-function new_closure_gen() {
-   return function() { 
-   static $foo = 0; 
-   yield ++$foo; 
-   };
-}
-
-$closure1 = new_closure_gen();
-$closure2 = new_closure_gen();
-
-$gen1 = $closure1();
-$gen2 = $closure1();
-$gen3 = $closure2();
-
-foreach (array($gen1, $gen2, $gen3) as $gen) {
-  foreach ($gen as $val) {
-print $val\n;
-  }
-}
-
-?
---EXPECT--
-int(1)
-int(2)
-int(1)
\ No newline at end of file


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.5': ext/openssl/openssl.c

2013-08-18 Thread Stanislav Malyshev
Commit:12c2a8a5eb97049ec0f68369dfe8516ffde87bf3
Author:Stanislav Malyshev s...@php.net Sun, 18 Aug 2013 16:55:03 
-0700
Parents:   42214b647408ff8730ac8bb023be9023a8c97f90 
bd29ff7c38a14a0273329180c0e9f4d7a12e0d74
Branches:  master

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

Log:
Merge branch 'PHP-5.5'

* PHP-5.5:
  Fix for php bug #64802 includes test case

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

Changed paths:
  MM  ext/openssl/openssl.c


Diff:



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



[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: NEWS ext/openssl/openssl.c

2013-08-18 Thread Stanislav Malyshev
Commit:bd29ff7c38a14a0273329180c0e9f4d7a12e0d74
Author:Stanislav Malyshev s...@php.net Sun, 18 Aug 2013 15:44:40 
-0700
Parents:   265224778bc340b16087e60a52b4ca4a3acb5c01 
9973658a44090cbf67cb8a1d93f00d46a4330356
Branches:  PHP-5.5 master

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

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

* PHP-5.4:
  Fix for php bug #64802 includes test case

Conflicts:
ext/openssl/openssl.c

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

Changed paths:
  MM  NEWS
  MM  ext/openssl/openssl.c


Diff:
diff --cc NEWS
index 948dcdc,1e4e0fb..71aca12
--- a/NEWS
+++ b/NEWS
@@@ -1,13 -1,6 +1,16 @@@
  PHP
NEWS
  
|||
 -?? ??? 2013, PHP 5.4.19
 +?? ??? 2013, PHP 5.5.3
 +
 +- Core:
 +  . Fixed bug #65225 (PHP_BINARY incorrectly set). (Patrick Allaert)
 +  . Fixed bug #62692 (PHP fails to build with DTrace). (Chris Jones, Kris Van 
Hees)
 +
++- Openssl:
++  . Fixed bug #64802 (openssl_x509_parse fails to parse subject properly in
++some cases). (Mark Jones)
 +
 +15 Aug 2013, PHP 5.5.2
  
  - Core:
. Fixed bug #65372 (Segfault in gc_zval_possible_root when return reference


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



[PHP-CVS] com php-src: Fix for php bug #64802 includes test case: NEWS ext/openssl/openssl.c ext/openssl/tests/bug64802.pem ext/openssl/tests/bug64802.phpt

2013-08-18 Thread Stanislav Malyshev
Commit:9973658a44090cbf67cb8a1d93f00d46a4330356
Author:Mark Jones m...@zedwood.com Wed, 14 Aug 2013 11:26:45 -0600
Committer: Stanislav Malyshev s...@php.net  Sun, 18 Aug 2013 15:42:37 
-0700
Parents:   0154db1c5fcfd0c4030a0aefb2861dc8386b4a1c
Branches:  PHP-5.4 PHP-5.5 master

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

Log:
Fix for php bug #64802 includes test case

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

Changed paths:
  M  NEWS
  M  ext/openssl/openssl.c
  A  ext/openssl/tests/bug64802.pem
  A  ext/openssl/tests/bug64802.phpt


Diff:
diff --git a/NEWS b/NEWS
index 0d0a053..1e4e0fb 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,10 @@ PHP  
  NEWS
   . Fixed bug #61268 (--enable-dtrace leads make to clobber
 Zend/zend_dtrace.d) (Chris Jones)
 
+- Openssl:
+  . Fixed bug #64802 (openssl_x509_parse fails to parse subject properly in 
+some cases). (Mark Jones)
+
 - Session:
   . Fixed bug #62129 (rfc1867 crashes php even though turned off). (gxd305 at
 gmail dot com)
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 68be86f..fc10e31 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -561,6 +561,7 @@ static EVP_PKEY * php_openssl_generate_private_key(struct 
php_x509_request * req
 
 static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int 
shortname TSRMLS_DC) /* {{{ */
 {
+   zval **data;
zval *subitem, *subentries;
int i, j = -1, last = -1, obj_cnt = 0;
char *sname;
@@ -592,39 +593,27 @@ static void add_assoc_name_entry(zval * val, char * key, 
X509_NAME * name, int s
sname = (char *) OBJ_nid2ln(nid);
}
 
-   MAKE_STD_ZVAL(subentries);
-   array_init(subentries);
+   str = X509_NAME_ENTRY_get_data(ne);
+   if (ASN1_STRING_type(str) != V_ASN1_UTF8STRING) {
+   to_add_len = ASN1_STRING_to_UTF8(to_add, str);
+   } else {
+   to_add = ASN1_STRING_data(str);
+   to_add_len = ASN1_STRING_length(str);
+   }
 
-   last = -1;
-   for (;;) {
-   j = X509_NAME_get_index_by_OBJ(name, obj, last);
-   if (j  0) {
-   if (last != -1) break;
-   } else {
-   obj_cnt++;
-   ne  = X509_NAME_get_entry(name, j);
-   str = X509_NAME_ENTRY_get_data(ne);
-   if (ASN1_STRING_type(str) != V_ASN1_UTF8STRING) 
{
-   to_add_len = 
ASN1_STRING_to_UTF8(to_add, str);
-   if (to_add_len != -1) {
-   
add_next_index_stringl(subentries, (char *)to_add, to_add_len, 1);
-   }
-   } else {
-   to_add = ASN1_STRING_data(str);
-   to_add_len = ASN1_STRING_length(str);
+   if (to_add_len != -1) {
+   if (zend_hash_find(Z_ARRVAL_P(subitem), sname, 
strlen(sname)+1, (void**)data) == SUCCESS) {
+   if (Z_TYPE_PP(data) == IS_ARRAY) {
+   subentries = *data;
add_next_index_stringl(subentries, 
(char *)to_add, to_add_len, 1);
+   } else if (Z_TYPE_PP(data) == IS_STRING) {
+   MAKE_STD_ZVAL(subentries);
+   array_init(subentries);
+   add_next_index_stringl(subentries, 
Z_STRVAL_PP(data), Z_STRLEN_PP(data), 1);
+   add_next_index_stringl(subentries, 
(char *)to_add, to_add_len, 1);
+   zend_hash_update(Z_ARRVAL_P(subitem), 
sname, strlen(sname)+1, subentries, sizeof(zval*), NULL);
}
-   }
-   last = j;
-   }
-   i = last;
-
-   if (obj_cnt  1) {
-   add_assoc_zval_ex(subitem, sname, strlen(sname) + 1, 
subentries);
-   } else {
-   zval_dtor(subentries);
-   FREE_ZVAL(subentries);
-   if (obj_cnt  str  to_add_len  -1) {
+   } else {
add_assoc_stringl(subitem, sname, (char 
*)to_add, to_add_len, 1);
}
}
diff --git a/ext/openssl/tests/bug64802.pem b/ext/openssl/tests/bug64802.pem
new file mode 100644
index 000..187cda3
--- /dev/null
+++ 

[PHP-CVS] com php-src: Fix bug #65470 Segmentation fault in zend_error() with --enable-dtrace: NEWS Zend/zend.c

2013-08-18 Thread Stanislav Malyshev
Commit:14f5732096575f3c4ff0438e6650238370cb465c
Author:Stanislav Malyshev s...@php.net Sun, 18 Aug 2013 17:20:56 
-0700
Parents:   9973658a44090cbf67cb8a1d93f00d46a4330356
Branches:  PHP-5.4 PHP-5.5 master

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

Log:
Fix bug #65470  Segmentation fault in zend_error() with --enable-dtrace

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

Changed paths:
  M  NEWS
  M  Zend/zend.c


Diff:
diff --git a/NEWS b/NEWS
index 1e4e0fb..ff79a29 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PHP 
   NEWS
 ?? ??? 2013, PHP 5.4.19
 
 - Core:
+  . Fixed bug #65470 (Segmentation fault in zend_error() with 
+--enable-dtrace). (Chris Jones)
   . Fixed bug #65372 (Segfault in gc_zval_possible_root when return reference
 fails). (Laruence)
   . Fixed bug #65304 (Use of max int in array_sum). (Laruence)
diff --git a/Zend/zend.c b/Zend/zend.c
index 8560308..1629228 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -1091,17 +1091,19 @@ ZEND_API void zend_error(int type, const char *format, 
...) /* {{{ */
error_filename = Unknown;
}
 
-   va_start(args, format);
-
 #ifdef HAVE_DTRACE
if(DTRACE_ERROR_ENABLED()) {
char *dtrace_error_buffer;
+   va_start(args, format);
zend_vspprintf(dtrace_error_buffer, 0, format, args);
DTRACE_ERROR(dtrace_error_buffer, (char *)error_filename, 
error_lineno);
efree(dtrace_error_buffer);
+   va_end(args);
}
 #endif /* HAVE_DTRACE */
 
+   va_start(args, format);
+
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)
|| !(EG(user_error_handler_error_reporting)  type)


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



[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: NEWS Zend/zend.c

2013-08-18 Thread Stanislav Malyshev
Commit:bcf785fb6667194ff70ef6f903189a495c15eb40
Author:Stanislav Malyshev s...@php.net Sun, 18 Aug 2013 17:22:50 
-0700
Parents:   bd29ff7c38a14a0273329180c0e9f4d7a12e0d74 
14f5732096575f3c4ff0438e6650238370cb465c
Branches:  PHP-5.5 master

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

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

* PHP-5.4:
  Fix bug #65470Segmentation fault in zend_error() with --enable-dtrace

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

Changed paths:
  MM  NEWS
  MM  Zend/zend.c


Diff:
diff --cc NEWS
index 71aca12,ff79a29..d5d2cda
--- a/NEWS
+++ b/NEWS
@@@ -1,23 -1,12 +1,25 @@@
  PHP
NEWS
  
|||
 -?? ??? 2013, PHP 5.4.19
 +?? ??? 2013, PHP 5.5.3
  
  - Core:
 -  . Fixed bug #65470 (Segmentation fault in zend_error() with 
++  . Fixed bug #65470 (Segmentation fault in zend_error() with
+ --enable-dtrace). (Chris Jones)
 +  . Fixed bug #65225 (PHP_BINARY incorrectly set). (Patrick Allaert)
 +  . Fixed bug #62692 (PHP fails to build with DTrace). (Chris Jones, Kris Van 
Hees)
 +
 +- Openssl:
 +  . Fixed bug #64802 (openssl_x509_parse fails to parse subject properly in
 +some cases). (Mark Jones)
 +
 +15 Aug 2013, PHP 5.5.2
 +
 +- Core:
. Fixed bug #65372 (Segfault in gc_zval_possible_root when return reference
  fails). (Laruence)
 +  . Fixed value of FILTER_SANITIZE_FULL_SPECIAL_CHARS constant (previously was
 +erroneously set to FILTER_SANITIZE_SPECIAL_CHARS value). (Andrey
 +avp200681 gmail com).
. Fixed bug #65304 (Use of max int in array_sum). (Laruence)
. Fixed bug #65291 (get_defined_constants() causes PHP to crash in a very
  limited case). (Arpad)


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