[PHP-CVS] com php-src: Fix bug 61671 ext\spl\tests\fileobject_003.phpt fails: ext/spl/spl_directory.c ext/spl/tests/SplFileObject_fflush_basic_001.phpt ext/spl/tests/SplFileObject_ftruncate_error_001.

2012-04-19 Thread Anatoliy Belsky
Commit:adfb4c62b76ef241978814e10cae70498f52ea29
Author:Anatoliy Belsky a...@php.net Thu, 19 Apr 2012 11:20:16 
+0200
Parents:   4650b2164b641ba3fd9d733e8cc82e386aa98772
Branches:  PHP-5.3 PHP-5.4 master

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

Log:
Fix bug 61671 ext\spl\tests\fileobject_003.phpt fails

The solution was already introduced in 5.4 by Etienne Kneuss and
Pierre but wasn't merged back into 5.3 . SplFileObject should
not be used with directories. So just putting together all the
necessary pieces from 5.4

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

Changed paths:
  M  ext/spl/spl_directory.c
  M  ext/spl/tests/SplFileObject_fflush_basic_001.phpt
  M  ext/spl/tests/SplFileObject_ftruncate_error_001.phpt
  M  ext/spl/tests/fileobject_003.phpt


Diff:
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 04da4e6..aaa256d 100755
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -271,7 +271,18 @@ static void spl_filesystem_dir_open(spl_filesystem_object* 
intern, char *path TS
 
 static int spl_filesystem_file_open(spl_filesystem_object *intern, int 
use_include_path, int silent TSRMLS_DC) /* {{{ */
 {
+   zval  tmp;
+
intern-type = SPL_FS_FILE;
+
+   php_stat(intern-file_name, intern-file_name_len, FS_IS_DIR, tmp 
TSRMLS_CC);
+   if (Z_LVAL(tmp)) {
+   intern-u.file.open_mode = NULL;
+   intern-file_name = NULL;
+   zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, 
Cannot use SplFileObject with directories);
+   return FAILURE;
+   }
+
intern-u.file.context = 
php_stream_context_from_zval(intern-u.file.zcontext, 0);
intern-u.file.stream = php_stream_open_wrapper_ex(intern-file_name, 
intern-u.file.open_mode, (use_include_path ? USE_PATH : 0) | ENFORCE_SAFE_MODE 
| REPORT_ERRORS, NULL, intern-u.file.context);
 
diff --git a/ext/spl/tests/SplFileObject_fflush_basic_001.phpt 
b/ext/spl/tests/SplFileObject_fflush_basic_001.phpt
index baab156..2d8a9c8 100644
--- a/ext/spl/tests/SplFileObject_fflush_basic_001.phpt
+++ b/ext/spl/tests/SplFileObject_fflush_basic_001.phpt
@@ -17,9 +17,12 @@ class VariableStream {
 var $varname;
 
 function stream_open($path, $mode, $options, $opened_path)
-{  
+{
 return true;
 }
+
+function url_stat() {
+}
 }
 stream_wrapper_register(SPLtest, VariableStream);
 $ftruncate_test = ;
diff --git a/ext/spl/tests/SplFileObject_ftruncate_error_001.phpt 
b/ext/spl/tests/SplFileObject_ftruncate_error_001.phpt
index 90b27ec..a2eef60 100644
--- a/ext/spl/tests/SplFileObject_ftruncate_error_001.phpt
+++ b/ext/spl/tests/SplFileObject_ftruncate_error_001.phpt
@@ -12,6 +12,9 @@ class VariableStream {
 {
 return true;
 }
+
+function url_stat() {
+}
 }
 stream_wrapper_register(SPLtest, VariableStream);
 $ftruncate_test = ;
diff --git a/ext/spl/tests/fileobject_003.phpt 
b/ext/spl/tests/fileobject_003.phpt
index 6679673..6cc650b 100755
--- a/ext/spl/tests/fileobject_003.phpt
+++ b/ext/spl/tests/fileobject_003.phpt
@@ -18,20 +18,27 @@ function test($name, $lc, $lp)
var_dump($o == $c);
var_dump($o-getPathname() == $c-getPathname());

-   $f = new SplFileObject($name);
-   var_dump($name);
-   var_dump($f-getPathName());
-   $l = substr($f-getPathName(), -1);
-   var_dump($l != '/'  $l != '\\'  $l == $lc);
-   var_dump($f-getFileName());
-   $l = substr($f-getFileName(), -1);
-   var_dump($l != '/'  $l != '\\'  $l == $lc);
-   var_dump($f-getPath());
-   $l = substr($f-getPath(), -1);
-   var_dump($l != '/'  $l != '\\'  $l == $lp);
-
-   $fo = $o-openFile();
-   var_dump($fo-getPathName(), $fo-getFileName(), $fo-getPath());
+   try {
+   $f = new SplFileObject($name);
+   var_dump($name);
+   var_dump($f-getPathName());
+   $l = substr($f-getPathName(), -1);
+   var_dump($l != '/'  $l != '\\'  $l == $lc);
+   var_dump($f-getFileName());
+   $l = substr($f-getFileName(), -1);
+   var_dump($l != '/'  $l != '\\'  $l == $lc);
+   var_dump($f-getPath());
+   $l = substr($f-getPath(), -1);
+   var_dump($l != '/'  $l != '\\'  $l == $lp);
+   } catch (LogicException $e) {
+   echo LogicException: .$e-getMessage().\n;
+   }
+   try {
+   $fo = $o-openFile();
+   var_dump($fo-getPathName(), $fo-getFileName(), 
$fo-getPath());
+   } catch (LogicException $e) {
+   echo LogicException: .$e-getMessage().\n;
+   }
 }
 
 test(dirname(__FILE__) . '/' . 'fileobject_001a.txt', 't', 
substr(dirname(__FILE__),-1));
@@ -84,16 +91,8 @@ object(SplFileInfo)#%d (2) {
 bool(false)
 bool(true)
 bool(true)
-%s(%d) %stests/
-string(%d) %stests
-bool(true)
-string(5) tests
-bool(true)
-string(%d) 

[PHP-CVS] com php-src: Commit generated file: ext/pdo/pdo_sql_parser.c

2012-04-19 Thread Johannes Schlüter
Commit:c06ec6bde43a114af3bd84e986827839de1b1e4b
Author:Johannes Schlüter johan...@php.net Thu, 19 Apr 2012 
12:47:09 +0200
Parents:   1b78aef426a8f413ddd70854eb3fd5fbc95ef675
Branches:  PHP-5.3 PHP-5.4 master

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

Log:
Commit generated file

Changed paths:
  M  ext/pdo/pdo_sql_parser.c

diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c
index ed8af84..0267d15 100644
--- a/ext/pdo/pdo_sql_parser.c
+++ b/ext/pdo/pdo_sql_parser.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Wed Apr 18 22:30:06 2012 */
+/* Generated by re2c 0.13.5 on Thu Apr 19 12:42:11 2012 */
 #line 1 ext/pdo/pdo_sql_parser.re
 /*
   +--+
@@ -34,12 +34,12 @@
 
 #define YYCTYPE unsigned char
 #define YYCURSORcursor
-#define YYLIMIT cursor
+#define YYLIMIT s-end
 #define YYMARKERs-ptr
-#define YYFILL(n)
+#define YYFILL(n)  { RET(PDO_PARSER_EOI); }
 
 typedef struct Scanner {
-   char*ptr, *cur, *tok;
+   char*ptr, *cur, *tok, *end;
 } Scanner;
 
 static int scan(Scanner *s) 
@@ -47,7 +47,7 @@ static int scan(Scanner *s)
char *cursor = s-cur;
 
s-tok = cursor;
-   #line 56 ext/pdo/pdo_sql_parser.re
+   #line 55 ext/pdo/pdo_sql_parser.re
 
 

@@ -59,29 +59,35 @@ static int scan(Scanner *s)
if ((YYLIMIT - YYCURSOR)  2) YYFILL(2);
yych = *YYCURSOR;
switch (yych) {
-   case 0x00:  goto yy13;
-   case '':   goto yy2;
-   case '\'':  goto yy4;
-   case '-':   goto yy10;
-   case '/':   goto yy8;
-   case ':':   goto yy5;
-   case '?':   goto yy6;
-   default:goto yy11;
+   case 0x00:  goto yy2;
+   case '':   goto yy3;
+   case '\'':  goto yy5;
+   case '-':   goto yy11;
+   case '/':   goto yy9;
+   case ':':   goto yy6;
+   case '?':   goto yy7;
+   default:goto yy12;
}
 yy2:
+   YYCURSOR = YYMARKER;
+   switch (yyaccept) {
+   case 0: goto yy4;
+   case 1: goto yy10;
+   }
+yy3:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if (yych = 0x01) goto yy43;
-yy3:
-#line 64 ext/pdo/pdo_sql_parser.re
-   { SKIP_ONE(PDO_PARSER_TEXT); }
-#line 79 ext/pdo/pdo_sql_parser.c
+   if (yych = 0x01) goto yy41;
 yy4:
+#line 63 ext/pdo/pdo_sql_parser.re
+   { SKIP_ONE(PDO_PARSER_TEXT); }
+#line 85 ext/pdo/pdo_sql_parser.c
+yy5:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
-   if (yych = 0x00) goto yy3;
-   goto yy37;
-yy5:
+   if (yych = 0x00) goto yy4;
+   goto yy36;
+yy6:
yych = *++YYCURSOR;
switch (yych) {
case '0':
@@ -146,57 +152,52 @@ yy5:
case 'w':
case 'x':
case 'y':
-   case 'z':   goto yy33;
+   case 'z':   goto yy32;
case ':':
-   case '?':   goto yy30;
-   default:goto yy3;
+   case '?':   goto yy29;
+   default:goto yy4;
}
-yy6:
+yy7:
++YYCURSOR;
switch ((yych = *YYCURSOR)) {
case ':':
-   case '?':   goto yy30;
-   default:goto yy7;
+   case '?':   goto yy29;
+   default:goto yy8;
}
-yy7:
-#line 63 ext/pdo/pdo_sql_parser.re
-   { RET(PDO_PARSER_BIND_POS); }
-#line 165 ext/pdo/pdo_sql_parser.c
 yy8:
+#line 62 ext/pdo/pdo_sql_parser.re
+   { RET(PDO_PARSER_BIND_POS); }
+#line 171 ext/pdo/pdo_sql_parser.c
+yy9:
++YYCURSOR;
switch ((yych = *YYCURSOR)) {
-   case '*':   goto yy20;
-   default:goto yy12;
+   case '*':   goto yy19;
+   default:goto yy13;
}
-yy9:
-#line 66 ext/pdo/pdo_sql_parser.re
-   { RET(PDO_PARSER_TEXT); }
-#line 175 ext/pdo/pdo_sql_parser.c
 yy10:
+#line 65 ext/pdo/pdo_sql_parser.re
+   { RET(PDO_PARSER_TEXT); }
+#line 181 ext/pdo/pdo_sql_parser.c
+yy11:
yych = *++YYCURSOR;
switch (yych) {
-   case '-':   goto yy15;
-   default:goto yy12;
+   case '-':   goto yy14;
+   default:goto yy13;
}
-yy11:
+yy12:
++YYCURSOR;
if (YYLIMIT = YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy12:
+yy13:
switch (yych) {
case 0x00:
case '':
case '\'':
case ':':
-   case '?':   goto yy9;
-   default:goto yy11;
+   case '?':   goto yy10;
+   default:goto yy12;
}
-yy13:
-   ++YYCURSOR;
-#line 67 ext/pdo/pdo_sql_parser.re
-   { RET(PDO_PARSER_EOI); }
-#line 199 ext/pdo/pdo_sql_parser.c
-yy15:
+yy14:
++YYCURSOR;
if (YYLIMIT = YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
@@ -205,25 +206,25 @@ yy15:
case '':
case '\'':
 

[PHP-CVS] com php-src: Fix bug #61755 parsing bug can lead to access violations: NEWS ext/pdo/pdo_sql_parser.re ext/pdo_mysql/tests/bug_61755.phpt

2012-04-19 Thread Johannes Schlüter
Commit:1b78aef426a8f413ddd70854eb3fd5fbc95ef675
Author:Johannes Schlüter johan...@php.net Thu, 19 Apr 2012 
12:46:02 +0200
Parents:   adfb4c62b76ef241978814e10cae70498f52ea29
Branches:  PHP-5.3 PHP-5.4 master

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

Log:
Fix bug #61755 parsing bug can lead to access violations

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

Changed paths:
  M  NEWS
  M  ext/pdo/pdo_sql_parser.re
  A  ext/pdo_mysql/tests/bug_61755.phpt


Diff:
diff --git a/NEWS b/NEWS
index 0cabd97..5fe7245 100644
--- a/NEWS
+++ b/NEWS
@@ -6,7 +6,10 @@ PHP
NEWS
   . Fixed bug #61537 (json_encode() incorrectly truncates/discards
 information). (Adam)
 
-?? ??? 2012, PHP 5.3.11
+- PDO:
+  . Fixed bug #61755 (A parsing bug in the prepared statements can lead to
+access violations). (Johannes)
+
 - Iconv extension:
   . Fixed a bug that iconv extension fails to link to the correct library
 when another extension makes use of a library that links to the iconv
diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re
index 8becef9..88f9400 100644
--- a/ext/pdo/pdo_sql_parser.re
+++ b/ext/pdo/pdo_sql_parser.re
@@ -32,12 +32,12 @@
 
 #define YYCTYPE unsigned char
 #define YYCURSORcursor
-#define YYLIMIT cursor
+#define YYLIMIT s-end
 #define YYMARKERs-ptr
-#define YYFILL(n)
+#define YYFILL(n)  { RET(PDO_PARSER_EOI); }
 
 typedef struct Scanner {
-   char*ptr, *cur, *tok;
+   char*ptr, *cur, *tok, *end;
 } Scanner;
 
 static int scan(Scanner *s) 
@@ -51,7 +51,6 @@ static int scan(Scanner *s)
COMMENTS= (/*([^*]+|[*]+[^/*])*[*]**/|--[^\r\n]*);
SPECIALS= [:?'];
MULTICHAR   = [:?];
-   EOF = [\000];
ANYNOEOF= [\001-\377];
*/
 
@@ -64,7 +63,6 @@ static int scan(Scanner *s)
SPECIALS
{ SKIP_ONE(PDO_PARSER_TEXT); }
COMMENTS
{ RET(PDO_PARSER_TEXT); }
(ANYNOEOF\SPECIALS)+{ 
RET(PDO_PARSER_TEXT); }
-   EOF 
{ RET(PDO_PARSER_EOI); }
*/  
 }
 
