Re: [PHP-CVS] cvs: php-src /build order_by_dep.awk /ext/date config.m4 config0.m4 php_date.c ZendEngine2 zend.c

2009-05-14 Thread Dmitry Stogov

Jani Taskinen wrote:

Dmitry Stogov kirjoitti:

Hi Jani,

Unfortunately this patch doesn't fix the bug.
I'm not sure if it fixes module dependency issues (let me know how to 
check it), but the original bug has the same two problems.


1) Possible infinity recursion in php_log_err()


I did not even try to fix that problem, I wanted to fix the dependancy 
issues first. Now ext/date is the first to init (after Core) and last 
to shutdown.


Preventing infinite recursion is for someone else to fix how they want. :)

2) Uninitialized DATEG(tzcache. It's initialized only during RINIT() 
so any error messages befor this may crash PHP.


Eh..I did fix that until I found out it didn't help at all without THIS 
stuff being fixed first. :)


To test it I just inserted a warning message into main.c around line 
2130, right before module_initialized assignment.


+zend_error(E_WARNING, test);
module_initialized = 1;


Yes, of course, ext/date needs the stuff fixed now that it's actually 
possible.

But what about the part #1 of this..? Can I MFH to PHP_5_* ?


In case you tested it enough, you can.

Thanks. Dmitry.

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



[PHP-CVS] cvs: php-src(PHP_5_2) /main php_sprintf.c

2009-05-14 Thread Dmitry Stogov
dmitry  Thu May 14 08:21:38 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main   php_sprintf.c 
  Log:
  Fixed wrong return value
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_sprintf.c?r1=1.23.2.1.2.3r2=1.23.2.1.2.4diff_format=u
Index: php-src/main/php_sprintf.c
diff -u php-src/main/php_sprintf.c:1.23.2.1.2.3 
php-src/main/php_sprintf.c:1.23.2.1.2.4
--- php-src/main/php_sprintf.c:1.23.2.1.2.3 Wed Dec 31 11:17:47 2008
+++ php-src/main/php_sprintf.c  Thu May 14 08:21:38 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_sprintf.c,v 1.23.2.1.2.3 2008/12/31 11:17:47 sebastian Exp $ */
+/* $Id: php_sprintf.c,v 1.23.2.1.2.4 2009/05/14 08:21:38 dmitry Exp $ */
 
 #include stdio.h
 #include stdarg.h
@@ -37,9 +37,7 @@
   s[0] = '\0';
   ret = vsprintf (s, format, args);
   va_end (args);
-  if (!ret)
-return -1;
-  return strlen (s);
+  return (ret  0) ? -1 : ret;
 }
 
 /*



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main php_sprintf.c

2009-05-14 Thread Dmitry Stogov
dmitry  Thu May 14 08:21:54 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   php_sprintf.c 
  Log:
  Fixed wrong return value
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_sprintf.c?r1=1.23.2.1.2.1.2.2r2=1.23.2.1.2.1.2.3diff_format=u
Index: php-src/main/php_sprintf.c
diff -u php-src/main/php_sprintf.c:1.23.2.1.2.1.2.2 
php-src/main/php_sprintf.c:1.23.2.1.2.1.2.3
--- php-src/main/php_sprintf.c:1.23.2.1.2.1.2.2 Wed Dec 31 11:15:47 2008
+++ php-src/main/php_sprintf.c  Thu May 14 08:21:54 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_sprintf.c,v 1.23.2.1.2.1.2.2 2008/12/31 11:15:47 sebastian Exp $ */
+/* $Id: php_sprintf.c,v 1.23.2.1.2.1.2.3 2009/05/14 08:21:54 dmitry Exp $ */
 
 #include stdio.h
 #include stdarg.h
@@ -37,9 +37,7 @@
   s[0] = '\0';
   ret = vsprintf (s, format, args);
   va_end (args);
-  if (!ret)
-return -1;
-  return strlen (s);
+  return (ret  0) ? -1 : ret;
 }
 
 /*



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



[PHP-CVS] cvs: php-src /main php_sprintf.c

2009-05-14 Thread Dmitry Stogov
dmitry  Thu May 14 08:22:10 2009 UTC

  Modified files:  
/php-src/main   php_sprintf.c 
  Log:
  Fixed wrong return value
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_sprintf.c?r1=1.28r2=1.29diff_format=u
Index: php-src/main/php_sprintf.c
diff -u php-src/main/php_sprintf.c:1.28 php-src/main/php_sprintf.c:1.29
--- php-src/main/php_sprintf.c:1.28 Tue Mar 10 23:39:53 2009
+++ php-src/main/php_sprintf.c  Thu May 14 08:22:09 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_sprintf.c,v 1.28 2009/03/10 23:39:53 helly Exp $ */
+/* $Id: php_sprintf.c,v 1.29 2009/05/14 08:22:09 dmitry Exp $ */
 
 #include stdio.h
 #include stdarg.h
@@ -37,9 +37,7 @@
   s[0] = '\0';
   ret = vsprintf (s, format, args);
   va_end (args);
-  if (!ret)
-return -1;
-  return strlen (s);
+  return (ret  0) ? -1 : ret;
 }
 
 /*



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



Re: [PHP-CVS] cvs: php-src /ext/odbc php_odbc.c

2009-05-14 Thread Johannes Schlüter
Hi,

On Thu, 2009-05-14 at 01:25 +, Felipe Pena wrote:
 felipeThu May 14 01:25:17 2009 UTC
 
   Modified files:  
 /php-src/ext/odbc php_odbc.c 
   Log:
   - Fixed bug #42414 (some odbc_*() functions incompatible with Oracle ODBC 
 driver)

 @@ -3122,6 +3122,10 @@
   schema = NULL;
   }
  
 + if (cat  cat_len == 0) {
 + cat = NULL;
 + }
 +

Passing  gives you tables that do not have schemas whereas NULL
gives you tables from all schemas, see
http://msdn.microsoft.com/en-us/library/ms711683.aspx

Similar for the other functions.

Not sure which feature is more important - didn't check where cat is
coming from so the user can explicitly make this NULL or .

johannes


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



Re: [PHP-CVS] cvs: php-src /ext/odbc php_odbc.c

2009-05-14 Thread Felipe Pena
Hello,

Em Qui, 2009-05-14 às 11:55 +0200, Johannes Schlüter escreveu:
 Hi,
 
 On Thu, 2009-05-14 at 01:25 +, Felipe Pena wrote:
  felipe  Thu May 14 01:25:17 2009 UTC
  
Modified files:  
  /php-src/ext/odbc   php_odbc.c 
Log:
- Fixed bug #42414 (some odbc_*() functions incompatible with Oracle ODBC 
  driver)
 
  @@ -3122,6 +3122,10 @@
  schema = NULL;
  }
   
  +   if (cat  cat_len == 0) {
  +   cat = NULL;
  +   }
  +
 
 Passing  gives you tables that do not have schemas whereas NULL
 gives you tables from all schemas, see
 http://msdn.microsoft.com/en-us/library/ms711683.aspx
 
 Similar for the other functions.
 
 Not sure which feature is more important - didn't check where cat is
 coming from so the user can explicitly make this NULL or .
 

Oh, thanks. I'll need to change the parameter type in this case. (They
are all using 's')

-- 
Regards,
Felipe Pena


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



[PHP-CVS] cvs: phpruntests /src/configuration/settings rtPhpCgiExecutableSetting.php /src/testcase rtPhpTest.php rtTestConfiguration.php /src/testcase/sections/executablesections rtFileSection.php

2009-05-14 Thread Zoe Slattery
zoe Thu May 14 11:34:59 2009 UTC

  Modified files:  
/phpruntests/src/testcase   rtPhpTest.php rtTestConfiguration.php 
/phpruntests/src/testcase/sections/executablesections   

rtFileSection.php 
/phpruntests/src/configuration/settings 
rtPhpCgiExecutableSetting.php 
  Log:
  fixing cgi check
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/rtPhpTest.php?r1=1.4r2=1.5diff_format=u
Index: phpruntests/src/testcase/rtPhpTest.php
diff -u phpruntests/src/testcase/rtPhpTest.php:1.4 
phpruntests/src/testcase/rtPhpTest.php:1.5
--- phpruntests/src/testcase/rtPhpTest.php:1.4  Sun Apr 26 22:43:36 2009
+++ phpruntests/src/testcase/rtPhpTest.php  Thu May 14 11:34:59 2009
@@ -60,7 +60,7 @@
 //Identify the file and expect section types
 $this-fileSection = $this-setFileSection();
 $this-expectSection = $this-setExpectSection();
-
+
 $this-fileSection-setExecutableFileName($this-getName());
 }
 
@@ -80,8 +80,11 @@
 
 if (!array_key_exists('skip', $this-status)  
!array_key_exists('bork', $this-status)) {
 $this-status = array_merge($this-status, 
$this-fileSection-run($this, $runConfiguration));
-$this-output = $this-fileSection-getOutput();
-$this-compareOutput();
+//The test can be skipped by file sections if the CGI executable 
is not available
+if(!array_key_exists('skip', $this-status)) {
+$this-output = $this-fileSection-getOutput();
+$this-compareOutput();
+}
  
 
 if (array_key_exists('CLEAN', $this-sections)) {
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/rtTestConfiguration.php?r1=1.13r2=1.14diff_format=u
Index: phpruntests/src/testcase/rtTestConfiguration.php
diff -u phpruntests/src/testcase/rtTestConfiguration.php:1.13 
phpruntests/src/testcase/rtTestConfiguration.php:1.14
--- phpruntests/src/testcase/rtTestConfiguration.php:1.13   Mon May  4 
17:02:37 2009
+++ phpruntests/src/testcase/rtTestConfiguration.phpThu May 14 11:34:59 2009
@@ -40,7 +40,7 @@
 
 private function init(rtRuntestsConfiguration $runConfiguration, 
$sections, $sectionHeadings, $fileSection)
 {
-$this-isCgiTest($sectionHeadings);
+$this-setCgiTest($sectionHeadings);
 
 $this-setEnvironmentVariables($runConfiguration, $sections, 
$fileSection);
 $this-setPhpCommandLineArguments($runConfiguration, $sections);
@@ -110,7 +110,11 @@
 private function setPhpExecutable($runConfiguration, $sectionHeadings)
 {
 if ($this-cgiTest) {
-$this-phpExecutable =  
$runConfiguration-getSetting('PhpCgiExecutable').  -C;
+if($runConfiguration-getSetting('PhpCgiExecutable') != null) {
+$this-phpExecutable =  
$runConfiguration-getSetting('PhpCgiExecutable').  -C;
+} else {
+$this-phpExecutable = null;
+}
 } else {
 $this-phpExecutable = 
$runConfiguration-getSetting('PhpExecutable');
 }
@@ -133,7 +137,7 @@
 }
 }
 
-private function isCgiTest($sectionHeadings)
+private function setCgiTest($sectionHeadings)
 {
 $tempArray = array_diff($this-cgiSections, $sectionHeadings);
 if (count($tempArray)  count($this-cgiSections)) {
@@ -166,5 +170,10 @@
 {
 return $this-inputFileString;
 }
+
+public function isCgiTest()
+{
+return $this-cgiTest;;
+}
 }
 ?
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/sections/executablesections/rtFileSection.php?r1=1.8r2=1.9diff_format=u
Index: phpruntests/src/testcase/sections/executablesections/rtFileSection.php
diff -u 
phpruntests/src/testcase/sections/executablesections/rtFileSection.php:1.8 
phpruntests/src/testcase/sections/executablesections/rtFileSection.php:1.9
--- phpruntests/src/testcase/sections/executablesections/rtFileSection.php:1.8  
Tue Apr 28 20:58:39 2009
+++ phpruntests/src/testcase/sections/executablesections/rtFileSection.php  
Thu May 14 11:34:59 2009
@@ -15,7 +15,8 @@
 class rtFileSection extends rtExecutableSection
 {
 private $twoBlankLines = '\r?\n\r?\n';
-
+private $headers;
+
 public function setExecutableFileName($testName)
 {
 $this-fileName = $testName..php;
@@ -44,15 +45,16 @@
 
 try {
 $this-output = $PhpRunner-runphp();
-
-//If it's a CGI test sort the headers out here
-if(substr($phpExecutable, -2) == '-C') {
-
+
+//If it's a CGI test and separate the headers from the output
+if($testCase-testConfiguration-isCgiTest()) {
+// Would this be better done with substr/strpos, not sure 
how to cope with \n
+

[PHP-CVS] cvs: phpruntests /tests/testcase rtGetExecutionTest.php

2009-05-14 Thread Zoe Slattery
zoe Thu May 14 11:35:18 2009 UTC

  Modified files:  
/phpruntests/tests/testcase rtGetExecutionTest.php 
  Log:
  fixing cgi check
  
http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtGetExecutionTest.php?r1=1.2r2=1.3diff_format=u
Index: phpruntests/tests/testcase/rtGetExecutionTest.php
diff -u phpruntests/tests/testcase/rtGetExecutionTest.php:1.2 
phpruntests/tests/testcase/rtGetExecutionTest.php:1.3
--- phpruntests/tests/testcase/rtGetExecutionTest.php:1.2   Mon May 11 
11:03:26 2009
+++ phpruntests/tests/testcase/rtGetExecutionTest.php   Thu May 14 11:35:18 2009
@@ -24,7 +24,7 @@
 }
 
 public function testFileRun()
-{ 
+{
 //Create a new test configuration
 $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', 
'-p', $this-php, $this-sample_test));
 
$config-setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE',$this-php_cgi);
@@ -39,16 +39,47 @@
 $testFile-normaliseLineEndings();
 
 //Create a new test case
-$testCase = new rtPhpTest($testFile-getContents(), 
$testFile-getTestName(), $testFile-getSectionHeadings(), $config);  
+$testCase = new rtPhpTest($testFile-getContents(), 
$testFile-getTestName(), $testFile-getSectionHeadings(), $config);
 
 //Setup and set the local environment for the test case
 $testCase-executeTest($config);
 $output = $testCase-getOutput();
 $status = $testCase-getStatus();
-   
+ 
 $this-assertEquals('85', strlen($output));
 $this-assertEquals('', $status['pass']);
+
+
+}
+
+public function testNoCGI()
+{
+//Create a new test configuration
+$config = rtRuntestsConfiguration::getInstance(array('run-tests.php', 
'-p', $this-php, $this-sample_test));
+$config-configure();
+
+//Retrieve the array of test file names
+$testFiles = $config-getSetting('TestFiles');
+
+//Read the test file
+$testFile = new rtPhpTestFile();
+$testFile-doRead($testFiles[0]);
+$testFile-normaliseLineEndings();
+
+//Create a new test case
+$testCase = new rtPhpTest($testFile-getContents(), 
$testFile-getTestName(), $testFile-getSectionHeadings(), $config);
+
+//Setup and set the local environment for the test case
+$testCase-executeTest($config);
+$output = $testCase-getOutput();
+//var_dump($output);
 
+$status = $testCase-getStatus();
+ 
+ 
+$this-assertEquals(0, strlen($output));
+$this-assertEquals('The CGI executable is unavailable', 
$status['skip']);
+
 
 }
 }



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/xmlrpc xmlrpc-epi-php.c

2009-05-14 Thread Ilia Alshanetsky
iliaa   Thu May 14 12:29:47 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/xmlrpc xmlrpc-epi-php.c 
  Log:
  
  Fixed compiler warnings
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.39.2.5.2.6.2.21r2=1.39.2.5.2.6.2.22diff_format=u
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.6.2.21 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.6.2.22
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.6.2.21   Wed May 13 
14:23:14 2009
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Thu May 14 12:29:47 2009
@@ -51,7 +51,7 @@
+--+
  */
 
