[PHP-CVS] cvs: phpruntests /src testClassMap.php /src/testcase/sections/executablesections _rtFileExternalSection.php rtFileExternalSection.php /tests/testcase/sections/executablesections rtFileExte

2009-05-15 Thread Georg Gradwohl
g2  Fri May 15 23:11:21 2009 UTC

  Added files: 
/phpruntests/tests/testcase/sections/executablesections 

rtFileExternalSectionTest.php 

  Modified files:  
/phpruntests/src/testcase/sections/executablesections   

rtFileExternalSection.php 

_rtFileExternalSection.php 
/phpruntests/srctestClassMap.php 
  Log:
  phpruntests - added test-case for file-external-section
  http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/sections/executablesections/rtFileExternalSection.php?r1=1.1&r2=1.2&diff_format=u
Index: 
phpruntests/src/testcase/sections/executablesections/rtFileExternalSection.php
diff -u 
phpruntests/src/testcase/sections/executablesections/rtFileExternalSection.php:1.1
 
phpruntests/src/testcase/sections/executablesections/rtFileExternalSection.php:1.2
--- 
phpruntests/src/testcase/sections/executablesections/rtFileExternalSection.php:1.1
  Fri May 15 09:58:21 2009
+++ 
phpruntests/src/testcase/sections/executablesections/rtFileExternalSection.php  
Fri May 15 23:11:20 2009
@@ -12,45 +12,114 @@
  * @license   http://www.php.net/license/3_01.txt PHP License 3.01
  * @link  http://qa.php.net/
  */