@@ -94,6 +92,7 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, 
int inquery_len,
 
ptr = *outquery;
s.cur = inquery;
+   s.end = inquery + inquery_len + 1;
 
/* phase 1: look for args */
while((t = scan(s)) != PDO_PARSER_EOI) {
diff --git a/ext/pdo_mysql/tests/bug_61755.phpt 
b/ext/pdo_mysql/tests/bug_61755.phpt
new file mode 100644
index 000..1d2b968
--- /dev/null
+++ b/ext/pdo_mysql/tests/bug_61755.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Bug #61755 (A parsing bug in the prepared statements can lead to access 
violations)
+--SKIPIF--
+?php
+if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not 
loaded');
+require dirname(__FILE__) . '/config.inc';
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+PDOTest::skip();
+?
+--FILE--
+?php
+require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
+$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
+
+$db-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+echo NULL-Byte before first placeholder:\n;
+$s = $db-prepare(SELECT \a\0b\, ?);
+$s-bindValue(1,c);
+$s-execute();
+$r = $s-fetch();
+echo Length of item 0: .strlen($r[0])., Value of item 1: .$r[1].\n;
+
+echo \nOpen comment:\n;
+try {
+$s = $db-prepare(SELECT /*);
+$s-execute();
+} catch (Exception $e) {
+echo Error code: .$e-getCode().\n;
+}
+
+echo \ndone!\n;
+?
+--EXPECTF--
+NULL-Byte before first placeholder:
+Length of item 0: 3, Value of item 1: c
+
+Open comment:
+Error code: 42000
+
+done!


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



[PHP-CVS] svn: /php/phpruntests/trunk/tests/ rtTextTest.php

2012-04-19 Thread Zoe Slattery
zoe  Thu, 19 Apr 2012 11:11:55 +

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

Log:
remove redundant PHPUnit code

Changed paths:
U   php/phpruntests/trunk/tests/rtTextTest.php

Modified: php/phpruntests/trunk/tests/rtTextTest.php
===
--- php/phpruntests/trunk/tests/rtTextTest.php  2012-04-19 10:02:50 UTC (rev 
325331)
+++ php/phpruntests/trunk/tests/rtTextTest.php  2012-04-19 11:11:55 UTC (rev 
325332)
@@ -1,6 +1,5 @@
 ?php

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

 class rtHelpTextTest extends PHPUnit_Framework_TestCase

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

[PHP-CVS] svn: /php/phpruntests/trunk/code-samples/ Iterator.php

2012-04-19 Thread Zoe Slattery
zoe  Thu, 19 Apr 2012 11:30:29 +

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

Log:
remove public

Changed paths:
U   php/phpruntests/trunk/code-samples/Iterator.php

Modified: php/phpruntests/trunk/code-samples/Iterator.php
===
--- php/phpruntests/trunk/code-samples/Iterator.php 2012-04-19 11:25:39 UTC 
(rev 325333)
+++ php/phpruntests/trunk/code-samples/Iterator.php 2012-04-19 11:30:29 UTC 
(rev 325334)
@@ -1,6 +1,6 @@
 ?php

-  public function getTests($aDirectory)
+  function getTests($aDirectory)
   {
 $result = array();


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

[PHP-CVS] svn: /php/phpruntests/trunk/tests/configuration/ rtCommandLineOptionsTest.php

2012-04-19 Thread Zoe Slattery
zoe  Thu, 19 Apr 2012 11:37:50 +

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

Log:
I do not know how this ever worked, unless we planned to make keep-all have 
some options?

Changed paths:
U   php/phpruntests/trunk/tests/configuration/rtCommandLineOptionsTest.php

Modified: php/phpruntests/trunk/tests/configuration/rtCommandLineOptionsTest.php
===
--- php/phpruntests/trunk/tests/configuration/rtCommandLineOptionsTest.php  
2012-04-19 11:30:29 UTC (rev 325334)
+++ php/phpruntests/trunk/tests/configuration/rtCommandLineOptionsTest.php  
2012-04-19 11:37:50 UTC (rev 325335)
@@ -41,11 +41,10 @@
 public function testLongOptionWithArg()
 {
 $clo = new rtCommandLineOptions();
-$clo-parse(array('run-tests.php', '--keep-all', 'the-keepall-arg'));
+$clo-parse(array('run-tests.php', '--mopts', 
'the-memoryoptions-arg'));

-$this-assertTrue($clo-hasOption('keep-all'));
-var_dump($clo-getOption('keep-all'));
-$this-assertEquals('the-keepall-arg', $clo-getOption('keep-all'));
+$this-assertTrue($clo-hasOption('mopts'));
+$this-assertEquals('the-memoryoptions-arg', $clo-getOption('mopts'));
 }

 public function testNonexistingOption()

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

[PHP-CVS] com php-src: fix RCs: README.RELEASE_PROCESS

2012-04-19 Thread Stanislav Malyshev
Commit:2b8e9430c89b7c3b711127a58b6904d52569d06a
Author:Stanislav Malyshev s...@php.net Thu, 19 Apr 2012 00:25:44 
-0700
Parents:   701332ce301f9ea9fa4d40eb945de0c1880dad8a
Branches:  PHP-5.4

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

Log:
fix RCs

Changed paths:
  M  README.RELEASE_PROCESS


Diff:
diff --git a/README.RELEASE_PROCESS b/README.RELEASE_PROCESS
index 6a6da62..a8e36c2 100644
--- a/README.RELEASE_PROCESS
+++ b/README.RELEASE_PROCESS
@@ -58,12 +58,12 @@ Do not use abbreviations for alpha and beta.
 5. Commit these changes to the branch with ``git commit -a``.
 
 6. Tag the repository with the version, e.g.: 
-``git tag -u YOURKEYID PHP-5.4.2-RC2``
+``git tag -u YOURKEYID php-5.4.2RC2``
 
 7. Push the changes to the main repo:
 ``git push --tags origin HEAD``
 
-8. run: ``./makedist 5.4.2-RC2``, this will export the tree, create configure
+8. run: ``./makedist 5.4.2RC2``, this will export the tree, create configure
 and build two tarballs (one gz and one bz2).
 
 9. Copy those two tarballs to www.php.net, in your homedir there should be a


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



[PHP-CVS] com php-src: Update to 5.4.2-dev: main/php_version.h

2012-04-19 Thread Stanislav Malyshev
Commit:701332ce301f9ea9fa4d40eb945de0c1880dad8a
Author:Christopher Jones s...@php.net Mon, 16 Apr 2012 13:43:41 
-0700
Committer: Stanislav Malyshev s...@php.net  Thu, 19 Apr 2012 10:45:21 
-0700
Parents:   36a556546737c5218cd649c9a5ae8b1a10aa2d49
Branches:  PHP-5.4

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

Log:
Update to 5.4.2-dev

After PHP-5.4.1 was branched, the PHP-5.4 branch should have been 5.4.2-dev.

Changed paths:
  M  main/php_version.h


Diff:
diff --git a/main/php_version.h b/main/php_version.h
index b4c616f..13478d1 100644
--- a/main/php_version.h
+++ b/main/php_version.h
@@ -2,7 +2,7 @@
 /* edit configure.in to change version number */
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 4
-#define PHP_RELEASE_VERSION 1
-#define PHP_EXTRA_VERSION RC1-dev
-#define PHP_VERSION 5.4.1RC1-dev
-#define PHP_VERSION_ID 50401
+#define PHP_RELEASE_VERSION 2
+#define PHP_EXTRA_VERSION -dev
+#define PHP_VERSION 5.4.2-dev
+#define PHP_VERSION_ID 50402


--
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/61' into PHP-5.3: ext/intl/tests/bug59597_32.phpt ext/intl/tests/bug59597_64.phpt

2012-04-19 Thread Stanislav Malyshev
Commit:5cbf2d678505b6e4ab89bcfe04695e5da9dd2c0e
Author:Stanislav Malyshev s...@php.net Thu, 19 Apr 2012 11:05:17 
-0700
Parents:   c06ec6bde43a114af3bd84e986827839de1b1e4b 
2827324c7cc4f3a28ad66cd2a3724165abac4941
Branches:  PHP-5.3

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

Log:
Merge branch 'pull-request/61' into PHP-5.3

* pull-request/61:
  Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer

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

Changed paths:
  AA  ext/intl/tests/bug59597_32.phpt
  AA  ext/intl/tests/bug59597_64.phpt


Diff:
diff --cc ext/intl/tests/bug59597_32.phpt
index 000,000..928a235
new file mode 100644
--- /dev/null
+++ b/ext/intl/tests/bug59597_32.phpt
@@@ -1,0 -1,0 +1,21 @@@
++--TEST--
++Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
++--SKIPIF--
++?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?
++?php echo PHP_INT_SIZE == 8 ? skip 32-bit only : OK; ?
++--FILE--
++?php
++
++$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
++$value = $formatter-parse('2147483647', \NumberFormatter::TYPE_INT32);
++var_dump($value);
++
++$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
++$value = $formatter-parse('2147483650', \NumberFormatter::TYPE_INT64);
++var_dump($value);
++
++?
++--EXPECT--
++int(2147483647)
++float(2147483650)
++
diff --cc ext/intl/tests/bug59597_64.phpt
index 000,000..4b96bf7
new file mode 100644
--- /dev/null
+++ b/ext/intl/tests/bug59597_64.phpt
@@@ -1,0 -1,0 +1,21 @@@
++--TEST--
++Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
++--SKIPIF--
++?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?
++?php echo PHP_INT_SIZE != 8 ? skip 64-bit only : OK; ?
++--FILE--
++?php
++
++$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
++$value = $formatter-parse('2147483647', \NumberFormatter::TYPE_INT32);
++var_dump($value);
++
++$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
++$value = $formatter-parse('2147483650', \NumberFormatter::TYPE_INT64);
++var_dump($value);
++
++?
++--EXPECTREGEX--
++int(2147483647)
++int(2147483650)
++


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



[PHP-CVS] com php-src: Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer: ext/intl/formatter/formatter_parse.c ext/intl/tests/bug59597.phpt

2012-04-19 Thread Stanislav Malyshev
Commit:2827324c7cc4f3a28ad66cd2a3724165abac4941
Author:Sherif Ramadan theanomaly...@gmail.com Thu, 19 Apr 2012 
04:44:43 -0400
Parents:   4650b2164b641ba3fd9d733e8cc82e386aa98772
Branches:  PHP-5.3

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

Log:
Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer

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

Changed paths:
  M  ext/intl/formatter/formatter_parse.c
  A  ext/intl/tests/bug59597.phpt


Diff:
diff --git a/ext/intl/formatter/formatter_parse.c 
b/ext/intl/formatter/formatter_parse.c
index cbdde85..6f3a3a1 100755
--- a/ext/intl/formatter/formatter_parse.c
+++ b/ext/intl/formatter/formatter_parse.c
@@ -83,11 +83,10 @@ PHP_FUNCTION( numfmt_parse )
break;
case FORMAT_TYPE_INT64:
val64 = unum_parseInt64(FORMATTER_OBJECT(nfo), sstr, 
sstr_len, position_p, INTL_DATA_ERROR_CODE(nfo));
-   if(val64  LONG_MAX || val64  -LONG_MAX) {
+   if(val64  LONG_MAX || val64  LONG_MIN) {
RETVAL_DOUBLE(val64);
} else {
-   val32 = (int32_t)val64;
-   RETVAL_LONG(val32);
+   RETVAL_LONG((long)val64);
}
break;
case FORMAT_TYPE_DOUBLE:
diff --git a/ext/intl/tests/bug59597.phpt b/ext/intl/tests/bug59597.phpt
new file mode 100644
index 000..54c9b6d
--- /dev/null
+++ b/ext/intl/tests/bug59597.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
+--SKIPIF--
+?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?
+--FILE--
+?php
+
+$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
+$value = $formatter-parse('2147483647', \NumberFormatter::TYPE_INT32);
+var_dump($value);
+
+$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
+$value = $formatter-parse('2147483650', \NumberFormatter::TYPE_INT64);
+var_dump($value);
+
+?
+--EXPECTF--
+int(2147483647)
+int(2147483650)


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



[PHP-CVS] com php-src: add pg_escape_identifier/pg_escape_literal: ext/pgsql/config.m4 ext/pgsql/pgsql.c ext/pgsql/php_pgsql.h ext/pgsql/tests/08escape.phpt

2012-04-19 Thread Stanislav Malyshev
Commit:655245afef75613551929610873d0ba09754777f
Author:Yasuo Ohgaki yohg...@php.net Fri, 25 Nov 2011 02:21:01 
+
Committer: Stanislav Malyshev s...@php.net  Thu, 19 Apr 2012 13:40:24 
-0700
Parents:   106e0a2e688f3e5c97e49760b9c3c99eea714ae8
Branches:  PHP-5.4

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

Log:
add pg_escape_identifier/pg_escape_literal

Changed paths:
  M  ext/pgsql/config.m4
  M  ext/pgsql/pgsql.c
  M  ext/pgsql/php_pgsql.h
  M  ext/pgsql/tests/08escape.phpt


Diff:
diff --git a/ext/pgsql/config.m4 b/ext/pgsql/config.m4
index 2710796..bddb77a 100644
--- a/ext/pgsql/config.m4
+++ b/ext/pgsql/config.m4
@@ -94,6 +94,7 @@ if test $PHP_PGSQL != no; then
   AC_CHECK_LIB(pq, 
pg_encoding_to_char,AC_DEFINE(HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT,1,[Whether 
libpq is compiled with --enable-multibyte]))
   AC_CHECK_LIB(pq, lo_create, AC_DEFINE(HAVE_PG_LO_CREATE,1,[PostgreSQL 8.1 or 
later]))
   AC_CHECK_LIB(pq, lo_import_with_oid, 
AC_DEFINE(HAVE_PG_LO_IMPORT_WITH_OID,1,[PostgreSQL 8.4 or later]))
+  AC_CHECK_LIB(pq, PQescapeLiteral, 
AC_DEFINE(HAVE_PQESCAPELITERAL,1,[PostgreSQL 9.0 or later]))
   LIBS=$old_LIBS
   LDFLAGS=$old_LDFLAGS
 
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 54a86a8..ad66779 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -422,6 +422,17 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_unescape_bytea, 0, 0, 1)
 ZEND_END_ARG_INFO()
 #endif
 
+#if HAVE_PQESCAPE
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_escape_literal, 0, 0, 0)
+   ZEND_ARG_INFO(0, connection)
+   ZEND_ARG_INFO(0, data)
+ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_escape_identifier, 0, 0, 0)
+   ZEND_ARG_INFO(0, connection)
+   ZEND_ARG_INFO(0, data)
+ZEND_END_ARG_INFO()
+#endif
+
 ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_result_error, 0, 0, 1)