-/* $Id: xmlrpc-epi-php.c,v 1.39.2.5.2.6.2.21 2009/05/13 14:23:14 iliaa Exp $ */
+/* $Id: xmlrpc-epi-php.c,v 1.39.2.5.2.6.2.22 2009/05/14 12:29:47 iliaa Exp $ */
 
 /**
 * BUGS:   *
@@ -67,6 +67,7 @@
 
 #include php.h
 #include ext/standard/info.h
+#include ext/date/php_date.h
 #include php_ini.h
 #include php_xmlrpc.h
 #include xmlrpc.h
@@ -1344,7 +1345,7 @@
if (newtype == xmlrpc_datetime) {
XMLRPC_VALUE v = 
XMLRPC_CreateValueDateTime_ISO8601(NULL, value-value.str.val);
if (v) {
-   time_t timestamp = (time_t) 
php_parse_date(XMLRPC_GetValueDateTime_ISO8601(v), NULL);
+   time_t timestamp = (time_t) 
php_parse_date((char *)XMLRPC_GetValueDateTime_ISO8601(v), NULL);
if (timestamp) {
zval* ztimestamp;
 



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



[PHP-CVS] cvs: php-src /ext/xmlrpc xmlrpc-epi-php.c

2009-05-14 Thread Ilia Alshanetsky
iliaa   Thu May 14 12:30:06 2009 UTC

  Modified files:  
/php-src/ext/xmlrpc xmlrpc-epi-php.c 
  Log:
  
  MFB: Fixed compiler warnings
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.70r2=1.71diff_format=u
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.70 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.71
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.70Wed May 13 14:23:29 2009
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Thu May 14 12:30:06 2009
@@ -51,7 +51,7 @@
+--+
  */
 
-/* $Id: xmlrpc-epi-php.c,v 1.70 2009/05/13 14:23:29 iliaa Exp $ */
+/* $Id: xmlrpc-epi-php.c,v 1.71 2009/05/14 12:30:06 iliaa Exp $ */
 
 /**
 * BUGS:   *
@@ -67,6 +67,7 @@
 
 #include php.h
 #include ext/standard/info.h
+#include ext/date/php_date.h
 #include php_ini.h
 #include php_xmlrpc.h
 #include xmlrpc.h
@@ -1350,7 +1351,7 @@
if (newtype == xmlrpc_datetime) {
XMLRPC_VALUE v = 
XMLRPC_CreateValueDateTime_ISO8601(NULL, value-value.str.val);
if (v) {
-   time_t timestamp = (time_t) 
php_parse_date(XMLRPC_GetValueDateTime_ISO8601(v), NULL);
+   time_t timestamp = (time_t) 
php_parse_date((char *)XMLRPC_GetValueDateTime_ISO8601(v), NULL);
if (timestamp) {
zval* ztimestamp;
 



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/xmlrpc xmlrpc-epi-php.c

2009-05-14 Thread Ilia Alshanetsky
iliaa   Thu May 14 12:36:19 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/xmlrpc xmlrpc-epi-php.c 
  Log:
  
  MFB: Fixed\ compiler\ warnings
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.39.2.5.2.15r2=1.39.2.5.2.16diff_format=u
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.15 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.16
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.15   Wed May 13 14:25:58 2009
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Thu May 14 12:36:19 2009
@@ -51,7 +51,7 @@
+--+
  */
 
-/* $Id: xmlrpc-epi-php.c,v 1.39.2.5.2.15 2009/05/13 14:25:58 iliaa Exp $ */
+/* $Id: xmlrpc-epi-php.c,v 1.39.2.5.2.16 2009/05/14 12:36:19 iliaa Exp $ */
 
 /**
 * BUGS:   *
@@ -67,6 +67,7 @@
 
 #include php.h
 #include ext/standard/info.h
+#include ext/date/php_date.h
 #include php_ini.h
 #include php_xmlrpc.h
 #include xmlrpc.h
@@ -1300,7 +1301,7 @@
if(newtype == xmlrpc_datetime) {
XMLRPC_VALUE v = 
XMLRPC_CreateValueDateTime_ISO8601(NULL, value-value.str.val);
if(v) {
-   time_t timestamp = (time_t) 
php_parse_date(XMLRPC_GetValueDateTime_ISO8601(v), NULL);
+   time_t timestamp = (time_t) 
php_parse_date((char *)XMLRPC_GetValueDateTime_ISO8601(v), NULL);
if(timestamp) {
zval* ztimestamp;
 



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard http_fopen_wrapper.c

2009-05-14 Thread Greg Beaver
cellog  Thu May 14 13:36:56 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   http_fopen_wrapper.c 
  Log:
  MFH: fix potential free of NULL
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/http_fopen_wrapper.c?r1=1.99.2.12.2.9.2.15r2=1.99.2.12.2.9.2.16diff_format=u
Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.9.2.15 
php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.9.2.16
--- php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.9.2.15Tue May 
 5 00:31:56 2009
+++ php-src/ext/standard/http_fopen_wrapper.c   Thu May 14 13:36:56 2009
@@ -19,7 +19,7 @@
|  Sara Golemon poll...@php.net  |
+--+
  */
-/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.9.2.15 2009/05/05 00:31:56 jani Exp 
$ */ 
+/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.9.2.16 2009/05/14 13:36:56 cellog 
Exp $ */ 
 
 #include php.h
 #include php_globals.h
@@ -407,7 +407,9 @@
 have_header |= HTTP_HEADER_TYPE;
}
}
-   efree(tmp);
+   if (tmp) {
+   efree(tmp);
+   }
}
 
/* auth header if it was specified */



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



[PHP-CVS] cvs: php-src /ext/readline config.m4

2009-05-14 Thread Jani Taskinen
janiThu May 14 13:40:37 2009 UTC

  Modified files:  
/php-src/ext/readline   config.m4 
  Log:
  - Fixed bug #48256 (Crash due to double-linking of history.o)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/readline/config.m4?r1=1.28r2=1.29diff_format=u
Index: php-src/ext/readline/config.m4
diff -u php-src/ext/readline/config.m4:1.28 php-src/ext/readline/config.m4:1.29
--- php-src/ext/readline/config.m4:1.28 Mon Nov 28 23:03:49 2005
+++ php-src/ext/readline/config.m4  Thu May 14 13:40:37 2009
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.28 2005/11/28 23:03:49 sniper Exp $
+dnl $Id: config.m4,v 1.29 2009/05/14 13:40:37 jani Exp $
 dnl
 
 PHP_ARG_WITH(libedit,for libedit readline replacement, 
@@ -50,15 +50,6 @@
 -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
   ])
 
-  PHP_CHECK_LIBRARY(history, add_history,
-  [
-PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_DIR/$PHP_LIBDIR, 
READLINE_SHARED_LIBADD)
-  ], [
-AC_MSG_ERROR(history library required by readline not found)
-  ], [
--L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
-  ])
-
   AC_DEFINE(HAVE_LIBREADLINE, 1, [ ])
 
 elif test $PHP_LIBEDIT != no; then



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/readline config.m4

2009-05-14 Thread Jani Taskinen
janiThu May 14 13:40:51 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/readline   config.m4 
  Log:
  MFH:- Fixed bug #48256 (Crash due to double-linking of history.o)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/readline/config.m4?r1=1.25.2.3r2=1.25.2.3.4.1diff_format=u
Index: php-src/ext/readline/config.m4
diff -u php-src/ext/readline/config.m4:1.25.2.3 
php-src/ext/readline/config.m4:1.25.2.3.4.1
--- php-src/ext/readline/config.m4:1.25.2.3 Mon Nov 28 23:04:01 2005
+++ php-src/ext/readline/config.m4  Thu May 14 13:40:51 2009
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.25.2.3 2005/11/28 23:04:01 sniper Exp $
+dnl $Id: config.m4,v 1.25.2.3.4.1 2009/05/14 13:40:51 jani Exp $
 dnl
 
 PHP_ARG_WITH(libedit,for libedit readline replacement, 
@@ -50,15 +50,6 @@
 -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
   ])
 
-  PHP_CHECK_LIBRARY(history, add_history,
-  [
-PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_DIR/$PHP_LIBDIR, 
READLINE_SHARED_LIBADD)
-  ], [
-AC_MSG_ERROR(history library required by readline not found)
-  ], [
--L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
-  ])
-
   AC_DEFINE(HAVE_LIBREADLINE, 1, [ ])
 
 elif test $PHP_LIBEDIT != no; then



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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/readline config.m4

2009-05-14 Thread Jani Taskinen
janiThu May 14 13:43:53 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/readline   config.m4 
/php-srcNEWS 
  Log:
  MFH:- Fixed bug #48256 (Crash due to double-linking of history.o)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/readline/config.m4?r1=1.25.2.3r2=1.25.2.3.2.1diff_format=u