-class rtFileExternalSection extends rtFileSection
+class rtFileExternalSection extends rtExecutableSection
 {
-
+
+/**
+ * @var $twoBlankLines string
+ */
+   private $twoBlankLines = '\r?\n\r?\n';
+
+/**
+ * sets the executable filename
+ * 
+ * @param $testName string  the filename
+ * @return void
+ */
+public function setExecutableFileName($testName)
+{
+$this->fileName = $testName.".php";
+}
+
+/**
+ * runs a test-case and returns the status
+ * 
+ * @param $testCase rtPhpTest
+ * @param $runConfiguration rtRuntestsConfiguration
+ * @return $status  Array
+ */
 public function run(rtPhpTest $testCase, rtRuntestsConfiguration 
$runConfiguration)
 {
-   if ($this->copyExternalFileContent() === true) {
+$this->status = array();
+$this->writeExecutableFile();
 
-return parent::run($testCase, $runConfiguration);
+$this->copyExternalFileContent();
+
+$phpExecutable = $testCase->testConfiguration->getPhpExecutable();
+
+// The CGI excutable is null if it is not available, check and SKIP if 
necessary
+if (is_null($phpExecutable)) {
+   $this->status['skip'] = 'The CGI executable is unavailable';
+   return $this->status;
+}
+
+$phpCommand = $phpExecutable;
+$phpCommand .= ' '. 
$testCase->testConfiguration->getPhpCommandLineArguments();
+$phpCommand .= ' -f '.$this->fileName;
+$phpCommand .= ' 
'.$testCase->testConfiguration->getTestCommandLineArguments();
+$phpCommand .= ' 2>&1 
'.$testCase->testConfiguration->getInputFileString();
+ 
+
+$PhpRunner = new rtPhpRunner($phpCommand,
+$testCase->testConfiguration->getEnvironmentVariables(),
+$runConfiguration->getSetting('WorkingDirectory')
+);
+
+try {
+
+   $this->output = $PhpRunner->runphp();
+
+// If it's a CGI test sort the headers out here
+if (substr($phpExecutable, -2) == '-C') {
+
+if (preg_match("/^(.*?)$this->twoBlankLines(.*)/s", 
$this->output, $match)) {
+$this->output = $match[2];
+$this->headers = $match[1];
+}
+}
+} catch (rtPhpRunnerException $e) {
+
+   $this->status['fail'] = $e->getMessage();
 }
 
 return $this->status;
 }
-
 
-private function copyExternalFileContent()
+/**
+ * @return string
+ */
+public function getHeaders()
 {
-   if (sizeof($this->sectionContents) == 1) {
-   
-   $file = $this->sectionContents[0];
-   
-   // don't allow tests to retrieve files from anywhere but this 
subdirectory
-   $file = dirname($this->fileName).'/'.trim(str_replace('..', '', 
$file));
-   
-   if (file_exists($file)) {
+return $this->headers;
+}
+
+/**
+ * checks and copies the content of the external file to the testfile
+ * 
+ * @return boolean
+ */
+protected function copyExternalFileContent()
+{
+if (sizeof($this->sectionContents) != 1) {
+   
+   $this->status['fail'] = 'One file per testcase permitted.';
+   return false;
+}
+
+$c = $this->sectionContents[0];
+
+// don't allow tests to retrieve files from anywhere but this 
su

Re: [PHP-CVS] cvs: php-src /ext/standard array.c

2009-05-15 Thread Christopher Jones



Hannes Magnusson wrote:
> On Fri, May 15, 2009 at 20:40, Moriyoshi Koizumi  wrote:
>> Christopher Jones wrote:
>>> Are there any tests for this?
>> Do we really need one?
>
> Yes.
>
> -Hannes

Tests would help bring to attention any future change, making it
easier to analyze the impact.  We might not have needed the
back-and-forth discussions on this isssue if it had been clearer what
the impact to scripts was.

Chris

--
Email: christopher.jo...@oracle.com
Twitter:  http://twitter.com/ghrd

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



Re: [PHP-CVS] cvs: php-src /ext/standard array.c

2009-05-15 Thread Hannes Magnusson
On Fri, May 15, 2009 at 20:40, Moriyoshi Koizumi  wrote:
> Christopher Jones wrote:
>>
>> Are there any tests for this?
>
> Do we really need one?

Yes.

-Hannes

-- 
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_2) / NEWS

2009-05-15 Thread Moriyoshi Koizumi
Just to let you guys know no intention to offend here.  I just used it
in the sense Jani had corrected it to be.

Moriyoshi

Jani Taskinen wrote:
> jani  Fri May 15 17:18:18 2009 UTC
> 
>   Modified files:  (Branch: PHP_5_2)
> /php-src  NEWS 
>   Log:
>   - Reverted is such a strong word.. :)
>   
> http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1510&r2=1.2027.2.547.2.1511&diff_format=u
> Index: php-src/NEWS
> diff -u php-src/NEWS:1.2027.2.547.2.1510 php-src/NEWS:1.2027.2.547.2.1511
> --- php-src/NEWS:1.2027.2.547.2.1510  Fri May 15 17:06:35 2009
> +++ php-src/NEWS  Fri May 15 17:18:18 2009
> @@ -3,8 +3,9 @@
>  ?? ??? 2009, PHP 5.2.10
>  - Updated timezone database to version 2009.7 (2009g) (Derick)
>  
> -- Reverted the default value of array_unique()'s sorting type flag parameter 
> to
> -  SORT_STRING for the sake of backwards compatibility. (Moriyoshi)
> +- Changed default value of array_unique()'s optional sorting type parameter
> +  back to SORT_STRING to fix backwards compatibility breakage introduced in 
> +  PHP 5.2.9. (Moriyoshi)
>  
>  - Added new CURL options CURLOPT_REDIR_PROTOCOLS, CURLOPT_PROTOCOLS,
>and CURLPROTO_* for redirect fixes in CURL 7.19.4. (Yoram Bar Haim, Stas)
> 
> 
> 


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



Re: [PHP-CVS] cvs: php-src /ext/standard array.c

2009-05-15 Thread Moriyoshi Koizumi
Christopher Jones wrote:
> 
> Are there any tests for this?

Do we really need one?

Moriyoshi

> Chris
> 
> Moriyoshi Koizumi wrote:
>> moriyoshiFri May 15 17:02:35 2009 UTC
>>
>>   Modified files:  /php-src/ext/standardarray.c  
>> Log:
>>   * Roll it back then.  I wonder if defaulting it to SORT_REGULAR
>> would work well
>> and I think allowing user-supplied comparator should make more
>> sense when it
>> comes to objects.
>>
>> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.477&r2=1.478&diff_format=u
>>
>> Index: php-src/ext/standard/array.c
>> diff -u php-src/ext/standard/array.c:1.477
>> php-src/ext/standard/array.c:1.478
>> --- php-src/ext/standard/array.c:1.477Fri May 15 16:44:51 2009
>> +++ php-src/ext/standard/array.cFri May 15 17:02:34 2009
>> @@ -21,7 +21,7 @@
>>
>> +--+
>>  */
>>  
>> -/* $Id: array.c,v 1.477 2009/05/15 16:44:51 sixd Exp $ */
>> +/* $Id: array.c,v 1.478 2009/05/15 17:02:34 moriyoshi Exp $ */
>>  
>>  #include "php.h"
>>  #include "php_ini.h"
>> @@ -2889,7 +2889,7 @@
>>  };
>>  struct bucketindex *arTmp, *cmpdata, *lastkept;
>>  unsigned int i;
>> -long sort_type = PHP_SORT_REGULAR;
>> +long sort_type = PHP_SORT_STRING;
>>  
>>  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|l",
>> &array, &sort_type) == FAILURE) {
>>  return;
>>
>>
>>
> 


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



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

2009-05-15 Thread Kalle Sommer Nielsen
kalle   Fri May 15 18:01:05 2009 UTC

  Modified files:  
/php-src/ext/iconv  iconv.c 
  Log:
  Fix compiler warnings (only in HEAD), same style of silence as in 5.3
  
http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/iconv.c?r1=1.174&r2=1.175&diff_format=u
Index: php-src/ext/iconv/iconv.c
diff -u php-src/ext/iconv/iconv.c:1.174 php-src/ext/iconv/iconv.c:1.175
--- php-src/ext/iconv/iconv.c:1.174 Thu Mar 26 20:01:56 2009
+++ php-src/ext/iconv/iconv.c   Fri May 15 18:01:05 2009
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: iconv.c,v 1.174 2009/03/26 20:01:56 felipe Exp $ */
+/* $Id: iconv.c,v 1.175 2009/05/15 18:01:05 kalle Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -753,15 +753,15 @@
}
}
 
-   if(len > total_len) {
+   if((unsigned int) len > total_len) {
len = total_len;
}
 
-   if (offset >= total_len) {
+   if ((unsigned int) offset >= total_len) {
return PHP_ICONV_ERR_SUCCESS;
}
 
-   if ((offset + len) > total_len) {
+   if ((unsigned int) (offset + len) > total_len) {
/* trying to compute the length */
len = total_len - offset;
}



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