ZEND_ARG_INFO(0, result)
 ZEND_END_ARG_INFO()
@@ -652,6 +663,8 @@ const zend_function_entry pgsql_functions[] = {
PHP_FE(pg_escape_string,arginfo_pg_escape_string)
PHP_FE(pg_escape_bytea, arginfo_pg_escape_bytea)
PHP_FE(pg_unescape_bytea,   arginfo_pg_unescape_bytea)
+   PHP_FE(pg_escape_literal,   arginfo_pg_escape_literal)
+   PHP_FE(pg_escape_identifier,arginfo_pg_escape_identifier)
 #endif
 #if HAVE_PQSETERRORVERBOSITY
PHP_FE(pg_set_error_verbosity,  arginfo_pg_set_error_verbosity)
@@ -815,7 +828,7 @@ static void _php_pgsql_notice_handler(void *resource_id, 
const char *message)
TSRMLS_FETCH();
if (! PGG(ignore_notices)) {
notice = (php_pgsql_notice *)emalloc(sizeof(php_pgsql_notice));
-   notice-message = _php_pgsql_trim_message(message, 
notice-len);
+   notice-message = _php_pgsql_trim_message(message, (int 
*)notice-len);
if (PGG(log_notices)) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, %s, 
notice-message);
}
@@ -4206,6 +4219,130 @@ PHP_FUNCTION(pg_unescape_bytea)
 /* }}} */
 #endif
 