Index: php-src/ext/readline/config.m4
diff -u php-src/ext/readline/config.m4:1.25.2.3 
php-src/ext/readline/config.m4:1.25.2.3.2.1
--- php-src/ext/readline/config.m4:1.25.2.3 Mon Nov 28 23:04:01 2005
+++ php-src/ext/readline/config.m4  Thu May 14 13:43:52 2009
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.25.2.3 2005/11/28 23:04:01 sniper Exp $
+dnl $Id: config.m4,v 1.25.2.3.2.1 2009/05/14 13:43:52 jani Exp $
 dnl
 
 PHP_ARG_WITH(libedit,for libedit readline replacement, 
@@ -50,15 +50,6 @@
 -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
   ])
 
-  PHP_CHECK_LIBRARY(history, add_history,
-  [
-PHP_ADD_LIBRARY_WITH_PATH(history, $READLINE_DIR/$PHP_LIBDIR, 
READLINE_SHARED_LIBADD)
-  ], [
-AC_MSG_ERROR(history library required by readline not found)
-  ], [
--L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
-  ])
-
   AC_DEFINE(HAVE_LIBREADLINE, 1, [ ])
 
 elif test $PHP_LIBEDIT != no; then
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1506r2=1.2027.2.547.2.1507diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1506 php-src/NEWS:1.2027.2.547.2.1507
--- php-src/NEWS:1.2027.2.547.2.1506Thu May 14 01:31:50 2009
+++ php-src/NEWSThu May 14 13:43:52 2009
@@ -12,6 +12,8 @@
 - Fixed segfault on invalid session.save_path. (Hannes)
 - Fixed leaks in imap when a mail_criteria is used. (Pierre)
 
+- Fixed bug #48256 (Crash due to double-linking of history.o).
+  (tstarling at wikimedia dot org)
 - Fixed bug #48248 (SIGSEGV when access to private property via __get). 
   (Felipe)
 - Fixed bug #48240 (DBA Segmentation fault dba_nextkey). (Felipe)



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard http_fopen_wrapper.c

2009-05-14 Thread Jani Taskinen
janiThu May 14 13:49:51 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   http_fopen_wrapper.c 
  Log:
  MFH: prevent freeing NULL
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/http_fopen_wrapper.c?r1=1.99.2.12.2.15r2=1.99.2.12.2.16diff_format=u
Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.15 
php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.16
--- php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.15Tue May  5 
00:33:02 2009
+++ php-src/ext/standard/http_fopen_wrapper.c   Thu May 14 13:49:50 2009
@@ -19,7 +19,7 @@
|  Sara Golemon poll...@php.net  |
+--+
  */
-/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.15 2009/05/05 00:33:02 jani Exp $ 
*/ 
+/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.16 2009/05/14 13:49:50 jani Exp $ 
*/ 
 
 #include php.h
 #include php_globals.h
@@ -394,7 +394,9 @@
 have_header |= HTTP_HEADER_TYPE;
}
}
-   efree(tmp);
+   if (tmp) {
+   efree(tmp);
+   }
}
 
/* auth header if it was specified */



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard http_fopen_wrapper.c

2009-05-14 Thread Jani Taskinen


In the future, please MFH to PHP_5_2 such fixes.

--Jani


Greg Beaver kirjoitti:

cellog  Thu May 14 13:36:56 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard	http_fopen_wrapper.c 
  Log:

  MFH: fix potential free of NULL
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/http_fopen_wrapper.c?r1=1.99.2.12.2.9.2.15r2=1.99.2.12.2.9.2.16diff_format=u

Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.9.2.15 
php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.9.2.16
--- php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.9.2.15Tue May 
 5 00:31:56 2009
+++ php-src/ext/standard/http_fopen_wrapper.c   Thu May 14 13:36:56 2009
@@ -19,7 +19,7 @@
|  Sara Golemon poll...@php.net  |
+--+
  */
-/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.9.2.15 2009/05/05 00:31:56 jani Exp $ */ 
+/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.9.2.16 2009/05/14 13:36:56 cellog Exp $ */ 
 
 #include php.h

 #include php_globals.h
@@ -407,7 +407,9 @@
 have_header |= HTTP_HEADER_TYPE;
}
}
-   efree(tmp);
+   if (tmp) {
+   efree(tmp);
+   }
}
 
 	/* auth header if it was specified */







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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard http_fopen_wrapper.c

2009-05-14 Thread Greg Beaver
Jani Taskinen wrote:

 In the future, please MFH to PHP_5_2 such fixes.

 --Jani 

Hi Jani,

5_2 doesn't have this problem, otherwise I would have :)

Greg

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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard http_fopen_wrapper.c

2009-05-14 Thread Jani Taskinen

Greg Beaver kirjoitti:

Jani Taskinen wrote:

In the future, please MFH to PHP_5_2 such fixes.

--Jani 


Hi Jani,

5_2 doesn't have this problem, otherwise I would have :)


Considering the fact that the code in this file does not differ at all between 
branches (for that part), of course it does have the problem. I already merged it.


--Jani


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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard http_fopen_wrapper.c

2009-05-14 Thread Greg Beaver
Jani Taskinen wrote:
 Greg Beaver kirjoitti:
 Jani Taskinen wrote:
 In the future, please MFH to PHP_5_2 such fixes.

 --Jani 

 Hi Jani,

 5_2 doesn't have this problem, otherwise I would have :)

 Considering the fact that the code in this file does not differ at all
 between branches (for that part), of course it does have the problem.
 I already merged it. 

Hi,

Sorry, the problem was that my 5.2 had not been cvs up-ed and so I
thought it was different.  Apologies.

Greg

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard http_fopen_wrapper.c

2009-05-14 Thread Arnaud Le Blanc
lbarnaudThu May 14 16:15:38 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   http_fopen_wrapper.c 
  Log:
  MFB: Fixed #45540 (stream_context_create creates bad http request)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/http_fopen_wrapper.c?r1=1.99.2.12.2.16r2=1.99.2.12.2.17diff_format=u
Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.16 
php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.17
--- php-src/ext/standard/http_fopen_wrapper.c:1.99.2.12.2.16Thu May 14 
13:49:50 2009
+++ php-src/ext/standard/http_fopen_wrapper.c   Thu May 14 16:15:38 2009
@@ -19,7 +19,7 @@
|  Sara Golemon poll...@php.net  |
+--+
  */
-/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.16 2009/05/14 13:49:50 jani Exp $ 
*/ 
+/* $Id: http_fopen_wrapper.c,v 1.99.2.12.2.17 2009/05/14 16:15:38 lbarnaud Exp 
$ */ 
 
 #include php.h
 #include php_globals.h
@@ -81,7 +81,10 @@
 #define HTTP_HEADER_CONTENT_LENGTH 16
 #define HTTP_HEADER_TYPE   32
 
-php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char 
*path, char *mode, int options, char **opened_path, php_stream_context 
*context, int redirect_max, int header_init STREAMS_DC TSRMLS_DC) /* {{{ */
+#define HTTP_WRAPPER_HEADER_INIT1
+#define HTTP_WRAPPER_REDIRECTED 2
+
+php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char 
*path, char *mode, int options, char **opened_path, php_stream_context 
*context, int redirect_max, int flags STREAMS_DC TSRMLS_DC) /* {{{ */
 {
php_stream *stream = NULL;
php_url *resource = NULL;
@@ -106,6 +109,8 @@
int protocol_version_len = 3; /* Default: 1.0 */
struct timeval timeout;
char *user_headers = NULL;
+   int header_init = ((flags  HTTP_WRAPPER_HEADER_INIT) != 0);
+   int redirected = ((flags  HTTP_WRAPPER_REDIRECTED) != 0);
 
tmp_line[0] = '\0';
 
@@ -251,10 +256,17 @@
 
if (context  php_stream_context_get_option(context, http, method, 
tmpzval) == SUCCESS) {
if (Z_TYPE_PP(tmpzval) == IS_STRING  Z_STRLEN_PP(tmpzval)  
0) {
-   scratch_len = strlen(path) + 29 + Z_STRLEN_PP(tmpzval);
-   scratch = emalloc(scratch_len);
-   strlcpy(scratch, Z_STRVAL_PP(tmpzval), 
Z_STRLEN_PP(tmpzval) + 1);
-   strcat(scratch,  );
+   /* As per the RFC, automatically redirected requests 
MUST NOT use other methods than
+* GET and HEAD unless it can be confirmed by the user 
*/
+   if (!redirected
+   || (Z_STRLEN_PP(tmpzval) == 3  memcmp(GET, 
Z_STRVAL_PP(tmpzval), 3) == 0)
+   || (Z_STRLEN_PP(tmpzval) == 4  
memcmp(HEAD,Z_STRVAL_PP(tmpzval), 4) == 0)
+   ) {
+   scratch_len = strlen(path) + 29 + 
Z_STRLEN_PP(tmpzval);
+   scratch = emalloc(scratch_len);
+   strlcpy(scratch, Z_STRVAL_PP(tmpzval), 
Z_STRLEN_PP(tmpzval) + 1);
+   strcat(scratch,  );
+   }
}
}
  
@@ -701,7 +713,7 @@
CHECK_FOR_CNTRL_CHARS(resource-pass)
CHECK_FOR_CNTRL_CHARS(resource-path)
}
-   stream = php_stream_url_wrap_http_ex(wrapper, new_path, 
mode, options, opened_path, context, --redirect_max, 0 STREAMS_CC TSRMLS_CC);
+   stream = php_stream_url_wrap_http_ex(wrapper, new_path, 
mode, options, opened_path, context, --redirect_max, HTTP_WRAPPER_REDIRECTED 
STREAMS_CC TSRMLS_CC);
} else {
php_stream_wrapper_log_error(wrapper, options 
TSRMLS_CC, HTTP request failed! %s, tmp_line);
}
@@ -748,7 +760,7 @@
 
 php_stream *php_stream_url_wrap_http(php_stream_wrapper *wrapper, char *path, 
char *mode, int options, char **opened_path, php_stream_context *context 
STREAMS_DC TSRMLS_DC) /* {{{ */
 {
-   return php_stream_url_wrap_http_ex(wrapper, path, mode, options, 
opened_path, context, PHP_URL_REDIRECT_MAX, 1 STREAMS_CC TSRMLS_CC);
+   return php_stream_url_wrap_http_ex(wrapper, path, mode, options, 
opened_path, context, PHP_URL_REDIRECT_MAX, HTTP_WRAPPER_HEADER_INIT STREAMS_CC 
TSRMLS_CC);
 }
 /* }}} */
 



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/network gethostbynamel_error.phpt