2009-05-15 Thread Kalle Sommer Nielsen
kalle   Fri May 15 17:28:08 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/bz2bz2.c 
  Log:
  MFH: Fix compiler warnings
  
http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.14.2.3.2.12.2.11&r2=1.14.2.3.2.12.2.12&diff_format=u
Index: php-src/ext/bz2/bz2.c
diff -u php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.11 
php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.12
--- php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.11Wed Dec 31 11:15:35 2008
+++ php-src/ext/bz2/bz2.c   Fri May 15 17:28:08 2009
@@ -16,7 +16,7 @@
   +--+
 */
  
-/* $Id: bz2.c,v 1.14.2.3.2.12.2.11 2008/12/31 11:15:35 sebastian Exp $ */
+/* $Id: bz2.c,v 1.14.2.3.2.12.2.12 2009/05/15 17:28:08 kalle Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -495,7 +495,7 @@
   + .01 x length of data + 600 which is the largest size the results 
of the compression 
   could possibly be, at least that's what the libbz2 docs say (thanks 
to jer...@nirvani.net 
   for pointing this out).  */
-   dest_len   = source_len + (0.01 * source_len) + 600;
+   dest_len   = (unsigned int) (source_len + (0.01 * source_len) + 600);

/* Allocate the destination buffer */
dest = emalloc(dest_len + 1);
@@ -559,15 +559,15 @@
/* compression is better then 2:1, need to allocate more memory 
*/
bzs.avail_out = source_len;
size = (bzs.total_out_hi32 * (unsigned int) -1) + 
bzs.total_out_lo32;
-   dest = safe_erealloc(dest, 1, bzs.avail_out+1, size );
+   dest = safe_erealloc(dest, 1, bzs.avail_out+1, (size_t) size );
bzs.next_out = dest + size;
}
 
if (error == BZ_STREAM_END || error == BZ_OK) {
size = (bzs.total_out_hi32 * (unsigned int) -1) + 
bzs.total_out_lo32;
-   dest = safe_erealloc(dest, 1, size, 1);
+   dest = safe_erealloc(dest, 1, (size_t) size, 1);
dest[size] = '\0';
-   RETVAL_STRINGL(dest, size, 0);
+   RETVAL_STRINGL(dest, (int) size, 0);
} else { /* real error */
efree(dest);
RETVAL_LONG(error);



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



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

2009-05-15 Thread Kalle Sommer Nielsen
kalle   Fri May 15 17:27:56 2009 UTC

  Modified files:  
/php-src/ext/bz2bz2.c bz2_filter.c 
  Log:
  Fix compiler warnings
  
http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.42&r2=1.43&diff_format=u
Index: php-src/ext/bz2/bz2.c
diff -u php-src/ext/bz2/bz2.c:1.42 php-src/ext/bz2/bz2.c:1.43
--- php-src/ext/bz2/bz2.c:1.42  Tue Mar 10 23:39:11 2009
+++ php-src/ext/bz2/bz2.c   Fri May 15 17:27:56 2009
@@ -16,7 +16,7 @@
   +--+
 */
  
-/* $Id: bz2.c,v 1.42 2009/03/10 23:39:11 helly Exp $ */
+/* $Id: bz2.c,v 1.43 2009/05/15 17:27:56 kalle Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -475,14 +475,14 @@
Compresses a string into BZip2 encoded data */
 static PHP_FUNCTION(bzcompress)
 {
-   zstrsource; /* String to compress */
-   int source_len;
-   zend_uchar source_type;
-   longblock_size = 4, /* Block size for compression algorithm 
*/
-   work_factor = 0;/* Work factor for compression 
algorithm */
-   char*dest = NULL;   /* Destination to place the compressed 
data into */
-   int dest_len = 0;
-   int error;  /* Error Container */
+   zstr source;/* String to compress */
+   int  source_len;
+   zend_uchar   source_type;
+   long block_size = 4,/* Block size for compression 
algorithm */
+work_factor = 0;   /* Work factor for compression 
algorithm */
+   char*dest = NULL;   /* Destination to place the 
compressed data into */
+   int  dest_len = 0;
+   int  error; /* Error Container */
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "t|ll", &source, 
&source_len, &source_type, &block_size, &work_factor) == FAILURE) {
return;
@@ -492,7 +492,9 @@
 * This is the largest size the results of the compression could 
possibly be,
 * at least that's what the libbz2 docs say (thanks to 
jer...@nirvani.net for pointing this out).
 */