+#ifdef HAVE_PQESCAPE
+#if !HAVE_PQESCAPELITERAL
+/* emulate libpq's PQescapeInternal() 9.0 or later */
+static char* php_pgsql_PQescapeInternal(PGconn *conn, const char *str, size_t 
len, int escape_literal) {
+   char *result, *rp;
+   const char *s;
+   size_t tmp_len;
+   int input_len = len;
+   char quote_char = escape_literal ? '\'' : '';
+
+   if (!conn) {
+   return NULL;
+   }
+
+   /*
+* NOTE: multibyte strings that could cointain slashes should be 
considered.
+* (e.g. SJIS, BIG5) However, it cannot be done without valid PGconn 
and mbstring. 
+* Therefore, this function does not support such encodings currently.
+* FIXME: add encoding check and skip multibyte char bytes if there is 
vaild PGconn.
+*/
+
+   /* allocate enough memory */
+   rp = result = (char *)emalloc(len*2 + 5); /* leading  E needs extra 2 
bytes + quote_chars on both end for 2 bytes + NULL */
+
+   if (escape_literal) {
+   /* check backslashes */
+   tmp_len = strspn(str, \\);
+   if (tmp_len != len) {
+   /* add  E for escaping slashes */
+   *rp++ = ' ';
+   *rp++ = 'E';
+   }
+   }
+   /* open quote */
+   *rp++ = quote_char;
+   for (s = str; s - str  input_len; ++s) {
+   if (*s == quote_char || (escape_literal  *s == '\\')) {
+   *rp++ = *s;
+   *rp++ = *s;
+   } else {
+   *rp++ = *s;
+   }
+   }
+   *rp++ = quote_char;
+   *rp = '\0';
+   
+   return result;
+}
+#endif
+
+static void php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAMETERS, int 
escape_literal) {
+   char *from = NULL, *to = NULL, *tmp = NULL;
+   zval *pgsql_link = NULL;
+   PGconn *pgsql;
+   int 

[PHP-CVS] com php-src: - Fix test title: sapi/cli/tests/php_cli_server_012.phpt

2012-04-19 Thread Felipe Pena
Commit:d5bd45429cfe5b50de1989d3fe4f90fc21869456
Author:Felipe Pena felipe...@gmail.com Thu, 19 Apr 2012 20:05:30 
-0300
Parents:   655245afef75613551929610873d0ba09754777f
Branches:  PHP-5.4 master

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

Log:
- Fix test title

Changed paths:
  M  sapi/cli/tests/php_cli_server_012.phpt


Diff:
diff --git a/sapi/cli/tests/php_cli_server_012.phpt 
b/sapi/cli/tests/php_cli_server_012.phpt
index a7d9081..9a1e60c 100644
--- a/sapi/cli/tests/php_cli_server_012.phpt
+++ b/sapi/cli/tests/php_cli_server_012.phpt
@@ -1,5 +1,5 @@
 --TEST--
-Bug #60159 (Router returns false, but POST is not passed to requested 
resource)
+Bug #60159 (Router returns false, but POST is not passed to requested resource)
 --SKIPIF--
 ?php
 include skipif.inc;


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