2009-05-14 Thread Arnaud Le Blanc
lbarnaudThu May 14 16:16:33 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/network gethostbynamel_error.phpt 
  Log:
  MFB: Fix test (use canonical name, fixes #45493)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/gethostbynamel_error.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/network/gethostbynamel_error.phpt
diff -u php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.1.2.2 
php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.1.2.3
--- php-src/ext/standard/tests/network/gethostbynamel_error.phpt:1.1.2.2
Wed Mar 26 18:18:07 2008
+++ php-src/ext/standard/tests/network/gethostbynamel_error.phptThu May 
14 16:16:33 2009
@@ -21,7 +21,7 @@
 var_dump( gethostbynamel($hostname, $extra_arg) );
 
 echo \n-- Testing gethostbynamel() with an unknown host --\n;
-$hostname = 'unknownhost_zzz_xxx_yyy';
+$hostname = 'unknownhost_zzz_xxx_yyy.';
 var_dump( gethostbynamel($hostname) );
 
 echo Done;



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/soap/tests typemap001.phpt typemap003.phpt typemap005.phpt typemap007.phpt /ext/soap/tests/schema skipif.inc

2009-05-14 Thread Arnaud Le Blanc
lbarnaudThu May 14 16:17:10 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/soap/tests/schema  skipif.inc 
/php-src/ext/soap/tests typemap001.phpt typemap003.phpt 
typemap005.phpt typemap007.phpt 
  Log:
  MFB: fix skipifs
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/skipif.inc?r1=1.1r2=1.1.6.1diff_format=u
Index: php-src/ext/soap/tests/schema/skipif.inc
diff -u php-src/ext/soap/tests/schema/skipif.inc:1.1 
php-src/ext/soap/tests/schema/skipif.inc:1.1.6.1
--- php-src/ext/soap/tests/schema/skipif.inc:1.1Wed Jan 28 13:33:48 2004
+++ php-src/ext/soap/tests/schema/skipif.incThu May 14 16:17:10 2009
@@ -1,3 +1,5 @@
 ?php
   if (!extension_loaded('soap')) die('skip soap extension not available');
+  /* xml parser is required by test_schema.inc */
+  if (!extension_loaded('xml'))  die('skip xml extension not available');
 ?
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/typemap001.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u
Index: php-src/ext/soap/tests/typemap001.phpt
diff -u php-src/ext/soap/tests/typemap001.phpt:1.1.2.3 
php-src/ext/soap/tests/typemap001.phpt:1.1.2.4
--- php-src/ext/soap/tests/typemap001.phpt:1.1.2.3  Wed Jan  9 16:45:28 2008
+++ php-src/ext/soap/tests/typemap001.phpt  Thu May 14 16:17:10 2009
@@ -2,6 +2,7 @@
 SOAP typemap 1: SoapServer support for typemap's from_xml()
 --SKIPIF--
 ?php require_once('skipif.inc'); ?
+?php if (!extension_loaded('simplexml')) die(skip simplexml extension not 
available); ?
 --INI--
 soap.wsdl_cache_enabled=0
 --FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/typemap003.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/soap/tests/typemap003.phpt
diff -u php-src/ext/soap/tests/typemap003.phpt:1.1.2.2 
php-src/ext/soap/tests/typemap003.phpt:1.1.2.3
--- php-src/ext/soap/tests/typemap003.phpt:1.1.2.2  Wed Jan  9 16:45:28 2008
+++ php-src/ext/soap/tests/typemap003.phpt  Thu May 14 16:17:10 2009
@@ -2,6 +2,7 @@
 SOAP Typemap 3: SoapClient support for typemap's from_xml()
 --SKIPIF--
 ?php require_once('skipif.inc'); ?
+?php if (!extension_loaded('simplexml')) die(skip simplexml extension not 
available); ?
 --INI--
 soap.wsdl_cache_enabled=0
 --FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/typemap005.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u
Index: php-src/ext/soap/tests/typemap005.phpt
diff -u php-src/ext/soap/tests/typemap005.phpt:1.1.2.3 
php-src/ext/soap/tests/typemap005.phpt:1.1.2.4
--- php-src/ext/soap/tests/typemap005.phpt:1.1.2.3  Wed Jan  9 16:45:28 2008
+++ php-src/ext/soap/tests/typemap005.phpt  Thu May 14 16:17:10 2009
@@ -2,6 +2,7 @@
 SOAP typemap 5: SoapServer support for typemap's from_xml() (without WSDL)
 --SKIPIF--
 ?php require_once('skipif.inc'); ?
+?php if (!extension_loaded('simplexml')) die(skip simplexml extension not 
available); ?
 --INI--
 soap.wsdl_cache_enabled=0
 --FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/typemap007.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/soap/tests/typemap007.phpt
diff -u php-src/ext/soap/tests/typemap007.phpt:1.1.2.2 
php-src/ext/soap/tests/typemap007.phpt:1.1.2.3
--- php-src/ext/soap/tests/typemap007.phpt:1.1.2.2  Wed Jan  9 16:45:28 2008
+++ php-src/ext/soap/tests/typemap007.phpt  Thu May 14 16:17:10 2009
@@ -2,6 +2,7 @@
 SOAP Typemap 7: SoapClient support for typemap's from_xml() (without WSDL)
 --SKIPIF--
 ?php require_once('skipif.inc'); ?
+?php if (!extension_loaded('simplexml')) die(skip simplexml extension not 
available); ?
 --INI--
 soap.wsdl_cache_enabled=0
 --FILE--



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/zlib zlib.c /ext/zlib/tests gzinflate-bug42663.phpt gzinflate_length.phpt

2009-05-14 Thread Arnaud Le Blanc
lbarnaudThu May 14 16:17:47 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/zlib/tests gzinflate-bug42663.phpt 
gzinflate_length.phpt 

  Modified files:  
/php-src/ext/zlib   zlib.c 
  Log:
  MFB: Fixed #42663 (gzinflate() try to allocate all memory with truncated 
  data)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/zlib.c?r1=1.183.2.6.2.8r2=1.183.2.6.2.9diff_format=u
Index: php-src/ext/zlib/zlib.c
diff -u php-src/ext/zlib/zlib.c:1.183.2.6.2.8 
php-src/ext/zlib/zlib.c:1.183.2.6.2.9
--- php-src/ext/zlib/zlib.c:1.183.2.6.2.8   Wed Dec 31 11:17:47 2008
+++ php-src/ext/zlib/zlib.c Thu May 14 16:17:47 2009
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: zlib.c,v 1.183.2.6.2.8 2008/12/31 11:17:47 sebastian Exp $ */
+/* $Id: zlib.c,v 1.183.2.6.2.9 2009/05/14 16:17:47 lbarnaud Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -571,6 +571,20 @@
}
plength = limit;
 
+   stream.zalloc = php_zlib_alloc;
+   stream.zfree = php_zlib_free;
+   stream.opaque = Z_NULL;
+   stream.avail_in = data_len + 1; /* there is room for \0 */
+   stream.next_in = (Bytef *) data;
+   stream.total_out = 0;
+
+   /* init with -MAX_WBITS disables the zlib internal headers */
+   status = inflateInit2(stream, -MAX_WBITS);
+   if (status != Z_OK) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
zError(status));
+   RETURN_FALSE;
+   }
+
/*
  stream.avail_out wants to know the output data length
  if none was given as a parameter
@@ -578,43 +592,32 @@
  doubling it whenever it wasn't big enough
  that should be enaugh for all real life cases 
*/
-
-   stream.zalloc = php_zlib_alloc;
-   stream.zfree = php_zlib_free;
-
do {
length = plength ? plength : (unsigned long)data_len * (1  
factor++);
s2 = (char *) erealloc(s1, length);
 
-   if (!s2  s1) {
-   efree(s1);
+   if (!s2) {
+   if (s1) {
+   efree(s1);
+   }
+   inflateEnd(stream);
RETURN_FALSE;
}
+   s1 = s2;
 
-   stream.next_in = (Bytef *) data;
-   stream.avail_in = (uInt) data_len + 1; /* there is room for \0 
*/
+   stream.next_out = (Bytef *) s2[stream.total_out];
+   stream.avail_out = length - stream.total_out;
+   status = inflate(stream, Z_NO_FLUSH);
 
-   stream.next_out = s2;
-   stream.avail_out = (uInt) length;
+   } while ((Z_BUF_ERROR == status || (Z_OK == status  stream.avail_in)) 
 !plength  factor  maxfactor);
 
-   /* init with -MAX_WBITS disables the zlib internal headers */
-   status = inflateInit2(stream, -MAX_WBITS);
-   if (status == Z_OK) {
-   status = inflate(stream, Z_FINISH);
-   if (status != Z_STREAM_END) {
-   inflateEnd(stream);
-   if (status == Z_OK) {
-   status = Z_BUF_ERROR;
-   }
-   } else {
-   status = inflateEnd(stream);
-   }
-   }
-   s1 = s2;
-   
-   } while ((status == Z_BUF_ERROR)  (!plength)  (factor  maxfactor));
+   inflateEnd(stream);
 
-   if (status == Z_OK) {
+   if ((plength  Z_OK == status) || factor = maxfactor) {
+   status = Z_MEM_ERROR;
+   }
+
+   if (Z_STREAM_END == status || Z_OK == status) {
s2 = erealloc(s2, stream.total_out + 1); /* room for \0 */
s2[ stream.total_out ] = '\0';
RETURN_STRINGL(s2, stream.total_out, 0);

http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzinflate-bug42663.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/gzinflate-bug42663.phpt
+++ php-src/ext/zlib/tests/gzinflate-bug42663.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzinflate_length.phpt?view=markuprev=1.1
Index: php-src/ext/zlib/tests/gzinflate_length.phpt
+++ php-src/ext/zlib/tests/gzinflate_length.phpt



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



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS

2009-05-14 Thread Arnaud Le Blanc
lbarnaudThu May 14 16:23:59 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  moved to 5.2
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.601r2=1.2027.2.547.2.965.2.602diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.601 
php-src/NEWS:1.2027.2.547.2.965.2.602
--- php-src/NEWS:1.2027.2.547.2.965.2.601   Thu May 14 01:31:02 2009
+++ php-src/NEWSThu May 14 16:23:58 2009
@@ -709,7 +709,6 @@
   prop of wrapped object). (robin_fernandes at uk dot ibm dot com, Arnaud)
 - Fixed bug #45571 (ReflectionClass::export() shows superclasses' private
   static methods). (robin_fernandes at uk dot ibm dot com)
-- Fixed bug #45540 (stream_context_create creates bad http request). (Arnaud)
 - Fixed bug #45430 (windows implementation of crypt is not thread safe).
   (Pierre)
 - Fixed bug #45345 (SPLFileInfo::getPathInfo() returning dir info instead of
@@ -776,8 +775,6 @@
 - Fixed bug #42848 (Status: header incorrect under FastCGI). (Dmitry)
 - Fixed bug #42773 (WSDL error causes HTTP 500 Response). (Dmitry)
 - Fixed bug #42736 (xmlrpc_server_call_method() crashes). (Tony)
-- Fixed bug #42663 (gzinflate() try to allocate all memory with truncated
-  data). (Arnaud)
 - Fixed bug #42657 (ini_get() returns incorrect value when default is NULL).
   (Jani, Scott)
 - Fixed bug #42637 (SoapFault : Only http and https are allowed). (Bill Moran)



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/spl spl_array.c /ext/spl/tests bug45614.phpt

2009-05-14 Thread Arnaud Le Blanc
lbarnaudThu May 14 16:43:38 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/spl/tests  bug45614.phpt 

  Modified files:  
/php-src/ext/splspl_array.c 
  Log:
  MFB: Fixed bug #45614 (ArrayIterator::current(), ::key() can show 1st 
  private prop of wrapped object)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.17.2.22r2=1.71.2.17.2.23diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.71.2.17.2.22 
php-src/ext/spl/spl_array.c:1.71.2.17.2.23
--- php-src/ext/spl/spl_array.c:1.71.2.17.2.22  Wed Dec 31 11:17:44 2008
+++ php-src/ext/spl/spl_array.c Thu May 14 16:43:38 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.71.2.17.2.22 2008/12/31 11:17:44 sebastian Exp $ */
+/* $Id: spl_array.c,v 1.71.2.17.2.23 2009/05/14 16:43:38 lbarnaud Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -82,6 +82,8 @@
}
 }
 
+static void spl_array_rewind(spl_array_object *intern TSRMLS_DC);
+
 SPL_API int spl_hash_verify_pos(spl_array_object * intern TSRMLS_DC) /* {{{ */
 {
HashTable *ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
@@ -98,7 +100,7 @@
p = p-pListNext;
}
 /* HASH_UNPROTECT_RECURSION(ht); */
-   zend_hash_internal_pointer_reset_ex(spl_array_get_hash_table(intern, 0 
TSRMLS_CC), intern-pos);
+   spl_array_rewind(intern TSRMLS_CC);
return FAILURE;
 }
 /* }}} */
@@ -218,7 +220,7 @@
}
}
 
-   zend_hash_internal_pointer_reset_ex(spl_array_get_hash_table(intern, 0 
TSRMLS_CC), intern-pos);
+   spl_array_rewind(intern TSRMLS_CC);
return retval;
 }
 /* }}} */
@@ -678,8 +680,6 @@
return std_object_handlers.has_property(object, member, has_set_exists 
TSRMLS_CC);
 } /* }}} */
 