-   dest_len   = source_len + (0.01 * source_len) + 600;
+   dest_len   = (int) (source_len + (0.01 * source_len) + 600);
+
+   /* Allocate the destination buffer */
dest = emalloc(dest_len + 1);

if (source_type == IS_UNICODE) {
@@ -559,15 +561,15 @@
/* compression is better then 2:1, need to allocate more memory 
*/
bzs.avail_out = source_len;
size = (bzs.total_out_hi32 * (unsigned int) -1) + 
bzs.total_out_lo32;
-   dest = erealloc(dest, size + bzs.avail_out + 1);
+   dest = erealloc(dest, (size_t) (size + bzs.avail_out + 1));
bzs.next_out = dest + size;
}
 
if (error == BZ_STREAM_END || error == BZ_OK) {
size = (bzs.total_out_hi32 * (unsigned int) -1) + 
bzs.total_out_lo32;
-   dest = erealloc(dest, size + 1);
+   dest = erealloc(dest, (size_t) (size + 1));
dest[size] = '\0';
-   RETVAL_STRINGL(dest, size, 0);
+   RETVAL_STRINGL(dest, (int) size, 0);
} else { /* real error */
efree(dest);
RETVAL_LONG(error);
http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2_filter.c?r1=1.22&r2=1.23&diff_format=u
Index: php-src/ext/bz2/bz2_filter.c
diff -u php-src/ext/bz2/bz2_filter.c:1.22 php-src/ext/bz2/bz2_filter.c:1.23
--- php-src/ext/bz2/bz2_filter.c:1.22   Tue Mar 10 23:39:11 2009
+++ php-src/ext/bz2/bz2_filter.cFri May 15 17:27:56 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: bz2_filter.c,v 1.22 2009/03/10 23:39:11 helly Exp $ */
+/* $Id: bz2_filter.c,v 1.23 2009/05/15 17:27:56 kalle Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -89,7 +89,8 @@
streamp = &(data->strm);
 
while (buckets_in->head) {
-   size_t bin = 0, desired;
+   int bin = 0;
+   size_t desired;
 
bucket = buckets_in->head;
 
@@ -234,7 +235,8 @@
streamp = &(data->strm);
 
while (buckets_in->head) {
-   size_t bin = 0, desired;
+   int bin = 0;
+   size_t desired;
 
bucket = buckets_in->head;
 



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



Re: [PHP-CVS] cvs: php-src /ext/standard array.c

2009-05-15 Thread Christopher Jones


Are there any tests for this?

Chris

Moriyoshi Koizumi wrote:

moriyoshi   Fri May 15 17:02:35 2009 UTC

  Modified files:  
/php-src/ext/standard	array.c 
  Log:

  * Roll it back then.  I wonder if defaulting it to SORT_REGULAR would work 
well
and I think allowing user-supplied comparator should make more sense when it
comes to objects.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.477&r2=1.478&diff_format=u

Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.477 php-src/ext/standard/array.c:1.478
--- php-src/ext/standard/array.c:1.477  Fri May 15 16:44:51 2009
+++ php-src/ext/standard/array.cFri May 15 17:02:34 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.477 2009/05/15 16:44:51 sixd Exp $ */

+/* $Id: array.c,v 1.478 2009/05/15 17:02:34 moriyoshi Exp $ */
 
 #include "php.h"

 #include "php_ini.h"
@@ -2889,7 +2889,7 @@
};
struct bucketindex *arTmp, *cmpdata, *lastkept;
unsigned int i;
-   long sort_type = PHP_SORT_REGULAR;
+   long sort_type = PHP_SORT_STRING;
 
 	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|l", &array, &sort_type) == FAILURE) {

return;





--
Email: christopher.jo...@oracle.com
Twitter:  http://twitter.com/ghrd

--
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-15 Thread Jani Taskinen
janiFri May 15 17:18:18 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  - Reverted is such a strong word.. :)
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1510&r2=1.2027.2.547.2.1511&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1510 php-src/NEWS:1.2027.2.547.2.1511
--- php-src/NEWS:1.2027.2.547.2.1510Fri May 15 17:06:35 2009
+++ php-src/NEWSFri May 15 17:18:18 2009
@@ -3,8 +3,9 @@
 ?? ??? 2009, PHP 5.2.10
 - Updated timezone database to version 2009.7 (2009g) (Derick)
 