[PHP-CVS] com php-src: - Fixed expected test result (patch by a...@php.net in #61769): sapi/cli/tests/php_cli_server_017.phpt

2012-04-19 Thread Felipe Pena
Commit:0a46d63f7e763c28c61773239c3173b0c0f26309
Author:Felipe Pena felipe...@gmail.com Thu, 19 Apr 2012 20:15:11 
-0300
Parents:   d5bd45429cfe5b50de1989d3fe4f90fc21869456
Branches:  PHP-5.4 master

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

Log:
- Fixed expected test result (patch by a...@php.net in #61769)

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

Changed paths:
  M  sapi/cli/tests/php_cli_server_017.phpt


Diff:
diff --git a/sapi/cli/tests/php_cli_server_017.phpt 
b/sapi/cli/tests/php_cli_server_017.phpt
index 6c414a1..73530af 100644
--- a/sapi/cli/tests/php_cli_server_017.phpt
+++ b/sapi/cli/tests/php_cli_server_017.phpt
@@ -41,4 +41,4 @@ Connection: close
 X-Powered-By: %s
 Content-type: text/html
 
-string(%d) %s/tests/index.php
+string(%d) %sindex.php


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



Re: [PHP-CVS] com php-src: add pg_escape_identifier/pg_escape_literal: ext/pgsql/config.m4 ext/pgsql/pgsql.c ext/pgsql/php_pgsql.h ext/pgsql/tests/08escape.phpt

2012-04-19 Thread Yasuo Ohgaki
Thank you!

--
Yasuo Ohgaki
yohg...@ohgaki.net



2011/11/25 Stanislav Malyshev s...@php.net:
 Commit:    655245afef75613551929610873d0ba09754777f
 Author:    Yasuo Ohgaki yohg...@php.net         Fri, 25 Nov 2011 02:21:01 
 +
 Committer: Stanislav Malyshev s...@php.net      Thu, 19 Apr 2012 13:40:24 
 -0700
 Parents:   106e0a2e688f3e5c97e49760b9c3c99eea714ae8
 Branches:  PHP-5.4

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

 Log:
 add pg_escape_identifier/pg_escape_literal

 Changed paths:
  M  ext/pgsql/config.m4
  M  ext/pgsql/pgsql.c
  M  ext/pgsql/php_pgsql.h
  M  ext/pgsql/tests/08escape.phpt


 Diff:
 diff --git a/ext/pgsql/config.m4 b/ext/pgsql/config.m4
 index 2710796..bddb77a 100644
 --- a/ext/pgsql/config.m4
 +++ b/ext/pgsql/config.m4
 @@ -94,6 +94,7 @@ if test $PHP_PGSQL != no; then
   AC_CHECK_LIB(pq, 
 pg_encoding_to_char,AC_DEFINE(HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT,1,[Whether 
 libpq is compiled with --enable-multibyte]))
   AC_CHECK_LIB(pq, lo_create, AC_DEFINE(HAVE_PG_LO_CREATE,1,[PostgreSQL 8.1 
 or later]))
   AC_CHECK_LIB(pq, lo_import_with_oid, 
 AC_DEFINE(HAVE_PG_LO_IMPORT_WITH_OID,1,[PostgreSQL 8.4 or later]))
 +  AC_CHECK_LIB(pq, PQescapeLiteral, 
 AC_DEFINE(HAVE_PQESCAPELITERAL,1,[PostgreSQL 9.0 or later]))
   LIBS=$old_LIBS
   LDFLAGS=$old_LDFLAGS

 diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
 index 54a86a8..ad66779 100644
 --- a/ext/pgsql/pgsql.c
 +++ b/ext/pgsql/pgsql.c
 @@ -422,6 +422,17 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_unescape_bytea, 0, 0, 
 1)
  ZEND_END_ARG_INFO()
  #endif

 +#if HAVE_PQESCAPE
 +ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_escape_literal, 0, 0, 0)
 +       ZEND_ARG_INFO(0, connection)
 +       ZEND_ARG_INFO(0, data)
 +ZEND_END_ARG_INFO()
 +ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_escape_identifier, 0, 0, 0)
 +       ZEND_ARG_INFO(0, connection)
 +       ZEND_ARG_INFO(0, data)
 +ZEND_END_ARG_INFO()
 +#endif
 +
  ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_result_error, 0, 0, 1)
        ZEND_ARG_INFO(0, result)
  ZEND_END_ARG_INFO()
 @@ -652,6 +663,8 @@ const zend_function_entry pgsql_functions[] = {
        PHP_FE(pg_escape_string,        arginfo_pg_escape_string)
        PHP_FE(pg_escape_bytea,         arginfo_pg_escape_bytea)
        PHP_FE(pg_unescape_bytea,       arginfo_pg_unescape_bytea)
 +       PHP_FE(pg_escape_literal,       arginfo_pg_escape_literal)
 +       PHP_FE(pg_escape_identifier,    arginfo_pg_escape_identifier)
  #endif
  #if HAVE_PQSETERRORVERBOSITY
        PHP_FE(pg_set_error_verbosity,  arginfo_pg_set_error_verbosity)
 @@ -815,7 +828,7 @@ static void _php_pgsql_notice_handler(void *resource_id, 
 const char *message)
        TSRMLS_FETCH();
        if (! PGG(ignore_notices)) {
                notice = (php_pgsql_notice *)emalloc(sizeof(php_pgsql_notice));
 -               notice-message = _php_pgsql_trim_message(message, 
 notice-len);
 +               notice-message = _php_pgsql_trim_message(message, (int 
 *)notice-len);
                if (PGG(log_notices)) {
                        php_error_docref(NULL TSRMLS_CC, E_NOTICE, %s, 
 notice-message);
                }
 @@ -4206,6 +4219,130 @@ PHP_FUNCTION(pg_unescape_bytea)
  /* }}} */
  #endif

 +#ifdef HAVE_PQESCAPE
 +#if !HAVE_PQESCAPELITERAL
 +/* emulate libpq's PQescapeInternal() 9.0 or later */
 +static char* php_pgsql_PQescapeInternal(PGconn *conn, const char *str, 
 size_t len, int escape_literal) {
 +       char *result, *rp;
 +       const char *s;
 +       size_t tmp_len;
 +       int input_len = len;
 +       char quote_char = escape_literal ? '\'' : '';
 +
 +       if (!conn) {
 +               return NULL;
 +       }
 +
 +       /*
 +        * NOTE: multibyte strings that could cointain slashes should be 
 considered.
 +        * (e.g. SJIS, BIG5) However, it cannot be done without valid PGconn 
 and mbstring.
 +        * Therefore, this function does not support such encodings currently.
 +        * FIXME: add encoding check and skip multibyte char bytes if there 
 is vaild PGconn.
 +        */
 +
 +       /* allocate enough memory */
 +       rp = result = (char *)emalloc(len*2 + 5); /* leading  E needs extra 
 2 bytes + quote_chars on both end for 2 bytes + NULL */
 +
 +       if (escape_literal) {
 +               /* check backslashes */
 +               tmp_len = strspn(str, \\);
 +               if (tmp_len != len) {
 +                       /* add  E for escaping slashes */
 +                       *rp++ = ' ';
 +                       *rp++ = 'E';
 +               }
 +       }
 +       /* open quote */
 +       *rp++ = quote_char;
 +       for (s = str; s - str  input_len; ++s) {
 +               if (*s == quote_char || (escape_literal  *s == '\\')) {
 +                       *rp++ = *s;
 +                       *rp++ = *s;
 +               } else {
 +                       *rp++ = *s;
 +               }
 +       }
 +       *rp++ = quote_char;
 +       *rp = '\0';
 +
 +       return result;
 +}
 +#endif
 +
 +static 

[PHP-CVS] com php-src: - Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename set to null) patch by a...@php.net: sapi/cgi/cgi_main.c

2012-04-19 Thread Felipe Pena
Commit:c3b0fb4fbe20e46266a792cb1f332d08ef40923b
Author:Felipe Pena felipe...@gmail.com Thu, 19 Apr 2012 23:12:47 
-0300
Parents:   5cbf2d678505b6e4ab89bcfe04695e5da9dd2c0e
Branches:  PHP-5.3 PHP-5.4 master

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

Log:
- Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename set 
to null) patch by a...@php.net

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