-static void spl_array_rewind(spl_array_object *intern TSRMLS_DC);
-
 static void spl_array_unset_property(zval *object, zval *member TSRMLS_DC) /* 
{{{ */
 {
spl_array_object *intern = 
(spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
@@ -1126,7 +1126,7 @@
opos = position;
 
if (position = 0) { /* negative values are not supported */
-   zend_hash_internal_pointer_reset_ex(aht, intern-pos);
+   spl_array_rewind(intern TSRMLS_CC);
result = SUCCESS;

while (position--  0  (result = spl_array_next(intern 
TSRMLS_CC)) == SUCCESS);
@@ -1155,7 +1155,7 @@
 * we're going to call and which do not support 'pos' as 
parameter. */
pos = intern-pos;
*count = 0;
-   zend_hash_internal_pointer_reset_ex(aht, intern-pos);
+   spl_array_rewind(intern TSRMLS_CC);
while(intern-pos  spl_array_next(intern TSRMLS_CC) == 
SUCCESS) {
(*count)++;
}

http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug45614.phpt?view=markuprev=1.1
Index: php-src/ext/spl/tests/bug45614.phpt
+++ php-src/ext/spl/tests/bug45614.phpt
--TEST--
SPL: Bug#45614 (ArrayIterator can show 1st private prop of wrapped object)
--FILE--
?php
class C {
private $priv1 = 'secret1';
private $priv2 = 'secret2';
public $pub1 = 'public1';
public $pub2 = 'public2';
public $pub3 = 'public3';
} 

function showFirstTwoItems($it) {
  echo str_replace(\0, '\0', $it-key()) .  =  . $it-current() .
\n;
  $it-next();
  echo str_replace(\0, '\0', $it-key()) .  =  . $it-current() .
\n;
}

$ao = new ArrayObject(new C);
$ai = $ao-getIterator();

echo -- Show the first two items:\n;
showFirstTwoItems($ai);

echo \n-- Rewind and show the first two items:\n;
$ai-rewind();
showFirstTwoItems($ai);

echo \n-- Invalidate current position and show the first two items:\n;
unset($ai[$ai-key()]);
$ai-current();
showFirstTwoItems($ai);

echo \n-- Rewind, seek and show the first two items:\n;
$ai-rewind();
$ai-seek(0);
showFirstTwoItems($ai);
?
--EXPECT--
-- Show the first two items:
pub1 = public1
pub2 = public2

-- Rewind and show the first two items:
pub1 = public1
pub2 = public2

-- Invalidate current position and show the first two items:
pub1 = public1
pub3 = public3

-- Rewind, seek and show the first two items:
pub1 = public1
pub3 = public3



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/spl spl_array.c /ext/spl/tests arrayObject___construct_basic4.phpt arrayObject___construct_basic5.phpt arrayObject_magicMethods6.phpt arrayObject_setFlags_basic1.

2009-05-14 Thread Arnaud Le Blanc
lbarnaudThu May 14 16:44:54 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/spl/tests  bug45622.phpt 

  Modified files:  
/php-src/ext/spl/tests  arrayObject___construct_basic4.phpt 
arrayObject___construct_basic5.phpt 
arrayObject_setFlags_basic1.phpt 
arrayObject_magicMethods6.phpt 
/php-src/ext/splspl_array.c 
  Log:
  MFB: Fixed bug #45622 (isset($arrayObject-p) misbehaves with 
  ArrayObject::ARRAY_AS_PROPS set)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/arrayObject___construct_basic4.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/spl/tests/arrayObject___construct_basic4.phpt
diff -u php-src/ext/spl/tests/arrayObject___construct_basic4.phpt:1.1.2.1 
php-src/ext/spl/tests/arrayObject___construct_basic4.phpt:1.1.2.2
--- php-src/ext/spl/tests/arrayObject___construct_basic4.phpt:1.1.2.1   Fri Oct 
17 14:26:36 2008
+++ php-src/ext/spl/tests/arrayObject___construct_basic4.phpt   Thu May 14 
16:44:54 2009
@@ -1,7 +1,5 @@
 --TEST--
 SPL: ArrayObject::__construct basic usage with ArrayObject::ARRAY_AS_PROPS. 
---XFAIL--
-Will fail until the fix to bug 45622 is backported from PHP53 to PHP52.
 --FILE--
 ?php
 class C {
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/arrayObject___construct_basic5.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/spl/tests/arrayObject___construct_basic5.phpt
diff -u php-src/ext/spl/tests/arrayObject___construct_basic5.phpt:1.1.2.1 
php-src/ext/spl/tests/arrayObject___construct_basic5.phpt:1.1.2.2
--- php-src/ext/spl/tests/arrayObject___construct_basic5.phpt:1.1.2.1   Fri Oct 
17 14:26:36 2008
+++ php-src/ext/spl/tests/arrayObject___construct_basic5.phpt   Thu May 14 
16:44:54 2009
@@ -1,7 +1,5 @@
 --TEST--
 SPL: ArrayObject::__construct basic usage with 
ArrayObject::STD_PROP_LIST|ArrayObject::ARRAY_AS_PROPS.
---XFAIL--
-Will fail unless the PHP53 fix to bug 45622 is backported to PHP52
 --FILE--
 ?php
 class C {
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/arrayObject_setFlags_basic1.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/spl/tests/arrayObject_setFlags_basic1.phpt
diff -u php-src/ext/spl/tests/arrayObject_setFlags_basic1.phpt:1.1.2.1 
php-src/ext/spl/tests/arrayObject_setFlags_basic1.phpt:1.1.2.2
--- php-src/ext/spl/tests/arrayObject_setFlags_basic1.phpt:1.1.2.1  Fri Oct 
17 14:26:36 2008
+++ php-src/ext/spl/tests/arrayObject_setFlags_basic1.phpt  Thu May 14 
16:44:54 2009
@@ -1,7 +1,5 @@
 --TEST--
 SPL: ArrayObject::setFlags basic usage with ArrayObject::ARRAY_AS_PROPS. 
---XFAIL--
-Currently fails on php.net due to bug 45622.
 --FILE--
 ?php
 class C extends ArrayObject {
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/arrayObject_magicMethods6.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/spl/tests/arrayObject_magicMethods6.phpt
diff -u php-src/ext/spl/tests/arrayObject_magicMethods6.phpt:1.1.2.1 
php-src/ext/spl/tests/arrayObject_magicMethods6.phpt:1.1.2.2
--- php-src/ext/spl/tests/arrayObject_magicMethods6.phpt:1.1.2.1Fri Oct 
17 14:26:36 2008
+++ php-src/ext/spl/tests/arrayObject_magicMethods6.phptThu May 14 
16:44:54 2009
@@ -133,8 +133,11 @@
 }
 
 -- isset existent, non-existent and dynamic:
+In UsesMagic::__isset(a)
 bool(true)
+In UsesMagic::__isset(nonexistent)
 bool(false)
+In UsesMagic::__isset(dynamic)
 bool(true)
   Original wrapped object:
 object(C)#%d (5) {
@@ -183,4 +186,4 @@
   int(3)
   [priv:private]=
   string(6) secret
-}
\ No newline at end of file
+}
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.17.2.23r2=1.71.2.17.2.24diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.71.2.17.2.23 
php-src/ext/spl/spl_array.c:1.71.2.17.2.24
--- php-src/ext/spl/spl_array.c:1.71.2.17.2.23  Thu May 14 16:43:38 2009
+++ php-src/ext/spl/spl_array.c Thu May 14 16:44:54 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.71.2.17.2.23 2009/05/14 16:43:38 lbarnaud Exp $ */
+/* $Id: spl_array.c,v 1.71.2.17.2.24 2009/05/14 16:44:54 lbarnaud Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -671,13 +671,12 @@
 {
spl_array_object *intern = 
(spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
 
-   if ((intern-ar_flags  SPL_ARRAY_ARRAY_AS_PROPS) != 0) {
-   if (!std_object_handlers.has_property(object, member, 2 
TSRMLS_CC)) {
-   return spl_array_has_dimension(object, member, 
has_set_exists TSRMLS_CC);
-   }
-   return 0; /* if prop doesn't exist at all mode 0/1 cannot 
return 1 */
+   if (std_object_handlers.has_property(object, member, has_set_exists 
TSRMLS_CC)) {
+   return 1;
+   } else if ((intern-ar_flags  SPL_ARRAY_ARRAY_AS_PROPS) != 0) {
+   

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/odbc php_odbc.c

2009-05-14 Thread Felipe Pena
felipe  Thu May 14 17:24:42 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/odbc   php_odbc.c 
  Log:
  - MFH: Improved fix for #42414
  
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/php_odbc.c?r1=1.189.2.4.2.7.2.20r2=1.189.2.4.2.7.2.21diff_format=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.189.2.4.2.7.2.20 
php-src/ext/odbc/php_odbc.c:1.189.2.4.2.7.2.21
--- php-src/ext/odbc/php_odbc.c:1.189.2.4.2.7.2.20  Thu May 14 01:26:39 2009
+++ php-src/ext/odbc/php_odbc.c Thu May 14 17:24:42 2009
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_odbc.c,v 1.189.2.4.2.7.2.20 2009/05/14 01:26:39 felipe Exp $ */
+/* $Id: php_odbc.c,v 1.189.2.4.2.7.2.21 2009/05/14 17:24:42 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -3031,7 +3031,7 @@
int cat_len = 0, schema_len = 0, table_len = 0, type_len = 0;
RETCODE rc;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|, 
pv_conn, cat, cat_len, schema, schema_len, 
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|s!sss, 
pv_conn, cat, cat_len, schema, schema_len, 
table, table_len, type, type_len) == FAILURE) {
return;
}
@@ -3098,7 +3098,7 @@
int cat_len = 0, schema_len = 0, table_len = 0, column_len = 0;
RETCODE rc;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|, 
pv_conn, cat, cat_len, schema, schema_len,
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|s!sss, 
pv_conn, cat, cat_len, schema, schema_len,
table, table_len, column, column_len) == FAILURE) {
return;
}
@@ -3127,10 +3127,6 @@
schema = NULL;
}
 
-   if (cat  cat_len == 0) {
-   cat = NULL;
-   }
-
rc = SQLColumns(result-stmt, 
cat, (SQLSMALLINT) cat_len,
schema, (SQLSMALLINT) schema_len,
@@ -3168,11 +3164,11 @@
zval *pv_conn;
odbc_result *result = NULL;
odbc_connection *conn;
-   char *cat, *schema, *table, *column;
-   int cat_len, schema_len, table_len, column_len;
+   char *cat = NULL, *schema, *table, *column;
+   int cat_len = 0, schema_len, table_len, column_len;
RETCODE rc;

-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, pv_conn, 
cat, cat_len, schema, schema_len,
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs!sss, 
pv_conn, cat, cat_len, schema, schema_len,
table, table_len, column, column_len) == FAILURE) {
return;
}
@@ -3193,10 +3189,6 @@
efree(result);
RETURN_FALSE;
}
-   
-   if (cat_len == 0) {
-   cat = NULL;
-   }
 
rc = SQLColumnPrivileges(result-stmt, 
cat, SAFE_SQL_NTS(cat),
@@ -3236,11 +3228,11 @@
zval *pv_conn;
odbc_result *result = NULL;
odbc_connection *conn;
-   char *pcat, *pschema, *ptable, *fcat, *fschema, *ftable;
-   int pcat_len, pschema_len, ptable_len, fcat_len, fschema_len, 
ftable_len;
+   char *pcat = NULL, *pschema, *ptable, *fcat, *fschema, *ftable;
+   int pcat_len = 0, pschema_len, ptable_len, fcat_len, fschema_len, 
ftable_len;
RETCODE rc;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rss, 
pv_conn, pcat, pcat_len, pschema, pschema_len, 
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs!s, 
pv_conn, pcat, pcat_len, pschema, pschema_len, 
ptable, ptable_len, fcat, fcat_len, fschema, fschema_len, 
ftable, ftable_len) == FAILURE) {
return;
}
@@ -3273,10 +3265,6 @@
efree(result);
RETURN_FALSE;
}
-   
-   if (pcat_len == 0) {
-   pcat = NULL;
-   }
 
rc = SQLForeignKeys(result-stmt, 
pcat, SAFE_SQL_NTS(pcat), 
@@ -3377,10 +3365,10 @@
odbc_result   *result = NULL;
odbc_connection *conn;
char *cat = NULL, *schema = NULL, *table = NULL;
-   int cat_len, schema_len, table_len;
+   int cat_len = 0, schema_len, table_len;
RETCODE rc;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rsss, pv_conn, 
cat, cat_len, schema, schema_len, table, table_len) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs!ss, pv_conn, 
cat, cat_len, schema, schema_len, table, table_len) == FAILURE) {
return;
}
 
@@ -3400,10 +3388,6 @@
efree(result);
RETURN_FALSE;
}
-   
-   if (cat_len == 0) {
-   cat = NULL;
-   }
 
rc = SQLPrimaryKeys(result-stmt, 
cat, SAFE_SQL_NTS(cat), 
@@ -3449,7 +3433,7 @@
WRONG_PARAM_COUNT;
}
 
- 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/odbc php_odbc.c

2009-05-14 Thread Felipe Pena
felipe  Thu May 14 17:25:51 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/odbc   php_odbc.c 
  Log:
  - MFH: Improved fix for #42414
  
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/php_odbc.c?r1=1.189.2.4.2.13r2=1.189.2.4.2.14diff_format=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.189.2.4.2.13 
php-src/ext/odbc/php_odbc.c:1.189.2.4.2.14
--- php-src/ext/odbc/php_odbc.c:1.189.2.4.2.13  Thu May 14 01:27:23 2009
+++ php-src/ext/odbc/php_odbc.c Thu May 14 17:25:51 2009
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_odbc.c,v 1.189.2.4.2.13 2009/05/14 01:27:23 felipe Exp $ */
+/* $Id: php_odbc.c,v 1.189.2.4.2.14 2009/05/14 17:25:51 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -2863,7 +2863,7 @@
 PHP_FUNCTION(odbc_tables)
 {
zval **pv_conn, **pv_cat, **pv_schema, **pv_table, **pv_type;
-   odbc_result   *result = NULL;
+   odbc_result *result = NULL;
odbc_connection *conn;
char *cat = NULL, *schema = NULL, *table = NULL, *type = NULL;
RETCODE rc;
@@ -2884,8 +2884,10 @@
convert_to_string_ex(pv_schema);
schema = Z_STRVAL_PP(pv_schema);
case 2:
-   convert_to_string_ex(pv_cat);
-   cat = Z_STRVAL_PP(pv_cat);
+   if (Z_TYPE_PP(pv_cat) != IS_NULL) {
+   convert_to_string_ex(pv_cat);
+   cat = Z_STRVAL_PP(pv_cat);
+   }
}
 
ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, ODBC-Link, 
le_conn, le_pconn);
@@ -2967,9 +2969,11 @@
schema = Z_STRVAL_PP(pv_schema);
schema_len = Z_STRLEN_PP(pv_schema);
case 2:
-   convert_to_string_ex(pv_cat);
-   cat = Z_STRVAL_PP(pv_cat);
-   cat_len = Z_STRLEN_PP(pv_cat);
+   if (Z_TYPE_PP(pv_cat) != NULL) {
+   convert_to_string_ex(pv_cat);
+   cat = Z_STRVAL_PP(pv_cat);
+   cat_len = Z_STRLEN_PP(pv_cat);
+   }
}
 
ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, ODBC-Link, 
le_conn, le_pconn);
@@ -2994,10 +2998,6 @@
 */
if (table  strlen(table)  schema  !strlen(schema)) schema = NULL;
 
-   if (cat  cat_len == 0) {
-   cat = NULL;
-   }
-
rc = SQLColumns(result-stmt, 
cat, cat_len,
schema, schema_len,
@@ -3044,8 +3044,10 @@
if (zend_get_parameters_ex(5, pv_conn, pv_cat, pv_schema, 
pv_table, pv_column) == FAILURE) {
WRONG_PARAM_COUNT;
}
-   convert_to_string_ex(pv_cat);
-   cat = Z_STRVAL_PP(pv_cat);
+   if (Z_TYPE_PP(pv_cat) != IS_NULL) {
+   convert_to_string_ex(pv_cat);
+   cat = Z_STRVAL_PP(pv_cat);
+   }
convert_to_string_ex(pv_schema);
schema = Z_STRVAL_PP(pv_schema);
convert_to_string_ex(pv_table);
@@ -3072,10 +3074,6 @@
efree(result);
RETURN_FALSE;
}
-   
-   if (cat_len == 0) {
-   cat = NULL;
-   }
 
rc = SQLColumnPrivileges(result-stmt, 
cat, SAFE_SQL_NTS(cat),
@@ -3114,7 +3112,7 @@
 {
zval **pv_conn, **pv_pcat, **pv_pschema, **pv_ptable;
zval **pv_fcat, **pv_fschema, **pv_ftable;
-   odbc_result   *result = NULL;
+   odbc_result *result = NULL;
odbc_connection *conn;
char *pcat = NULL, *pschema = NULL, *ptable = NULL;
char *fcat = NULL, *fschema = NULL, *ftable = NULL;
@@ -3127,8 +3125,10 @@
pv_fcat, pv_fschema, pv_ftable) == 
FAILURE) {
WRONG_PARAM_COUNT;
}
-   convert_to_string_ex(pv_pcat);
-   pcat = Z_STRVAL_PP(pv_pcat);
+   if (Z_TYPE_PP(pv_pcat) != IS_NULL) {
+   convert_to_string_ex(pv_pcat);
+   pcat = Z_STRVAL_PP(pv_pcat);
+   }
convert_to_string_ex(pv_pschema);
pschema = Z_STRVAL_PP(pv_pschema);
convert_to_string_ex(pv_ptable);
@@ -3170,10 +3170,6 @@
efree(result);
RETURN_FALSE;
}
-   
-   if (pcat_len == 0) {
-   pcat = NULL;
-   }
 
rc = SQLForeignKeys(result-stmt, 
pcat, SAFE_SQL_NTS(pcat), 
@@ -3291,8 +3287,10 @@
if (zend_get_parameters_ex(4, pv_conn, pv_cat, pv_schema, 
pv_table) == FAILURE) {
WRONG_PARAM_COUNT;

[PHP-CVS] cvs: php-src(PHP_5_2) /build order_by_dep.awk /ext/date config.m4 config0.m4 php_date.c ZendEngine2 zend.c

2009-05-14 Thread Jani Taskinen
janiThu May 14 18:34:27 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date   config0.m4 

  Removed files:   
/php-src/ext/date   config.m4 

  Modified files:  
/ZendEngine2zend.c 
/php-src/ext/date   php_date.c 
/php-src/build  order_by_dep.awk 
  Log:
  MFH: Fixed module loading order and made request shutdown functions also to
   be loaded in reverse like all other shutdowns are.
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.c?r1=1.308.2.12.2.37r2=1.308.2.12.2.38diff_format=u
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.308.2.12.2.37 ZendEngine2/zend.c:1.308.2.12.2.38
--- ZendEngine2/zend.c:1.308.2.12.2.37  Wed Dec 31 11:17:32 2008
+++ ZendEngine2/zend.c  Thu May 14 18:34:26 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend.c,v 1.308.2.12.2.37 2008/12/31 11:17:32 sebastian Exp $ */
+/* $Id: zend.c,v 1.308.2.12.2.38 2009/05/14 18:34:26 jani Exp $ */
 
 #include zend.h
 #include zend_extensions.h
@@ -835,7 +835,7 @@
EG(opline_ptr) = NULL; /* we're no longer executing anything */
 
zend_try {
-   zend_hash_apply(module_registry, (apply_func_t) 
module_registry_cleanup TSRMLS_CC);
+   zend_hash_reverse_apply(module_registry, (apply_func_t) 
module_registry_cleanup TSRMLS_CC);
} zend_end_try();
 }
 
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.67r2=1.43.2.45.2.68diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.67 
php-src/ext/date/php_date.c:1.43.2.45.2.68
--- php-src/ext/date/php_date.c:1.43.2.45.2.67  Tue May  5 10:58:24 2009
+++ php-src/ext/date/php_date.c Thu May 14 18:34:27 2009
@@ -16,7 +16,9 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.67 2009/05/05 10:58:24 pajoye Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.68 2009/05/14 18:34:27 jani Exp $ */
+
+#define _ISOC9X_SOURCE
 
 #include php.h
 #include php_streams.h
@@ -316,17 +318,11 @@
 static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC);
 static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC);
 
-/* This is need to ensure that session extension request shutdown occurs 1st, 
because it uses the date extension */ 
-static zend_module_dep date_deps[] = {
-ZEND_MOD_OPTIONAL(session)
-{NULL, NULL, NULL}
-};
-
 /* {{{ Module struct */
 zend_module_entry date_module_entry = {
STANDARD_MODULE_HEADER_EX,
NULL,
-   date_deps,
+   NULL,
date, /* extension name */
date_functions, /* function list */
PHP_MINIT(date),/* process startup */
http://cvs.php.net/viewvc.cgi/php-src/build/order_by_dep.awk?r1=1.1r2=1.1.4.1diff_format=u
Index: php-src/build/order_by_dep.awk
diff -u php-src/build/order_by_dep.awk:1.1 
php-src/build/order_by_dep.awk:1.1.4.1
--- php-src/build/order_by_dep.awk:1.1  Sun Jul 18 12:03:51 2004
+++ php-src/build/order_by_dep.awk  Thu May 14 18:34:27 2009
@@ -79,8 +79,7 @@
out_count = 0;

while (count(mods)) {
-   # count down, since we need to assemble it in reverse order
-   for (i = mod_count-1; i = 0; --i) {
+   for (i = 0; i = mod_count; i++) {
if (i in mods) {
do_deps(i);
}

http://cvs.php.net/viewvc.cgi/php-src/ext/date/config0.m4?view=markuprev=1.1
Index: php-src/ext/date/config0.m4
+++ php-src/ext/date/config0.m4
dnl $Id: config0.m4,v 1.1 2009/05/13 00:45:57 jani Exp $
dnl config.m4 for date extension

sinclude(ext/date/lib/timelib.m4)
sinclude(lib/timelib.m4)

PHP_DATE_CFLAGS=-...@ext_builddir@/lib
timelib_sources=lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c 
 lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c 
lib/parse_iso_intervals.c lib/interval.c

PHP_NEW_EXTENSION(date, php_date.c $timelib_sources, no,, $PHP_DATE_CFLAGS)

PHP_ADD_BUILD_DIR([$ext_builddir/lib], 1)
PHP_ADD_INCLUDE([$ext_builddir/lib])
PHP_ADD_INCLUDE([$ext_srcdir/lib])

PHP_INSTALL_HEADERS([ext/date], [php_date.h lib/timelib.h lib/timelib_structs.h 
lib/timelib_config.h])

cat  $ext_builddir/lib/timelib_config.h EOF
#ifdef PHP_WIN32
# include config.w32.h
#else
# include php_config.h
#endif
EOF



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/intl/idn .cvsignore

2009-05-14 Thread Hannes Magnusson
bjori   Thu May 14 18:53:39 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/intl/idn   .cvsignore 
  Log:
  Add missing file
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/intl/idn/.cvsignore?view=markuprev=1.1
Index: php-src/ext/intl/idn/.cvsignore
+++ php-src/ext/intl/idn/.cvsignore



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/iconv/tests iconv_stream_filter.phpt

2009-05-14 Thread Moriyoshi Koizumi
moriyoshi   Thu May 14 19:02:38 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/iconv/testsiconv_stream_filter.phpt 
  Log:
  - Update the test as newer libc gets the bogus input through rather than
rejecting it.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/tests/iconv_stream_filter.phpt?r1=1.2r2=1.2.8.1diff_format=u
Index: php-src/ext/iconv/tests/iconv_stream_filter.phpt
diff -u php-src/ext/iconv/tests/iconv_stream_filter.phpt:1.2 
php-src/ext/iconv/tests/iconv_stream_filter.phpt:1.2.8.1
--- php-src/ext/iconv/tests/iconv_stream_filter.phpt:1.2Fri Dec  5 
18:39:04 2003
+++ php-src/ext/iconv/tests/iconv_stream_filter.phptThu May 14 19:02:38 2009
@@ -22,9 +22,9 @@
 $fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb');
 stream_filter_append($fp, 'string.rot13'); // this will make conversion fail.
 stream_filter_append($fp, 'convert.iconv.ISO-2022-JP/EUC-JP');
-var_dump(bin2hex(fread($fp, 10)));
-var_dump(bin2hex(fread($fp, 5)));
-var_dump(bin2hex(fread($fp, 1)));
+var_dump(bin2hex(fread($fp, 10)) != a4b3a4f3a4cba4c1a4cf);
+var_dump(bin2hex(fread($fp, 5)) != 69636f6e76);
+var_dump(bin2hex(fread($fp, 1)) != 0a);
 fclose($fp);
 ?
 --EXPECTF--
@@ -34,8 +34,6 @@
 string(20) a4b3a4f3a4cba4c1a4cf
 string(10) 69636f6e76
 string(2) 0a
-
-Warning: fread(): iconv stream filter (ISO-2022-JP=EUC-JP): invalid 
multibyte sequence in %s on line %d
-string(0) 
-string(0) 
-string(0) 
+bool(true)
+bool(true)
+bool(true)



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



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS

2009-05-14 Thread Arnaud Le Blanc
lbarnaudThu May 14 19:03:59 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  moved to 5.2
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.602r2=1.2027.2.547.2.965.2.603diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.602 
php-src/NEWS:1.2027.2.547.2.965.2.603
--- php-src/NEWS:1.2027.2.547.2.965.2.602   Thu May 14 16:23:58 2009
+++ php-src/NEWSThu May 14 19:03:59 2009
@@ -703,10 +703,6 @@
 - Fixed PECL bug #12794 (PDOStatement-nextRowset() doesn't work). (Johannes)
 - Fixed PECL bug #12401 (Add support for ATTR_FETCH_TABLE_NAMES). (Johannes)
 
-- Fixed bug #45622 (isset($arrayObject-p) misbehaves with ArrayObject::
-  ARRAY_AS_PROPS set). (robin_fernandes at uk dot ibm dot com, Arnaud)
-- Fixed bug #45614 (ArrayIterator::current(), ::key() can show 1st private
-  prop of wrapped object). (robin_fernandes at uk dot ibm dot com, Arnaud)
 - Fixed bug #45571 (ReflectionClass::export() shows superclasses' private
   static methods). (robin_fernandes at uk dot ibm dot com)
 - Fixed bug #45430 (windows implementation of crypt is not thread safe).



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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2009-05-14 Thread Arnaud Le Blanc
lbarnaudThu May 14 19:04:15 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  moved from 5.3
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1508r2=1.2027.2.547.2.1509diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1508 php-src/NEWS:1.2027.2.547.2.1509
--- php-src/NEWS:1.2027.2.547.2.1508Thu May 14 16:24:12 2009
+++ php-src/NEWSThu May 14 19:04:14 2009
@@ -90,6 +90,10 @@
   (Derick, Mike Sullivan)
 - Fixed bug #45799 (imagepng() crashes on empty image). (Martin McNickle,
   Takeshi Abe)
+- Fixed bug #45622 (isset($arrayObject-p) misbehaves with ArrayObject::
+  ARRAY_AS_PROPS set). (robin_fernandes at uk dot ibm dot com, Arnaud)
+- Fixed bug #45614 (ArrayIterator::current(), ::key() can show 1st private
+  prop of wrapped object). (robin_fernandes at uk dot ibm dot com, Arnaud)
 - Fixed bug #45540 (stream_context_create creates bad http request). (Arnaud)
 - Fixed bug #45191 (error_log ignores date.timezone php.ini val when
   setting logging timestamps). (Derick)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/iconv/tests iconv_stream_filter_delimiter.phpt