-- Reverted the default value of array_unique()'s sorting type flag parameter to
-  SORT_STRING for the sake of backwards compatibility. (Moriyoshi)
+- Changed default value of array_unique()'s optional sorting type parameter
+  back to SORT_STRING to fix backwards compatibility breakage introduced in 
+  PHP 5.2.9. (Moriyoshi)
 
 - Added new CURL options CURLOPT_REDIR_PROTOCOLS, CURLOPT_PROTOCOLS,
   and CURLPROTO_* for redirect fixes in CURL 7.19.4. (Yoram Bar Haim, Stas)



-- 
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-15 Thread Moriyoshi Koizumi
moriyoshi   Fri May 15 17:06:36 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  - Not a news actually.
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1509&r2=1.2027.2.547.2.1510&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1509 php-src/NEWS:1.2027.2.547.2.1510
--- php-src/NEWS:1.2027.2.547.2.1509Thu May 14 19:04:14 2009
+++ php-src/NEWSFri May 15 17:06:35 2009
@@ -3,6 +3,9 @@
 ?? ??? 2009, PHP 5.2.10
 - Updated timezone database to version 2009.7 (2009g) (Derick)
 
+- Reverted the default value of array_unique()'s sorting type flag parameter to
+  SORT_STRING for the sake of backwards compatibility. (Moriyoshi)
+
 - Added new CURL options CURLOPT_REDIR_PROTOCOLS, CURLOPT_PROTOCOLS,
   and CURLPROTO_* for redirect fixes in CURL 7.19.4. (Yoram Bar Haim, Stas)
 - Added support for Sun CC (FR #46595 and FR #46513). (David Soria Parra)



-- 
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 array.c

2009-05-15 Thread Moriyoshi Koizumi
moriyoshi   Fri May 15 17:03:43 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   array.c 
  Log:
  - MFH: Roll it back.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.66&r2=1.308.2.21.2.67&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.21.2.66 
php-src/ext/standard/array.c:1.308.2.21.2.67
--- php-src/ext/standard/array.c:1.308.2.21.2.66Sun May 10 16:45:01 2009
+++ php-src/ext/standard/array.cFri May 15 17:03:43 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.308.2.21.2.66 2009/05/10 16:45:01 colder Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.67 2009/05/15 17:03:43 moriyoshi Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -2839,7 +2839,7 @@
};
struct bucketindex *arTmp, *cmpdata, *lastkept;
unsigned int i;
-   long sort_type = SORT_REGULAR;
+   long sort_type = SORT_STRING;
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|l", &array, 
&sort_type) == FAILURE) {
return;



-- 
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 array.c

2009-05-15 Thread Moriyoshi Koizumi
moriyoshi   Fri May 15 17:03:03 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   array.c 
  Log:
  * MFH: Roll it back.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.37.2.55&r2=1.308.2.21.2.37.2.56&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.21.2.37.2.55 
php-src/ext/standard/array.c:1.308.2.21.2.37.2.56
--- php-src/ext/standard/array.c:1.308.2.21.2.37.2.55   Fri May 15 16:46:22 2009
+++ php-src/ext/standard/array.cFri May 15 17:03:03 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.308.2.21.2.37.2.55 2009/05/15 16:46:22 sixd Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.37.2.56 2009/05/15 17:03:03 moriyoshi Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -2697,7 +2697,7 @@
};
struct bucketindex *arTmp, *cmpdata, *lastkept;
unsigned int i;
-   long sort_type = PHP_SORT_REGULAR;
+   long sort_type = PHP_SORT_STRING;
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|l", &array, 
&sort_type) == FAILURE) {
return;



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



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

2009-05-15 Thread Moriyoshi Koizumi
moriyoshi   Fri May 15 17:02:35 2009 UTC

  Modified files:  
/php-src/ext/standard   array.c 
  Log:
  * Roll it back then.  I wonder if defaulting it to SORT_REGULAR would work 
well
and I think allowing user-supplied comparator should make more sense when it
comes to objects.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.477&r2=1.478&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.477 php-src/ext/standard/array.c:1.478
--- php-src/ext/standard/array.c:1.477  Fri May 15 16:44:51 2009
+++ php-src/ext/standard/array.cFri May 15 17:02:34 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.477 2009/05/15 16:44:51 sixd Exp $ */
+/* $Id: array.c,v 1.478 2009/05/15 17:02:34 moriyoshi Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -2889,7 +2889,7 @@
};
struct bucketindex *arTmp, *cmpdata, *lastkept;
unsigned int i;
-   long sort_type = PHP_SORT_REGULAR;
+   long sort_type = PHP_SORT_STRING;
 
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|l", &array, 
&sort_type) == FAILURE) {
return;



-- 
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/array array_multisort_variation11.phpt

2009-05-15 Thread Christopher Jones
sixdFri May 15 16:47:36 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/array   array_multisort_variation11.phpt 
  Log:
  MFH: New array_multisort() test (Simon Westcott)
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_multisort_variation11.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_multisort_variation11.phpt
+++ php-src/ext/standard/tests/array/array_multisort_variation11.phpt
--TEST--
Test array_multisort() function : usage variation - testing with empty array
--FILE--

===DONE===

--EXPECTF--
*** Testing array_multisort() : Testing with empty array ***
bool(true)
===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_3) /ext/standard array.c /ext/standard/tests/array array_multisort_variation11.phpt

2009-05-15 Thread Christopher Jones
sixdFri May 15 16:46:23 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/array   array_multisort_variation11.phpt 

  Modified files:  
/php-src/ext/standard   array.c 
  Log:
  MFH: New array_multisort() test and code comment fix (Simon Westcott)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.37.2.54&r2=1.308.2.21.2.37.2.55&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.21.2.37.2.54 
php-src/ext/standard/array.c:1.308.2.21.2.37.2.55
--- php-src/ext/standard/array.c:1.308.2.21.2.37.2.54   Sun May 10 16:45:21 2009
+++ php-src/ext/standard/array.cFri May 15 16:46:22 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.308.2.21.2.37.2.54 2009/05/10 16:45:21 colder Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.37.2.55 2009/05/15 16:46:22 sixd Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -3789,7 +3789,7 @@
}
}
 
-   /* If all arrays are empty or have only one entry, we don't need to do 
anything. */
+   /* If all arrays are empty we don't need to do anything. */
if (array_size < 1) {
for (k = 0; k < MULTISORT_LAST; k++) {
efree(ARRAYG(multisort_flags)[k]);

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_multisort_variation11.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_multisort_variation11.phpt
+++ php-src/ext/standard/tests/array/array_multisort_variation11.phpt
--TEST--
Test array_multisort() function : usage variation - testing with empty array
--FILE--

===DONE===

--EXPECTF--
*** Testing array_multisort() : Testing with empty array ***
bool(true)
===DONE===



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



[PHP-CVS] cvs: php-src /ext/standard array.c /ext/standard/tests/array array_multisort_variation11.phpt

2009-05-15 Thread Christopher Jones
sixdFri May 15 16:44:51 2009 UTC

  Added files: 
/php-src/ext/standard/tests/array   array_multisort_variation11.phpt 

  Modified files:  
/php-src/ext/standard   array.c 
  Log:
  New array_multisort() test and code comment fix (Simon Westcott)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.476&r2=1.477&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.476 php-src/ext/standard/array.c:1.477
--- php-src/ext/standard/array.c:1.476  Sun May 10 16:45:30 2009
+++ php-src/ext/standard/array.cFri May 15 16:44:51 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.476 2009/05/10 16:45:30 colder Exp $ */
+/* $Id: array.c,v 1.477 2009/05/15 16:44:51 sixd Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -3979,7 +3979,7 @@
}
}
 
-   /* If all arrays are empty or have only one entry, we don't need to do 
anything. */
+   /* If all arrays are empty we don't need to do anything. */
if (array_size < 1) {
for (k = 0; k < MULTISORT_LAST; k++) {
efree(ARRAYG(multisort_flags)[k]);

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_multisort_variation11.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_multisort_variation11.phpt
+++ php-src/ext/standard/tests/array/array_multisort_variation11.phpt
--TEST--
Test array_multisort() function : usage variation - testing with empty array
--FILE--

===DONE===

--EXPECTF--
*** Testing array_multisort() : Testing with empty array ***
bool(true)
===DONE===



-- 
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) / UPGRADING

2009-05-15 Thread Kalle Sommer Nielsen
2009/5/15 Jani Taskinen :
> Kalle Sommer Nielsen kirjoitti:
>>
>> -- zend.ze1_compatibility_mode has been removed.
>> +- zend.ze1_compatibility_mode has been removed. If this ini directive is
>> set +  to on, then an E_ERROR is emitted at startup.
>
> Eh..why does it cause E_FATAL? It doesn't affect anything anymore anyway?

I have no idea, it was just like that when I merged my E_DEPRECATED
patch, its also like that in HEAD for other removed configurations, so
I guess its more of a "remember to update your php.ini" sort of
notice.

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



-- 
Kalle Sommer Nielsen
ka...@php.net

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



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

2009-05-15 Thread Jani Taskinen

Kalle Sommer Nielsen kirjoitti:

-- zend.ze1_compatibility_mode has been removed.
+- zend.ze1_compatibility_mode has been removed. If this ini directive is set 
+  to on, then an E_ERROR is emitted at startup.


Eh..why does it cause E_FATAL? It doesn't affect anything anymore anyway?

--Jani

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



[PHP-CVS] cvs: phpruntests /src rtClassMap.php /src/testcase/preconditions rtIsSectionImplemented.php /src/testcase/sections rtSection.php /src/testcase/sections/executablesections _rtFileExternalS

2009-05-15 Thread Georg Gradwohl
g2  Fri May 15 09:58:22 2009 UTC

  Added files: 
/phpruntests/src/testcase/sections/executablesections   

rtFileExternalSection.php 

_rtFileExternalSection.php 

  Modified files:  
/phpruntests/src/testcase/sections  rtSection.php 
/phpruntests/src/testcase/preconditions rtIsSectionImplemented.php 
/phpruntests/srcrtClassMap.php 
  Log:
  phpruntests - implemented FILE_EXTERNAL-section (not final)
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/sections/rtSection.php?r1=1.9&r2=1.10&diff_format=u
Index: phpruntests/src/testcase/sections/rtSection.php
diff -u phpruntests/src/testcase/sections/rtSection.php:1.9 
phpruntests/src/testcase/sections/rtSection.php:1.10
--- phpruntests/src/testcase/sections/rtSection.php:1.9 Thu May 14 19:56:30 2009
+++ phpruntests/src/testcase/sections/rtSection.php Fri May 15 09:58:21 2009
@@ -24,6 +24,7 @@
 'DEFLATE_POST'  => 'rtDeflatePostSection',
 'POST_RAW'  => 'rtPostRawSection',
 'COOKIE'=> 'rtCookieSection',
+'FILE_EXTERNAL' =>  'rtFileExternalSection',
 'EXPECTHEADERS' => 'rtExpectHeadersSection',
 );
 
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/preconditions/rtIsSectionImplemented.php?r1=1.8&r2=1.9&diff_format=u
Index: phpruntests/src/testcase/preconditions/rtIsSectionImplemented.php
diff -u phpruntests/src/testcase/preconditions/rtIsSectionImplemented.php:1.8 
phpruntests/src/testcase/preconditions/rtIsSectionImplemented.php:1.9
--- phpruntests/src/testcase/preconditions/rtIsSectionImplemented.php:1.8   
Thu May 14 19:56:30 2009
+++ phpruntests/src/testcase/preconditions/rtIsSectionImplemented.php   Fri May 
15 09:58:21 2009
@@ -23,6 +23,7 @@
 'DEFLATE_POST'   => 'rtDeflatePostSection',
 'POST_RAW'=> 'rtPostRawSection',
 'COOKIE'=> 'rtCookieSection',
+'FILE_EXTERNAL' =>  'rtFileExternalSection',
 'EXPECTHEADERS' => 'rtExpectHeadersSection',
 );
 
http://cvs.php.net/viewvc.cgi/phpruntests/src/rtClassMap.php?r1=1.8&r2=1.9&diff_format=u
Index: phpruntests/src/rtClassMap.php
diff -u phpruntests/src/rtClassMap.php:1.8 phpruntests/src/rtClassMap.php:1.9
--- phpruntests/src/rtClassMap.php:1.8  Thu May 14 19:56:30 2009
+++ phpruntests/src/rtClassMap.php  Fri May 15 09:58:21 2009
@@ -73,6 +73,7 @@
 'rtPostRawSection' => 
'testcase/sections/configurationsections/rtPostRawSection.php',
 'rtPostSection'=> 
'testcase/sections/configurationsections/rtPostSection.php',
 'rtCleanSection'   => 
'testcase/sections/executablesections/rtCleanSection.php',
+'rtFileExternalSection'=> 
'testcase/sections/executablesections/rtFileExternalSection.php',
 'rtFileSection'=> 
'testcase/sections/executablesections/rtFileSection.php',
 'rtSkipIfSection'  => 
'testcase/sections/executablesections/rtSkipIfSection.php',
 'rtCreditsSection' => 
'testcase/sections/informationsections/rtCreditsSection.php',

http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/sections/executablesections/rtFileExternalSection.php?view=markup&rev=1.1
Index: 
phpruntests/src/testcase/sections/executablesections/rtFileExternalSection.php
+++ 
phpruntests/src/testcase/sections/executablesections/rtFileExternalSection.php

 * @authorStefan Priebsch 
 * @authorGeorg Gradwohl 
 * @copyright 2009 The PHP Group
 * @license   http://www.php.net/license/3_01.txt PHP License 3.01
 * @link  http://qa.php.net/
 */
class rtFileExternalSection extends rtFileSection
{

public function run(rtPhpTest $testCase, rtRuntestsConfiguration 
$runConfiguration)
{
if ($this->copyExternalFileContent() === true) {

return parent::run($testCase, $runConfiguration);
}

return $this->status;
}


private function copyExternalFileContent()
{
if (sizeof($this->sectionContents) == 1) {

$file = $this->sectionContents[0];

// don't allow tests to retrieve files from anywhere but this 
subdirectory
$file = dirname($this->fileName).'/'.trim(str_replace('..', '', 
$file));

if (file_exists($file)) {

$this->sectionContents[0] = file_get_contents($file);   
 
return true;

} else {

$this->status['fail'] = 'Can not open external file 
'.$file;
}

} else {

$this->status['fail'] = 'One file per testcase permitted.';
}

re

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

2009-05-15 Thread Kalle Sommer Nielsen
kalle   Fri May 15 09:44:09 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcUPGRADING 
  Log:
  Added some more comments about deprecated ini settings
  
http://cvs.php.net/viewvc.cgi/php-src/UPGRADING?r1=1.1.2.3.2.1.2.7&r2=1.1.2.3.2.1.2.8&diff_format=u
Index: php-src/UPGRADING
diff -u php-src/UPGRADING:1.1.2.3.2.1.2.7 php-src/UPGRADING:1.1.2.3.2.1.2.8
--- php-src/UPGRADING:1.1.2.3.2.1.2.7   Thu May  7 06:58:57 2009
+++ php-src/UPGRADING   Fri May 15 09:44:08 2009
@@ -1,4 +1,4 @@
-$Id: UPGRADING,v 1.1.2.3.2.1.2.7 2009/05/07 06:58:57 kalle Exp $
+$Id: UPGRADING,v 1.1.2.3.2.1.2.8 2009/05/15 09:44:08 kalle Exp $
 
 UPGRADE NOTES - PHP 5.3
 
@@ -119,6 +119,17 @@
 
 - All ereg functions are deprecated. Use PCRE (preg_*()) instead.
 
+- The following ini directives will now emit an E_DEPRECATED warning 
+  upon startup if they are activated:
+
+- define_syslog_variables
+- register_globals
+- register_long_arrays
+- safe_mode
+- magic_quotes_gpc
+- magic_quotes_runtime
+- magic_quotes_sybase
+
 ===
 6. Undeprecated
 ===
@@ -183,7 +194,8 @@
 9. Changes in INI directives
 
 
-- zend.ze1_compatibility_mode has been removed.
+- zend.ze1_compatibility_mode has been removed. If this ini directive is set 
+  to on, then an E_ERROR is emitted at startup.
 
 - A new user initialization mechanism and config variables have been added:
   user_ini.filename and user_ini.cache_ttl



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

2009-05-15 Thread Kalle Sommer Nielsen
kalle   Fri May 15 09:10:55 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/json   json.c 
  Log:
  MFH: Fix arginfo
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.9.2.19.2.20&r2=1.9.2.19.2.21&diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.9.2.19.2.20 
php-src/ext/json/json.c:1.9.2.19.2.21
--- php-src/ext/json/json.c:1.9.2.19.2.20   Thu May 14 22:02:08 2009
+++ php-src/ext/json/json.c Fri May 15 09:10:55 2009
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: json.c,v 1.9.2.19.2.20 2009/05/14 22:02:08 scottmac Exp $ */
+/* $Id: json.c,v 1.9.2.19.2.21 2009/05/15 09:10:55 kalle Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -57,6 +57,7 @@
 ZEND_BEGIN_ARG_INFO_EX(arginfo_json_decode, 0, 0, 1)
ZEND_ARG_INFO(0, json)
ZEND_ARG_INFO(0, assoc)
+   ZEND_ARG_INFO(0, depth)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO(arginfo_json_last_error, 0)



-- 
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-15 Thread Kalle Sommer Nielsen
kalle   Fri May 15 09:10:01 2009 UTC

  Modified files:  
/php-src/ext/json   json.c 
  Log:
  Fix arginfo
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.52&r2=1.53&diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.52 php-src/ext/json/json.c:1.53
--- php-src/ext/json/json.c:1.52Thu May 14 22:00:38 2009
+++ php-src/ext/json/json.c Fri May 15 09:10:01 2009
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: json.c,v 1.52 2009/05/14 22:00:38 scottmac Exp $ */
+/* $Id: json.c,v 1.53 2009/05/15 09:10:01 kalle Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -57,6 +57,7 @@
 ZEND_BEGIN_ARG_INFO_EX(arginfo_json_decode, 0, 0, 1)
ZEND_ARG_INFO(0, json)
ZEND_ARG_INFO(0, assoc)
+   ZEND_ARG_INFO(0, depth)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO(arginfo_json_last_error, 0)
@@ -475,7 +476,7 @@
 }
 /* }}} */
 
-/* {{{ proto string json_encode(mixed data) U
+/* {{{ proto string json_encode(mixed data [, long options]) U
Returns the JSON representation of a value */
 static PHP_FUNCTION(json_encode)
 {



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