Changed paths:
  M  sapi/cgi/cgi_main.c


Diff:
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index dfd77e4..56c736f 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -848,12 +848,13 @@ static int sapi_cgi_activate(TSRMLS_D)
zend_str_tolower(doc_root, doc_root_len);
 #endif
php_cgi_ini_activate_user_config(path, 
path_len, doc_root, doc_root_len, doc_root_len - 1 TSRMLS_CC);
+   
+#ifdef PHP_WIN32
+   efree(doc_root);
+#endif
}
}
 
-#ifdef PHP_WIN32
-   efree(doc_root);
-#endif
efree(path);
}


--
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.3' into PHP-5.4: sapi/cgi/cgi_main.c

2012-04-19 Thread Felipe Pena
Commit:d2798c6035faf1e2497a26964cb4b9672017e8d9
Author:Felipe Pena felipe...@gmail.com Thu, 19 Apr 2012 23:13:37 
-0300
Parents:   0a46d63f7e763c28c61773239c3173b0c0f26309 
c3b0fb4fbe20e46266a792cb1f332d08ef40923b
Branches:  PHP-5.4 master

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

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

* PHP-5.3:
  - Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename 
set to null) patch by a...@php.net

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

Changed paths:
  MM  sapi/cgi/cgi_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: Merge branch 'PHP-5.4': sapi/cgi/cgi_main.c