2009-05-14 Thread Moriyoshi Koizumi
moriyoshi   Thu May 14 19:06:20 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/iconv/testsiconv_stream_filter_delimiter.phpt 
  Log:
  - Add a new test for the additional delimiter of the encoding conversion 
filter
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/tests/iconv_stream_filter_delimiter.phpt?view=markuprev=1.1
Index: php-src/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
+++ php-src/ext/iconv/tests/iconv_stream_filter_delimiter.phpt



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/iconv/tests iconv_stream_filter.phpt

2009-05-14 Thread Moriyoshi Koizumi
moriyoshi   Thu May 14 19:07:18 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/iconv/testsiconv_stream_filter.phpt 
  Log:
  - MFH: Update the test as newer libc gets the bogus input through rather than
  rejecting it.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/tests/iconv_stream_filter.phpt?r1=1.2r2=1.2.6.1diff_format=u
Index: php-src/ext/iconv/tests/iconv_stream_filter.phpt
diff -u php-src/ext/iconv/tests/iconv_stream_filter.phpt:1.2 
php-src/ext/iconv/tests/iconv_stream_filter.phpt:1.2.6.1
--- php-src/ext/iconv/tests/iconv_stream_filter.phpt:1.2Fri Dec  5 
18:39:04 2003
+++ php-src/ext/iconv/tests/iconv_stream_filter.phptThu May 14 19:07:18 2009
@@ -22,9 +22,9 @@
 $fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb');
 stream_filter_append($fp, 'string.rot13'); // this will make conversion fail.
 stream_filter_append($fp, 'convert.iconv.ISO-2022-JP/EUC-JP');