2012-04-19 Thread Felipe Pena
Commit:47cff264dfc9b117c7fc1904da852c92f1db3260
Author:Felipe Pena felipe...@gmail.com Thu, 19 Apr 2012 23:14:00 
-0300
Parents:   77f43a07709ce9279d90025bffb51aa2e0f862be 
d2798c6035faf1e2497a26964cb4b9672017e8d9
Branches:  master

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

Log:
Merge branch 'PHP-5.4'

* PHP-5.4:
  - Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename 
set to null) patch by a...@php.net

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

Changed paths:
  MM  sapi/cgi/cgi_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: - BFN: NEWS

2012-04-19 Thread Felipe Pena
Commit:dd34fe52b93dd48b9667dd75f07d0a48681c3dca
Author:Felipe Pena felipe...@gmail.com Thu, 19 Apr 2012 23:23:46 
-0300
Parents:   c3b0fb4fbe20e46266a792cb1f332d08ef40923b
Branches:  PHP-5.3

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

Log:
- BFN

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index 5fe7245..79e9f7a 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ PHP
NEWS
 |||
 ?? ??? 2012, PHP 5.3.12
 
+- Core:
+  . Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename
+   set to null). (Anatoliy)
+
 - JSON
   . Fixed bug #61537 (json_encode() incorrectly truncates/discards
 information). (Adam)


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



[PHP-CVS] com php-src: - BFN: NEWS

2012-04-19 Thread Felipe Pena
Commit:bca2d6b985dee0d120b0f14f088c1238f8eeef15
Author:Felipe Pena felipe...@gmail.com Thu, 19 Apr 2012 23:23:59 
-0300
Parents:   d2798c6035faf1e2497a26964cb4b9672017e8d9
Branches:  PHP-5.4

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

Log:
- BFN

Changed paths:
  M  NEWS


Diff:
diff --git a/NEWS b/NEWS
index e09e1ab..b2c6a8d 100644
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,8 @@ PHP   
 NEWS
   . Fixed bug #60573 (type hinting with self keyword causes weird errors).
 (Laruence)
   . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)
+  . Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename
+set to null). (Anatoliy)
   . Fixed bug #52719 (array_walk_recursive crashes if third param of the
 function is by reference). (Nikita Popov)
   . Improve performance of set_exception_handler while doing reset (Laruence)


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