-var_dump(bin2hex(fread($fp, 10)));
-var_dump(bin2hex(fread($fp, 5)));
-var_dump(bin2hex(fread($fp, 1)));
+var_dump(bin2hex(fread($fp, 10)) != a4b3a4f3a4cba4c1a4cf);
+var_dump(bin2hex(fread($fp, 5)) != 69636f6e76);
+var_dump(bin2hex(fread($fp, 1)) != 0a);
 fclose($fp);
 ?
 --EXPECTF--
@@ -34,8 +34,6 @@
 string(20) a4b3a4f3a4cba4c1a4cf
 string(10) 69636f6e76
 string(2) 0a
-
-Warning: fread(): iconv stream filter (ISO-2022-JP=EUC-JP): invalid 
multibyte sequence in %s on line %d
-string(0) 
-string(0) 
-string(0) 
+bool(true)
+bool(true)
+bool(true)



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/iconv/tests iconv_stream_filter_delimiter.phpt

2009-05-14 Thread Moriyoshi Koizumi
moriyoshi   Thu May 14 19:07:41 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/iconv/testsiconv_stream_filter_delimiter.phpt 
  Log:
  - MFH:Add a new test for the additional delimiter of the encoding conversion
filter
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/tests/iconv_stream_filter_delimiter.phpt?view=markuprev=1.1
Index: php-src/ext/iconv/tests/iconv_stream_filter_delimiter.phpt
+++ php-src/ext/iconv/tests/iconv_stream_filter_delimiter.phpt



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



[PHP-CVS] cvs: php-src /build order_by_dep.awk

2009-05-14 Thread Jani Taskinen
janiThu May 14 21:00:07 2009 UTC

  Modified files:  
/php-src/build  order_by_dep.awk 
  Log:
  - Fix harmless extra for() loop iteration
  
http://cvs.php.net/viewvc.cgi/php-src/build/order_by_dep.awk?r1=1.2r2=1.3diff_format=u
Index: php-src/build/order_by_dep.awk
diff -u php-src/build/order_by_dep.awk:1.2 php-src/build/order_by_dep.awk:1.3
--- php-src/build/order_by_dep.awk:1.2  Wed May 13 00:45:57 2009
+++ php-src/build/order_by_dep.awk  Thu May 14 21:00:07 2009
@@ -51,8 +51,6 @@
do_deps(depidx);
}
}
-
-   #printf(   phpext_%s_ptr,\n, module_name);
printf(phpext_%s_ptr,@NEWLINE@, module_name);
delete mods[mod_idx];
 }
@@ -79,7 +77,7 @@
out_count = 0;

while (count(mods)) {
-   for (i = 0; i = mod_count; i++) {
+   for (i = 0; i  mod_count - 1; i++) {
if (i in mods) {
do_deps(i);
}



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



[PHP-CVS] cvs: php-src(PHP_5_3) /build order_by_dep.awk

2009-05-14 Thread Jani Taskinen
janiThu May 14 21:00:15 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/build  order_by_dep.awk 
  Log:
  MFH
  
http://cvs.php.net/viewvc.cgi/php-src/build/order_by_dep.awk?r1=1.1.6.1r2=1.1.6.2diff_format=u
Index: php-src/build/order_by_dep.awk
diff -u php-src/build/order_by_dep.awk:1.1.6.1 
php-src/build/order_by_dep.awk:1.1.6.2
--- php-src/build/order_by_dep.awk:1.1.6.1  Wed May 13 18:48:20 2009
+++ php-src/build/order_by_dep.awk  Thu May 14 21:00:15 2009
@@ -51,8 +51,6 @@
do_deps(depidx);
}
}
-
-   #printf(   phpext_%s_ptr,\n, module_name);
printf(phpext_%s_ptr,@NEWLINE@, module_name);
delete mods[mod_idx];
 }
@@ -79,7 +77,7 @@
out_count = 0;

while (count(mods)) {
-   for (i = 0; i = mod_count; i++) {
+   for (i = 0; i  mod_count - 1; i++) {
if (i in mods) {
do_deps(i);
}



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



[PHP-CVS] cvs: php-src(PHP_5_2) /build order_by_dep.awk

2009-05-14 Thread Jani Taskinen
janiThu May 14 21:00:37 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/build  order_by_dep.awk 
  Log:
  MFH
  
http://cvs.php.net/viewvc.cgi/php-src/build/order_by_dep.awk?r1=1.1.4.1r2=1.1.4.2diff_format=u
Index: php-src/build/order_by_dep.awk
diff -u php-src/build/order_by_dep.awk:1.1.4.1 
php-src/build/order_by_dep.awk:1.1.4.2
--- php-src/build/order_by_dep.awk:1.1.4.1  Thu May 14 18:34:27 2009
+++ php-src/build/order_by_dep.awk  Thu May 14 21:00:37 2009
@@ -51,8 +51,6 @@
do_deps(depidx);
}
}
-
-   #printf(   phpext_%s_ptr,\n, module_name);
printf(phpext_%s_ptr,@NEWLINE@, module_name);
delete mods[mod_idx];
 }
@@ -79,7 +77,7 @@
out_count = 0;

while (count(mods)) {
-   for (i = 0; i = mod_count; i++) {
+   for (i = 0; i  mod_count - 1; i++) {
if (i in mods) {
do_deps(i);
}



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



[PHP-CVS] cvs: php-src(PHP_5_2) /build order_by_dep.awk

2009-05-14 Thread Jani Taskinen
janiThu May 14 21:23:03 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/build  order_by_dep.awk 
  Log:
  - Fix the harmless patch that caused harm :)
  
http://cvs.php.net/viewvc.cgi/php-src/build/order_by_dep.awk?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/build/order_by_dep.awk
diff -u php-src/build/order_by_dep.awk:1.1.4.2 
php-src/build/order_by_dep.awk:1.1.4.3
--- php-src/build/order_by_dep.awk:1.1.4.2  Thu May 14 21:00:37 2009
+++ php-src/build/order_by_dep.awk  Thu May 14 21:23:03 2009
@@ -77,7 +77,7 @@
out_count = 0;

while (count(mods)) {
-   for (i = 0; i  mod_count - 1; i++) {
+   for (i = 0; i = mod_count - 1; i++) {
if (i in mods) {
do_deps(i);
}



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



[PHP-CVS] cvs: php-src(PHP_5_3) /build order_by_dep.awk

2009-05-14 Thread Jani Taskinen
janiThu May 14 21:23:35 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/build  order_by_dep.awk 
  Log:
  - Fix the harmless patch that caused harm :)
  
http://cvs.php.net/viewvc.cgi/php-src/build/order_by_dep.awk?r1=1.1.6.2r2=1.1.6.3diff_format=u
Index: php-src/build/order_by_dep.awk
diff -u php-src/build/order_by_dep.awk:1.1.6.2 
php-src/build/order_by_dep.awk:1.1.6.3
--- php-src/build/order_by_dep.awk:1.1.6.2  Thu May 14 21:00:15 2009
+++ php-src/build/order_by_dep.awk  Thu May 14 21:23:35 2009
@@ -77,7 +77,7 @@
out_count = 0;

while (count(mods)) {
-   for (i = 0; i  mod_count - 1; i++) {
+   for (i = 0; i = mod_count - 1; i++) {
if (i in mods) {
do_deps(i);
}



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



[PHP-CVS] cvs: php-src /build order_by_dep.awk

2009-05-14 Thread Jani Taskinen
janiThu May 14 21:23:44 2009 UTC

  Modified files:  
/php-src/build  order_by_dep.awk 
  Log:
  - Fix the harmless patch that caused harm :)
  
http://cvs.php.net/viewvc.cgi/php-src/build/order_by_dep.awk?r1=1.3r2=1.4diff_format=u
Index: php-src/build/order_by_dep.awk
diff -u php-src/build/order_by_dep.awk:1.3 php-src/build/order_by_dep.awk:1.4
--- php-src/build/order_by_dep.awk:1.3  Thu May 14 21:00:07 2009
+++ php-src/build/order_by_dep.awk  Thu May 14 21:23:44 2009
@@ -77,7 +77,7 @@
out_count = 0;

while (count(mods)) {
-   for (i = 0; i  mod_count - 1; i++) {
+   for (i = 0; i = mod_count - 1; i++) {
if (i in mods) {
do_deps(i);
}



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



[PHP-CVS] cvs: php-src /ext/json json.c

2009-05-14 Thread Scott MacVicar
scottmacThu May 14 22:00:38 2009 UTC

  Modified files:  
/php-src/ext/json   json.c 
  Log:
  Throw an error rather than silently changing to the default.
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.51r2=1.52diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.51 php-src/ext/json/json.c:1.52
--- php-src/ext/json/json.c:1.51Thu May 14 00:13:57 2009
+++ php-src/ext/json/json.c Thu May 14 22:00:38 2009
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: json.c,v 1.51 2009/05/14 00:13:57 scottmac Exp $ */
+/* $Id: json.c,v 1.52 2009/05/14 22:00:38 scottmac Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -536,7 +536,8 @@
}
 
if (depth = 0) {
-   depth = JSON_PARSER_DEFAULT_DEPTH;
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Depth must greater 
than zero.);
+   RETURN_NULL();
}
 
ALLOC_INIT_ZVAL(z);



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/json JSON_parser.c JSON_parser.h json.c

2009-05-14 Thread Scott MacVicar
scottmacThu May 14 22:02:08 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/json   JSON_parser.c JSON_parser.h json.c 
  Log:
  MFH Allow a custom recursion depth to be specified for json_decode()
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/JSON_parser.c?r1=1.1.2.12.2.9r2=1.1.2.12.2.10diff_format=u
Index: php-src/ext/json/JSON_parser.c
diff -u php-src/ext/json/JSON_parser.c:1.1.2.12.2.9 
php-src/ext/json/JSON_parser.c:1.1.2.12.2.10
--- php-src/ext/json/JSON_parser.c:1.1.2.12.2.9 Thu Mar 19 19:26:00 2009
+++ php-src/ext/json/JSON_parser.c  Thu May 14 22:02:08 2009
@@ -247,6 +247,11 @@
 jp-top = -1;
jp-error_code = PHP_JSON_ERROR_NONE;
 jp-stack = (int*)ecalloc(depth, sizeof(int));
+if (depth  JSON_PARSER_DEFAULT_DEPTH) {
+jp-the_zstack = (zval **)safe_emalloc(depth, sizeof(zval), 0);
+} else {
+jp-the_zstack = jp-the_static_zstack[0];
+}
 push(jp, MODE_DONE);
 return jp;
 }
@@ -258,6 +263,9 @@
 free_JSON_parser(JSON_parser jp)
 {
 efree((void*)jp-stack);
+if (jp-the_zstack != jp-the_static_zstack[0]) {
+efree(jp-the_zstack);
+}
 efree((void*)jp);
 return false;
 }
http://cvs.php.net/viewvc.cgi/php-src/ext/json/JSON_parser.h?r1=1.1.2.1.2.2r2=1.1.2.1.2.3diff_format=u
Index: php-src/ext/json/JSON_parser.h
diff -u php-src/ext/json/JSON_parser.h:1.1.2.1.2.2 
php-src/ext/json/JSON_parser.h:1.1.2.1.2.3
--- php-src/ext/json/JSON_parser.h:1.1.2.1.2.2  Fri Dec 19 02:00:57 2008
+++ php-src/ext/json/JSON_parser.h  Thu May 14 22:02:08 2009
@@ -6,7 +6,7 @@
 #include php.h
 #include ext/standard/php_smart_str.h
 
-#define JSON_PARSER_MAX_DEPTH 512
+#define JSON_PARSER_DEFAULT_DEPTH 512
 
 typedef struct JSON_parser_struct {
 int state;
@@ -14,8 +14,8 @@
 int top;
int error_code;
 int* stack;
-zval *the_zstack[JSON_PARSER_MAX_DEPTH];
-
+zval **the_zstack;
+zval *the_static_zstack[JSON_PARSER_DEFAULT_DEPTH];
 } * JSON_parser;
 
 enum error_codes {
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.9.2.19.2.19r2=1.9.2.19.2.20diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.9.2.19.2.19 
php-src/ext/json/json.c:1.9.2.19.2.20
--- php-src/ext/json/json.c:1.9.2.19.2.19   Tue Mar 17 23:26:02 2009
+++ php-src/ext/json/json.c Thu May 14 22:02:08 2009
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: json.c,v 1.9.2.19.2.19 2009/03/17 23:26:02 scottmac Exp $ */
+/* $Id: json.c,v 1.9.2.19.2.20 2009/05/14 22:02:08 scottmac Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -494,7 +494,7 @@
char *str;
int str_len, utf16_len;
zend_bool assoc = 0; /* return JS objects as PHP objects by default */
-   long depth = JSON_PARSER_MAX_DEPTH;
+   long depth = JSON_PARSER_DEFAULT_DEPTH;
zval *z;
unsigned short *utf16;
JSON_parser jp;
@@ -517,9 +517,9 @@
RETURN_NULL();
}
 
-   /* can be removed once we remove the max depth limit */
-   if (depth = 0 || depth  JSON_PARSER_MAX_DEPTH) {
-   depth = JSON_PARSER_MAX_DEPTH;
+   if (depth = 0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Depth must greater 
than zero.);
+   RETURN_NULL();
}
 
ALLOC_INIT_ZVAL(z);



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



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS

2009-05-14 Thread Scott MacVicar
scottmacThu May 14 22:03:36 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  BFN
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.603r2=1.2027.2.547.2.965.2.604diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.603 
php-src/NEWS:1.2027.2.547.2.965.2.604
--- php-src/NEWS:1.2027.2.547.2.965.2.603   Thu May 14 19:03:59 2009
+++ php-src/NEWSThu May 14 22:03:35 2009
@@ -4,6 +4,8 @@
 - Upgraded bundled sqlite to version 3.6.14. (Scott)
 - Upgraded bundled libmagic to 5.03 in the fileinfo extension. (Scott)
 
+- Added the ability for json_decode() to take a user specified depth. (Scott)
+
 - Disabled SQLite3::loadExtension for threaded SAPIs. (Scott)
 
 - Fixed bug #48257 (PharData throws exception with non-phar tar). (Greg)



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



[PHP-CVS] cvs: php-src /ext/odbc/tests odbc_data_source_001.phpt

2009-05-14 Thread Felipe Pena
felipe  Thu May 14 22:59:02 2009 UTC

  Modified files:  
/php-src/ext/odbc/tests odbc_data_source_001.phpt 
  Log:
  - Fix test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_data_source_001.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/odbc/tests/odbc_data_source_001.phpt
diff -u php-src/ext/odbc/tests/odbc_data_source_001.phpt:1.1 
php-src/ext/odbc/tests/odbc_data_source_001.phpt:1.2
--- php-src/ext/odbc/tests/odbc_data_source_001.phpt:1.1Thu May 14 
01:28:23 2009
+++ php-src/ext/odbc/tests/odbc_data_source_001.phptThu May 14 22:59:02 2009
@@ -18,7 +18,7 @@
 Warning: odbc_data_source(): Invalid fetch type (0) in %s on line %d
 bool(false)
 
-Warning: odbc_data_source() expects parameter 2 to be long, string given in %s 
on line %d
+Warning: odbc_data_source() expects parameter 2 to be long, 
%unicode_string_optional% given in %s on line %d
 NULL
 array(%d) {
 %a



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/odbc/tests odbc_columns_001.phpt odbc_data_source_001.phpt odbc_exec_001.phpt odbc_free_result_001.phpt

2009-05-14 Thread Felipe Pena
felipe  Thu May 14 23:29:28 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/odbc/tests odbc_columns_001.phpt 
odbc_data_source_001.phpt 
odbc_exec_001.phpt 
odbc_free_result_001.phpt 
  Log:
  - Fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_columns_001.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/odbc/tests/odbc_columns_001.phpt
diff -u php-src/ext/odbc/tests/odbc_columns_001.phpt:1.1.4.2 
php-src/ext/odbc/tests/odbc_columns_001.phpt:1.1.4.3
--- php-src/ext/odbc/tests/odbc_columns_001.phpt:1.1.4.2Thu May 14 
01:29:37 2009
+++ php-src/ext/odbc/tests/odbc_columns_001.phptThu May 14 23:29:27 2009
@@ -28,5 +28,5 @@
 Warning: odbc_columns(): SQL error: Failed to fetch error message, SQL state 
HY000 in SQLColumns in %s on line %d
 bool(false)
 
-Warning: odbc_fetch_row() expects parameter 1 to be resource, boolean given in 
%s on line %d
-NULL
+Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result 
resource in %s on line %d
+bool(false)
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_data_source_001.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/odbc/tests/odbc_data_source_001.phpt
diff -u php-src/ext/odbc/tests/odbc_data_source_001.phpt:1.1.4.2 
php-src/ext/odbc/tests/odbc_data_source_001.phpt:1.1.4.3
--- php-src/ext/odbc/tests/odbc_data_source_001.phpt:1.1.4.2Thu May 14 
01:29:37 2009
+++ php-src/ext/odbc/tests/odbc_data_source_001.phptThu May 14 23:29:27 2009
@@ -18,8 +18,8 @@
 Warning: odbc_data_source(): Invalid fetch type (0) in %s on line %d
 bool(false)
 
-Warning: odbc_data_source() expects parameter 2 to be long, string given in %s 
on line %d
-NULL
+Warning: odbc_data_source(): Invalid fetch type (0) in %s on line %d
+bool(false)
 array(%d) {
 %a
 }
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_exec_001.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/odbc/tests/odbc_exec_001.phpt
diff -u php-src/ext/odbc/tests/odbc_exec_001.phpt:1.1.4.2 
php-src/ext/odbc/tests/odbc_exec_001.phpt:1.1.4.3
--- php-src/ext/odbc/tests/odbc_exec_001.phpt:1.1.4.2   Mon May 11 03:10:31 2009
+++ php-src/ext/odbc/tests/odbc_exec_001.phpt   Thu May 14 23:29:27 2009
@@ -23,11 +23,11 @@
 
 ?
 --EXPECTF--
-Warning: odbc_exec() expects parameter 3 to be long, %unicode_string_optional% 
given in %s on line %d
+Warning: odbc_exec(): SQL error: %s in %s on line %d
 
 Warning: odbc_exec(): SQL error: %s in %s on line %d
 
-Warning: odbc_exec() expects parameter 3 to be long, %unicode_string_optional% 
given in %s on line %d
+Warning: odbc_exec(): SQL error: %s in %s on line %d
 
 Warning: odbc_exec(): SQL error: %s in %s on line %d
 
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_free_result_001.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/odbc/tests/odbc_free_result_001.phpt
diff -u php-src/ext/odbc/tests/odbc_free_result_001.phpt:1.1.4.2 
php-src/ext/odbc/tests/odbc_free_result_001.phpt:1.1.4.3
--- php-src/ext/odbc/tests/odbc_free_result_001.phpt:1.1.4.2Thu May 14 
01:29:37 2009
+++ php-src/ext/odbc/tests/odbc_free_result_001.phptThu May 14 23:29:27 2009
@@ -40,8 +40,8 @@
 Warning: odbc_free_result(): supplied resource is not a valid ODBC result 
resource in %s on line %d
 bool(false)
 
-Warning: odbc_free_result() expects parameter 1 to be resource, null given in 
%s on line %d
-NULL
+Warning: odbc_free_result(): supplied argument is not a valid ODBC result 
resource in %s on line %d
+bool(false)
 
 Warning: odbc_fetch_row(): %d is not a valid ODBC result resource in %s on 
line %d
 bool(false)



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