[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2008-08-17 Thread changelog
changelog   Mon Aug 18 01:32:55 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3141r2=1.3142diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.3141 php-src/ChangeLog:1.3142
--- php-src/ChangeLog:1.3141Sun Aug 17 01:32:21 2008
+++ php-src/ChangeLog   Mon Aug 18 01:32:54 2008
@@ -1,3 +1,110 @@
+2008-08-17  Felipe Pena  [EMAIL PROTECTED]
+
+* ext/standard/array.c
+  ext/standard/tests/array/array_merge.phpt
+  ext/standard/tests/array/array_merge_error.phpt
+  ext/standard/tests/array/array_merge_recursive_error.phpt
+  ext/standard/tests/array/array_push.phpt
+  ext/standard/tests/array/array_push_error1.phpt
+  ext/standard/tests/array/array_push_variation1.phpt
+  ext/standard/tests/array/array_unshift.phpt
+  ext/standard/tests/array/array_unshift_error.phpt
+  ext/standard/tests/array/array_unshift_variation1.phpt
+  ext/standard/tests/array/compact_error.phpt:
+  - New parameter parsing API
+
+2008-08-17  Arnaud Le Blanc  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  NEWS
+  ZendEngine2/zend_ini_scanner.l
+  ext/standard/tests/general_functions/parse_ini_file.phpt:
+  MFH: Allow underscore at start of labels as underscore has no meaning 
here
+  (fixes #44842)
+
+* ZendEngine2/zend_ini_scanner.c
+  ZendEngine2/zend_ini_scanner.c
+  ZendEngine2/zend_ini_scanner_defs.h
+  ZendEngine2/zend_ini_scanner_defs.h:
+  generated zend_ini_scanner.c
+
+* ZendEngine2/zend_ini_scanner.l
+  ext/standard/tests/general_functions/parse_ini_file.phpt:
+  Allow underscore at start of labels as underscore has no meaning here
+  (fixes #44842)
+
+* (PHP_5_3)
+  NEWS
+  ZendEngine2/zend_ini_scanner.c
+  ZendEngine2/zend_ini_scanner.l
+  ZendEngine2/zend_ini_scanner_defs.h:
+  MFH: Fixed #45384 (parse_ini_file will result in parse error with no
+  trailing
+   newline)
+
+* ZendEngine2/zend_ini_scanner.c
+  ZendEngine2/zend_ini_scanner.l
+  ZendEngine2/zend_ini_scanner_defs.h:
+  Fixed #45384 (parse_ini_file will result in parse error with no trailing
+   newline)
+
+2008-08-17  Jani Taskinen  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  NEWS:
+  fix news
+
+2008-08-17  Felipe Pena  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/ming/ming.c:
+  - Fix build
+
+2008-08-17  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* ext/standard/tests/general_functions/phpinfo.phpt:
+  - add %a for Compiler/architecture
+
+* (PHP_5_3)
+  ext/standard/exec.c
+  ext/standard/tests/general_functions/escapeshellcmd-win32.phpt:
+  - [DOC] MFH: improve fix for #43261 for % and 
+
+* ext/standard/exec.c
+  ext/standard/tests/general_functions/escapeshellcmd-win32.phpt:
+  - [DOC] improve fix for #43261 for % and 
+
+* (PHP_5_3)
+  ext/standard/tests/general_functions/bug41518.phpt:
+  - MFH: fix test (portable), use . as basedir and create the tmp dir in 
the
+  test directory
+
+* ext/standard/tests/general_functions/bug41518.phpt:
+  - fix test (portable), use . as basedir and create the tmp dir in the 
test
+  directory
+
+* ext/standard/tests/file/file.inc
+  ext/standard/tests/file/stat_basic-win32.phpt
+  ext/standard/tests/file/stat_variation8-win32.phpt
+  ext/standard/tests/file/tempnam_variation3-win32.phpt
+  ext/standard/tests/file/touch.phpt:
+  - MFB:
+   - fix or improve tests
+   - add dump of the array_diff for compare_stats
+
+* (PHP_5_3)
+  ext/standard/tests/file/file.inc
+  ext/standard/tests/file/stat_basic-win32.phpt
+  ext/standard/tests/file/stat_variation8-win32.phpt
+  ext/standard/tests/file/tempnam_variation3-win32.phpt
+  ext/standard/tests/file/touch.phpt:
+  - fix or improve tests
+  - add dump of the array_diff for compare_stats
+
+* (PHP_5_3)
+  NEWS:
+  - fixes, portability and improvements for stat/file*/touch windows entry
+
 2008-08-16  Felipe Pena  [EMAIL PROTECTED]
 
 * (PHP_5_3)
@@ -2462,7 +2569,7 @@
 
 * sapi/litespeed/lsapi_main.c
   sapi/litespeed/lsapilib.c:
-  - Added missing $Id: ChangeLog,v 1.3141 2008/08/17 01:32:21 changelog 
Exp $ tags and nuked c++ comments
+  - Added missing $Id: ChangeLog,v 1.3142 2008/08/18 01:32:54 changelog 
Exp $ tags and nuked c++ comments
 
 * (PHP_5_3)
   ext/intl/locale/locale.c




[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2008-08-17 Thread changelog
changelog   Mon Aug 18 01:33:08 2008 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1362r2=1.1363diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1362 ZendEngine2/ChangeLog:1.1363
--- ZendEngine2/ChangeLog:1.1362Sat Aug 16 01:32:32 2008
+++ ZendEngine2/ChangeLog   Mon Aug 18 01:33:07 2008
@@ -1,3 +1,34 @@
+2008-08-17  Arnaud Le Blanc  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  zend_ini_scanner.l:
+  MFH: Allow underscore at start of labels as underscore has no meaning 
here
+  (fixes #44842)
+
+* zend_ini_scanner.c
+  zend_ini_scanner.c
+  zend_ini_scanner_defs.h
+  zend_ini_scanner_defs.h:
+  generated zend_ini_scanner.c
+
+* zend_ini_scanner.l:
+  Allow underscore at start of labels as underscore has no meaning here
+  (fixes #44842)
+
+* (PHP_5_3)
+  zend_ini_scanner.c
+  zend_ini_scanner.l
+  zend_ini_scanner_defs.h:
+  MFH: Fixed #45384 (parse_ini_file will result in parse error with no
+  trailing
+   newline)
+
+* zend_ini_scanner.c
+  zend_ini_scanner.l
+  zend_ini_scanner_defs.h:
+  Fixed #45384 (parse_ini_file will result in parse error with no trailing
+   newline)
+
 2008-08-15  Felipe Pena  [EMAIL PROTECTED]
 
 * zend.c
@@ -25662,7 +25693,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1362 2008/08/16 01:32:32 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1363 2008/08/18 01:33:07 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -27386,7 +27417,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1362 2008/08/16 01:32:32 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1363 2008/08/18 01:33:07 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 




[PHP-CVS] cvs: CVSROOT / avail

2008-08-17 Thread Marcus Boerger
helly   Sun Aug 17 09:27:18 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  avail
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1435r2=1.1436diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1435 CVSROOT/avail:1.1436
--- CVSROOT/avail:1.1435Tue Aug 12 13:39:42 2008
+++ CVSROOT/avail   Sun Aug 17 09:27:16 2008
@@ -36,7 +36,7 @@
 avail|loudi|phd
 
 # People who work on the Engine - not people with just tests access
-avail|andi,zeev,andrei,stas,sterling,sascha,derick,sebastian,phanto,jani,hirokawa,fujimoto,rvenkat,sesser,kalowsky,iliaa,hyanantha,georg,wez,edink,helly,hholzgra,imajes,gschlossnagle,moriyoshi,dmitry,jon,pollita,tony2001,johannes,bjori,davidw,nicholsr,wharmby,felipe,robinf,scottmac,nlopess,mattwil,colder|Zend,ZendEngine2,TSRM
+avail|andi,zeev,andrei,stas,sterling,sascha,derick,sebastian,phanto,jani,hirokawa,fujimoto,rvenkat,sesser,kalowsky,iliaa,hyanantha,georg,wez,edink,helly,hholzgra,imajes,gschlossnagle,moriyoshi,dmitry,jon,pollita,tony2001,johannes,bjori,davidw,nicholsr,wharmby,felipe,robinf,scottmac,nlopess,mattwil,colder,lbarnaud|Zend,ZendEngine2,TSRM
 
 # The PHP Documentation Group maintains the documentation and its
 # translations.



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



Re: [PHP-CVS] cvs: CVSROOT / avail

2008-08-17 Thread Marcus Boerger
Hello Arnaud, hi all,

  the submit message got lost: Upgrade Arnaud, so that he may submit his
  ini parsing fix.

marcus

Sunday, August 17, 2008, 11:27:18 AM, you wrote:

 helly   Sun Aug 17 09:27:18 2008 UTC

   Modified files:  
 /CVSROOTavail 
   Log:
   avail
   
 http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1435r2=1.1436diff_format=u
 Index: CVSROOT/avail
 diff -u CVSROOT/avail:1.1435 CVSROOT/avail:1.1436
 --- CVSROOT/avail:1.1435Tue Aug 12 13:39:42 2008
 +++ CVSROOT/avail   Sun Aug 17 09:27:16 2008
 @@ -36,7 +36,7 @@
  avail|loudi|phd
  
  # People who work on the Engine - not people with just tests access
 -avail|andi,zeev,andrei,stas,sterling,sascha,derick,sebastian,phanto,jani,hirokawa,fujimoto,rvenkat,sesser,kalowsky,iliaa,hyanantha,georg,wez,edink,helly,hholzgra,imajes,gschlossnagle,moriyoshi,dmitry,jon,pollita,tony2001,johannes,bjori,davidw,nicholsr,wharmby,felipe,robinf,scottmac,nlopess,mattwil,colder|Zend,ZendEngine2,TSRM
 +avail|andi,zeev,andrei,stas,sterling,sascha,derick,sebastian,phanto,jani,hirokawa,fujimoto,rvenkat,sesser,kalowsky,iliaa,hyanantha,georg,wez,edink,helly,hholzgra,imajes,gschlossnagle,moriyoshi,dmitry,jon,pollita,tony2001,johannes,bjori,davidw,nicholsr,wharmby,felipe,robinf,scottmac,nlopess,mattwil,colder,lbarnaud|Zend,ZendEngine2,TSRM
  
  # The PHP Documentation Group maintains the documentation and its
  # translations.






Best regards,
 Marcus


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

2008-08-17 Thread Pierre-Alain Joye
pajoye  Sun Aug 17 11:01:23 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  - fixes, portability and improvements for stat/file*/touch windows entry
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.272r2=1.2027.2.547.2.965.2.273diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.272 
php-src/NEWS:1.2027.2.547.2.965.2.273
--- php-src/NEWS:1.2027.2.547.2.965.2.272   Sat Aug 16 10:57:54 2008
+++ php-src/NEWSSun Aug 17 11:01:23 2008
@@ -15,7 +15,8 @@
 - Added stream_context_set_default() function. (Davey Shafik)
 - Added optional is_xhtml parameter to nl2br() which makes the function
   output br when false and br / when true (FR #34381). (Kalle)
-
+- Improved Windows support(incl. 2008/Vista) and portability for stat, touch
+  filemtime, filesize and related functions. (Pierre)
 - Fixed a bug causing miscalculations with the last weekday of n month
   relative time string. (Derick)
 
@@ -29,6 +30,8 @@
 - Fixed bug #45636 (fileinfo ext duplicate strndup). (Derick)
 - Fixed bug #45545 (DateInterval has 4 char limitation for ISO durations).
   (Derick)
+- Fixed bug #45447 (Filesystem time functions on Vista and server 2008).
+  (Pierre)
 - Fixed bug #45044 (relative paths not resolved correctly). (Dmitry)
 - Fixed bug #44925 (preg_grep() modifies input array). (Nuno)
 - Fixed bug #44100 (Inconsistent handling of static array declarations with
@@ -37,6 +40,7 @@
   directory unaccessible). (Dmitry)
 - Fixed bug #43008 (php://filter uris ignore url encoded filternames and can't
   handle slashes). (Arnaud)
+- Fixed bug #35980 (touch() works on files but not on directories). (Pierre)
 
 01 Aug 2008, PHP 5.3.0 Alpha 1
 - Upgraded bundled PCRE to version 7.7. (Nuno)



-- 
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/tests/file file.inc stat_basic-win32.phpt stat_variation8-win32.phpt tempnam_variation3-win32.phpt touch.phpt

2008-08-17 Thread Pierre-Alain Joye
pajoye  Sun Aug 17 11:04:17 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/filefile.inc stat_basic-win32.phpt 
stat_variation8-win32.phpt 
tempnam_variation3-win32.phpt 
touch.phpt 
  Log:
  - fix or improve tests
  - add dump of the array_diff for compare_stats
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file.inc?r1=1.1.2.6r2=1.1.2.6.2.1diff_format=u
Index: php-src/ext/standard/tests/file/file.inc
diff -u php-src/ext/standard/tests/file/file.inc:1.1.2.6 
php-src/ext/standard/tests/file/file.inc:1.1.2.6.2.1
--- php-src/ext/standard/tests/file/file.inc:1.1.2.6Thu Jul 26 13:38:24 2007
+++ php-src/ext/standard/tests/file/file.incSun Aug 17 11:04:16 2008
@@ -638,6 +638,8 @@
   // if the result is false(i.e values are not as expected), 
   // dump the stat array so that easy to figure out the error
   if ( $result == false ) {
+echo \n Dumping diff between stat array 1 and 2...\n;
+var_dump(array_diff($stat1, $stat2));
 echo \n Dumping stat array 1...\n;
 var_dump($stat1);
 echo \n Dumping stat array 2...\n;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/stat_basic-win32.phpt?r1=1.1.2.1.2.1r2=1.1.2.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/stat_basic-win32.phpt
diff -u php-src/ext/standard/tests/file/stat_basic-win32.phpt:1.1.2.1.2.1 
php-src/ext/standard/tests/file/stat_basic-win32.phpt:1.1.2.1.2.2
--- php-src/ext/standard/tests/file/stat_basic-win32.phpt:1.1.2.1.2.1   Mon Nov 
 5 17:43:21 2007
+++ php-src/ext/standard/tests/file/stat_basic-win32.phpt   Sun Aug 17 
11:04:16 2008
@@ -80,15 +80,15 @@
   [0]=
   int(%d)
   [1]=
-  int(%d)
+  int(0)
   [2]=
   int(%d)
   [3]=
   int(%d)
   [4]=
-  int(%d)
+  int(0)
   [5]=
-  int(%d)
+  int(0)
   [6]=
   int(%d)
   [7]=
@@ -106,15 +106,15 @@
   [dev]=
   int(%d)
   [ino]=
-  int(%d)
+  int(0)
   [mode]=
   int(%d)
   [nlink]=
   int(%d)
   [uid]=
-  int(%d)
+  int(0)
   [gid]=
-  int(%d)
+  int(0)
   [rdev]=
   int(%d)
   [size]=
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/stat_variation8-win32.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u
Index: php-src/ext/standard/tests/file/stat_variation8-win32.phpt
diff -u php-src/ext/standard/tests/file/stat_variation8-win32.phpt:1.1.2.2.2.1 
php-src/ext/standard/tests/file/stat_variation8-win32.phpt:1.1.2.2.2.2
--- php-src/ext/standard/tests/file/stat_variation8-win32.phpt:1.1.2.2.2.1  
Mon Nov  5 17:43:21 2007
+++ php-src/ext/standard/tests/file/stat_variation8-win32.phpt  Sun Aug 17 
11:04:16 2008
@@ -34,7 +34,7 @@
 $file_handle = fopen($filename, w);
 fclose($file_handle);
 
-clearstatcache();
+clearstatcache(true, $filename);
 $old_stat = stat($filename);
 // clear the cache
 sleep(2);
@@ -44,7 +44,7 @@
 var_dump( ftruncate($file_handle, 512) );  // truncate it
 fclose($file_handle);
 
-clearstatcache();
+clearstatcache(true, $filename);
 $new_stat = stat($filename);
 
 // compare self stats
@@ -56,7 +56,7 @@
 var_dump( compare_stats($old_stat, $new_stat, $affected_members, '!=') );
 
 // clear the stat
-clearstatcache();  // clear previous size value in cache
+clearstatcache(true, $filename);  // clear previous size value in cache
 
 echo \n*** Done ***;
 ?
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u
Index: php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt
diff -u php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt:1.1.2.2 
php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt:1.1.2.2.2.1
--- php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt:1.1.2.2   
Fri Aug 10 12:11:46 2007
+++ php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt   Sun Aug 
17 11:04:16 2008
@@ -78,9 +78,10 @@
 File permissions are = 100666
 -- Iteration 7 --
 
-Notice: Array to string conversion in %s on line %d
-File name is = %s
-File permissions are = 100666
+Warning: tempnam() expects parameter 2 to be string, array given in %s on line 
%d
+-- File is not created --
+
+Warning: unlink(): %s in %s on line %d
 -- Iteration 8 --
 File name is = %s
 File permissions are = 100666
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/touch.phpt?r1=1.1.2.3.2.1r2=1.1.2.3.2.2diff_format=u
Index: php-src/ext/standard/tests/file/touch.phpt
diff -u php-src/ext/standard/tests/file/touch.phpt:1.1.2.3.2.1 
php-src/ext/standard/tests/file/touch.phpt:1.1.2.3.2.2
--- php-src/ext/standard/tests/file/touch.phpt:1.1.2.3.2.1  Mon Nov  5 
17:43:21 2007
+++ php-src/ext/standard/tests/file/touch.phpt  Sun Aug 17 11:04:16 2008
@@ -42,7 +42,7 @@
 bool(true)
 int(100)
 bool(true)
-int(100)
+int(-100)
 
 Warning: touch(): Unable to create file /no/such/file/or/directory because No 
such file or directory in %s on line %d
 bool(false)



-- 

[PHP-CVS] cvs: php-src /ext/standard/tests/file file.inc stat_basic-win32.phpt stat_variation8-win32.phpt tempnam_variation3-win32.phpt touch.phpt

2008-08-17 Thread Pierre-Alain Joye
pajoye  Sun Aug 17 11:10:52 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/filefile.inc stat_basic-win32.phpt 
stat_variation8-win32.phpt 
tempnam_variation3-win32.phpt 
touch.phpt 
  Log:
  - MFB:
   - fix or improve tests
   - add dump of the array_diff for compare_stats
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file.inc?r1=1.7r2=1.8diff_format=u
Index: php-src/ext/standard/tests/file/file.inc
diff -u php-src/ext/standard/tests/file/file.inc:1.7 
php-src/ext/standard/tests/file/file.inc:1.8
--- php-src/ext/standard/tests/file/file.inc:1.7Thu Jul 26 13:55:42 2007
+++ php-src/ext/standard/tests/file/file.incSun Aug 17 11:10:52 2008
@@ -279,7 +279,7 @@
   if ( $content_type == empty ) {
 $return_value['filled'] = $count;
   } else {
-//fill the file with specifiec type of data and size
+// fill the file with specifiec type of data and size
 $tmp_name_suffix = $name_suffix;
 for($loop_counter = 1; $loop_counter = $count; $loop_counter ++) {
   $filename = $file_path./.$name_prefix.$tmp_name_suffix.$file_extension;
@@ -577,7 +577,7 @@
   $stat2 = second stat array
   $op = type of the comparision to be perform between elements of stat1 and 
stat2
 != compare for not equal
-== comprae for equality
+== compare for equality
   if each element of stat1 is  than stat2
   if each element of stat1 is  than stat2
   $fields = contains the key of the elements that needs to be compared. 
@@ -585,7 +585,10 @@
   $flag = specify true to dump the stat1 and stat2 
 */
 
-$all_stat_keys = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, dev, ino, 
mode, nlink, uid, gid, rdev, size, atime, mtime, ctime, 
blksize, blocks);
+$all_stat_keys = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 
+   dev, ino, mode, nlink, uid, gid,
+   rdev, size, atime, mtime, ctime,
+   blksize, blocks);
 
 function compare_stats($stat1, $stat2, $fields, $op = ==, $flag = false ) {
   // dump the stat if requested
@@ -635,6 +638,8 @@
   // if the result is false(i.e values are not as expected),
   // dump the stat array so that easy to figure out the error
   if ( $result == false ) {
+echo \n Dumping diff between stat array 1 and 2...\n;
+var_dump(array_diff($stat1, $stat2));
 echo \n Dumping stat array 1...\n;
 var_dump($stat1);
 echo \n Dumping stat array 2...\n;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/stat_basic-win32.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/file/stat_basic-win32.phpt
diff -u php-src/ext/standard/tests/file/stat_basic-win32.phpt:1.3 
php-src/ext/standard/tests/file/stat_basic-win32.phpt:1.4
--- php-src/ext/standard/tests/file/stat_basic-win32.phpt:1.3   Tue May 27 
09:34:54 2008
+++ php-src/ext/standard/tests/file/stat_basic-win32.phpt   Sun Aug 17 
11:10:52 2008
@@ -80,15 +80,15 @@
   [0]=
   int(%d)
   [1]=
-  int(%d)
+  int(0)
   [2]=
   int(%d)
   [3]=
   int(%d)
   [4]=
-  int(%d)
+  int(0)
   [5]=
-  int(%d)
+  int(0)
   [6]=
   int(%d)
   [7]=
@@ -106,15 +106,15 @@
   [udev]=
   int(%d)
   [uino]=
-  int(%d)
+  int(0)
   [umode]=
   int(%d)
   [unlink]=
   int(%d)
   [uuid]=
-  int(%d)
+  int(0)
   [ugid]=
-  int(%d)
+  int(0)
   [urdev]=
   int(%d)
   [usize]=
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/stat_variation8-win32.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/stat_variation8-win32.phpt
diff -u php-src/ext/standard/tests/file/stat_variation8-win32.phpt:1.2 
php-src/ext/standard/tests/file/stat_variation8-win32.phpt:1.3
--- php-src/ext/standard/tests/file/stat_variation8-win32.phpt:1.2  Tue May 
27 09:34:54 2008
+++ php-src/ext/standard/tests/file/stat_variation8-win32.phpt  Sun Aug 17 
11:10:52 2008
@@ -34,7 +34,7 @@
 $file_handle = fopen($filename, w);
 fclose($file_handle);
 
-clearstatcache();
+clearstatcache(true, $filename);
 $old_stat = stat($filename);
 // clear the cache
 sleep(2);
@@ -44,7 +44,7 @@
 var_dump( ftruncate($file_handle, 512) );  // truncate it
 fclose($file_handle);
 
-clearstatcache();
+clearstatcache(true, $filename);
 $new_stat = stat($filename);
 
 // compare self stats
@@ -56,7 +56,7 @@
 var_dump( compare_stats($old_stat, $new_stat, $affected_members, '!=') );
 
 // clear the stat
-clearstatcache();  // clear previous size value in cache
+clearstatcache(true, $filename);  // clear previous size value in cache
 
 echo \n*** Done ***;
 ?
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt?r1=1.4r2=1.5diff_format=u
Index: php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt
diff -u php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt:1.4 
php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt:1.5
--- 

Re: [PHP-CVS] cvs: php-src /ext/hash CREDITS config.m4 hash.c /ext/hash/tests mhash_001.phpt mhash_002.phpt mhash_003.phpt skip_mhash.inc /ext/mhash config.m4 mhash.c mhash.dsp php_mhash.h /ext/mhash/

2008-08-17 Thread Jani Taskinen

Pierre Joye kirjoitti:

Hi,

On Sat, Aug 16, 2008 at 11:56 PM, Jani Taskinen [EMAIL PROTECTED] wrote:


Will $PHP_MHASH ever be anything here?
afaict ext/hash cannot be disabled after this change

-Hannes


I wasn't paying attention to this..what was done for ext/mhash/config.m4? :)
And == is not correct. It's just one = in m4.

Anyway, IMO, you could simply move ext/mhash/*mhash.* (.c and .h files :) to
ext/hash and simply include them with the hash sources. There's really no
need anymore for the extra directory.


The idea behind keeping mhash was to allow:

if (extension_loaded('mhash'))

I did not not test the current version but what Jani suggests should
work. You can have two extension(..) in config.* (we do it for OCI8
with oci8_11g and oci8).


You don't need to have multiple PHP_NEW_EXTENSION lines in config*.m4's to 
enable multiple extensions and is not really useful either since you break the 
ext_shared stuff, etc. If you do that anywhere, you're doing something wrong.


--Jani

--
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/mhash/tests .cvsignore

2008-08-17 Thread Jani Taskinen
janiSun Aug 17 12:10:47 2008 UTC

  Removed files:   (Branch: PHP_5_3)
/php-src/ext/mhash/tests.cvsignore 
  Log:
  - unneeded file
  



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



[PHP-CVS] cvs: php-src /ext/mhash/tests .cvsignore

2008-08-17 Thread Jani Taskinen
janiSun Aug 17 12:28:41 2008 UTC

  Removed files:   
/php-src/ext/mhash/tests.cvsignore 
  Log:
  - Remove unnecessary file
  



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



Re: [PHP-CVS] cvs: php-src /ext/hash CREDITS config.m4 hash.c /ext/hash/tests mhash_001.phpt mhash_002.phpt mhash_003.phpt skip_mhash.inc /ext/mhash config.m4 mhash.c mhash.dsp php_mhash.h /ext/mhash/

2008-08-17 Thread Pierre Joye
hi,

On Sun, Aug 17, 2008 at 2:09 PM, Jani Taskinen [EMAIL PROTECTED] wrote:

 You don't need to have multiple PHP_NEW_EXTENSION lines in config*.m4's to
 enable multiple extensions and is not really useful either since you break
 the ext_shared stuff, etc. If you do that anywhere, you're doing something
 wrong.

I was not saying that, I only stated why the other ext has been kept.
If you can do it in a clean(er) way, please go ahead :)

Cheers,
-- 
Pierre

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

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



[PHP-CVS] cvs: php-src /ext/standard/tests/general_functions bug41518.phpt

2008-08-17 Thread Pierre-Alain Joye
pajoye  Sun Aug 17 13:07:06 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/general_functions   bug41518.phpt 
  Log:
  - fix test (portable), use . as basedir and create the tmp dir in the test 
directory
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug41518.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/general_functions/bug41518.phpt
diff -u php-src/ext/standard/tests/general_functions/bug41518.phpt:1.3 
php-src/ext/standard/tests/general_functions/bug41518.phpt:1.4
--- php-src/ext/standard/tests/general_functions/bug41518.phpt:1.3  Tue May 
27 00:04:31 2008
+++ php-src/ext/standard/tests/general_functions/bug41518.phpt  Sun Aug 17 
13:07:06 2008
@@ -3,13 +3,14 @@
 --SKIPIF--
 ?php
 /* let's use /tmp here */
-$tmp_dir = /tmp;
-if (!is_dir($tmp_dir) || realpath($tmp_dir) !== $tmp_dir) {
+$tmp_dir = __DIR__ . '/tmp';
+mkdir($tmp_dir);
+if (!is_dir($tmp_dir)) {
die(skip);
 }
 ?
 --INI--
-open_basedir=/tmp/
+open_basedir=.
 --FILE--
 ?php
 
@@ -21,7 +22,7 @@
 var_dump(file_exists($tmp_file.nosuchfile)); //doesn't exist
 
 @unlink($tmp_file);
-
[EMAIL PROTECTED]($tmp_dir);
 echo Done\n;
 ?
 --EXPECT--



-- 
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/tests/general_functions bug41518.phpt

2008-08-17 Thread Pierre-Alain Joye
pajoye  Sun Aug 17 13:07:39 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/general_functions   bug41518.phpt 
  Log:
  - MFH: fix test (portable), use . as basedir and create the tmp dir in the 
test directory
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug41518.phpt?r1=1.1.2.3r2=1.1.2.3.2.1diff_format=u
Index: php-src/ext/standard/tests/general_functions/bug41518.phpt
diff -u php-src/ext/standard/tests/general_functions/bug41518.phpt:1.1.2.3 
php-src/ext/standard/tests/general_functions/bug41518.phpt:1.1.2.3.2.1
--- php-src/ext/standard/tests/general_functions/bug41518.phpt:1.1.2.3  Mon Jun 
 4 17:18:51 2007
+++ php-src/ext/standard/tests/general_functions/bug41518.phpt  Sun Aug 17 
13:07:39 2008
@@ -3,17 +3,18 @@
 --SKIPIF--
 ?php
 /* let's use /tmp here */
-$tmp_dir = /tmp;
-if (!is_dir($tmp_dir) || realpath($tmp_dir) !== $tmp_dir) {
+$tmp_dir = __DIR__ . '/tmp';
+mkdir($tmp_dir);
+if (!is_dir($tmp_dir)) {
die(skip);
 }
 ?
 --INI--
-open_basedir=/tmp/
+open_basedir=.
 --FILE--
 ?php
 
-$tmp_dir = /tmp;
+$tmp_dir =  __DIR__ . '/tmp';
 $tmp_file = $tmp_dir./bug41418.tmp;
 
 touch($tmp_file);
@@ -21,6 +22,7 @@
 var_dump(file_exists($tmp_file.nosuchfile)); //doesn't exist
 
 @unlink($tmp_file);
[EMAIL PROTECTED]($tmp_dir);
 
 echo Done\n;
 ?



-- 
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/tests/file file.inc

2008-08-17 Thread Pierre-Alain Joye
pajoye  Sun Aug 17 14:32:41 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/filefile.inc 
  Log:
  - MFH: typo and inline doc fix
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file.inc?r1=1.1.2.6.2.1r2=1.1.2.6.2.2diff_format=u
Index: php-src/ext/standard/tests/file/file.inc
diff -u php-src/ext/standard/tests/file/file.inc:1.1.2.6.2.1 
php-src/ext/standard/tests/file/file.inc:1.1.2.6.2.2
--- php-src/ext/standard/tests/file/file.inc:1.1.2.6.2.1Sun Aug 17 
11:04:16 2008
+++ php-src/ext/standard/tests/file/file.incSun Aug 17 14:32:41 2008
@@ -7,7 +7,7 @@
delete_links() : delete links 
fill_files()   : fill file with specified contents 
change_file_perms() : Change permission of files 
-   fill_buffer()  : fills buffer with specified contents
+   fill_buffer(): fill buffer with specified contents
compare_self_stat() : compares the first 13 elements of the 
 stat with the corresponding named key values of
 the same stat.
@@ -80,7 +80,7 @@
 }
 
 /*
- Function : bool fill_file(resource $file_handle, string $fill_type, string 
$file_size);
+ Function : bool fill_file(resource $file_handle, string $fill_type, int 
$file_size);
  Description: Fills the file with data as specified with requested size.
$file_handle = file handle, opened with write options,
$fill_type: 



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



[PHP-CVS] cvs: php-src /ext/standard exec.c /ext/standard/tests/general_functions escapeshellcmd-win32.phpt

2008-08-17 Thread Pierre-Alain Joye
pajoye  Sun Aug 17 15:23:23 2008 UTC

  Modified files:  
/php-src/ext/standard   exec.c 
/php-src/ext/standard/tests/general_functions   

escapeshellcmd-win32.phpt 
  Log:
  - [DOC] improve fix for #43261 for % and 
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/exec.c?r1=1.135r2=1.136diff_format=u
Index: php-src/ext/standard/exec.c
diff -u php-src/ext/standard/exec.c:1.135 php-src/ext/standard/exec.c:1.136
--- php-src/ext/standard/exec.c:1.135   Tue Jul 22 21:56:25 2008
+++ php-src/ext/standard/exec.c Sun Aug 17 15:23:22 2008
@@ -16,7 +16,7 @@
| Ilia Alshanetsky [EMAIL PROTECTED] |
+--+
  */
-/* $Id: exec.c,v 1.135 2008/07/22 21:56:25 scottmac Exp $ */
+/* $Id: exec.c,v 1.136 2008/08/17 15:23:22 pajoye Exp $ */
 
 #include stdio.h
 #include php.h
@@ -272,9 +272,9 @@
}
 
switch (str[x]) {
+#ifndef PHP_WIN32
case '':
case '\'':
-#ifndef PHP_WIN32
if (!p  (p = memchr(str + x + 1, str[x], l - 
x - 1))) {
/* noop */
} else if (p  *p == str[x]) {
@@ -285,7 +285,9 @@
cmd[y++] = str[x];
break;
 #else
-   /* This is Windows specific for enviromental variables 
*/
+   /* % is Windows specific for enviromental variables, 
^%PATH% will 
+   output PATH whil ^%PATH^% not. escapeshellcmd 
will escape all %.
+   */
case '%':
cmd[y++] = ' ';
break;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt
diff -u 
php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt:1.1 
php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt:1.2
--- php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt:1.1  
Tue Jul 22 16:18:37 2008
+++ php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt  
Sun Aug 17 15:23:23 2008
@@ -16,7 +16,8 @@
'()[]{}$',
'%^',
'#;`|*?',
-   '~\\'
+   '~\\',
+   '%NOENV%'
 );
 
 $count = 1;
@@ -38,9 +39,11 @@
 -- Test 4 --
 string(14) ^(^)^[^]^{^}^$
 -- Test 5 --
-string(2) ^^
+string(4) ^%^^
 -- Test 6 --
 string(14) ^#^^;^`^|^*^?
 -- Test 7 --
 string(8) ^~^^^\
+-- Test 8 --
+string(9) ^%NOENV^%
 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 exec.c /ext/standard/tests/general_functions escapeshellcmd-win32.phpt

2008-08-17 Thread Pierre-Alain Joye
pajoye  Sun Aug 17 15:23:45 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   exec.c 
/php-src/ext/standard/tests/general_functions   

escapeshellcmd-win32.phpt 
  Log:
  - [DOC] MFH: improve fix for #43261 for % and 
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/exec.c?r1=1.113.2.3.2.1.2.11r2=1.113.2.3.2.1.2.12diff_format=u
Index: php-src/ext/standard/exec.c
diff -u php-src/ext/standard/exec.c:1.113.2.3.2.1.2.11 
php-src/ext/standard/exec.c:1.113.2.3.2.1.2.12
--- php-src/ext/standard/exec.c:1.113.2.3.2.1.2.11  Tue Jul 22 21:53:53 2008
+++ php-src/ext/standard/exec.c Sun Aug 17 15:23:45 2008
@@ -16,7 +16,7 @@
| Ilia Alshanetsky [EMAIL PROTECTED] |
+--+
  */
-/* $Id: exec.c,v 1.113.2.3.2.1.2.11 2008/07/22 21:53:53 scottmac Exp $ */
+/* $Id: exec.c,v 1.113.2.3.2.1.2.12 2008/08/17 15:23:45 pajoye Exp $ */
 
 #include stdio.h
 #include php.h
@@ -287,9 +287,9 @@
}
 
switch (str[x]) {
+#ifndef PHP_WIN32
case '':
case '\'':
-#ifndef PHP_WIN32
if (!p  (p = memchr(str + x + 1, str[x], l - 
x - 1))) {
/* noop */
} else if (p  *p == str[x]) {
@@ -300,10 +300,12 @@
cmd[y++] = str[x];
break;
 #else
-   /* This is Windows specific for enviromental variables 
*/
+   /* % is Windows specific for enviromental variables, 
^%PATH% will 
+   output PATH whil ^%PATH^% not. escapeshellcmd 
will escape all %.
+   */
case '%':
-   cmd[y++] = ' ';
-   break;
+   case '':
+   case '\'':
 #endif
case '#': /* This is character-set independent */
case '':
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt
diff -u 
php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt:1.1.2.2 
php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt:1.1.2.3
--- 
php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt:1.1.2.2  
Tue Jul 22 16:21:16 2008
+++ php-src/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt  
Sun Aug 17 15:23:45 2008
@@ -16,7 +16,8 @@
'()[]{}$',
'%^',
'#;`|*?',
-   '~\\'
+   '~\\',
+   '%NOENV%'
 );
 
 $count = 1;
@@ -38,9 +39,11 @@
 -- Test 4 --
 string(14) ^(^)^[^]^{^}^$
 -- Test 5 --
-string(2) ^^
+string(4) ^%^^
 -- Test 6 --
 string(14) ^#^^;^`^|^*^?
 -- Test 7 --
 string(8) ^~^^^\
+-- Test 8 --
+string(9) ^%NOENV^%
 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/tests/general_functions phpinfo.phpt

2008-08-17 Thread Pierre-Alain Joye
pajoye  Sun Aug 17 16:43:36 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/general_functions   phpinfo.phpt 
  Log:
  - add %a for Compiler/architecture
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/phpinfo.phpt?r1=1.5r2=1.6diff_format=u
Index: php-src/ext/standard/tests/general_functions/phpinfo.phpt
diff -u php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.5 
php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.6
--- php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.5   Sat Dec 
29 11:39:06 2007
+++ php-src/ext/standard/tests/general_functions/phpinfo.phpt   Sun Aug 17 
16:43:36 2008
@@ -19,7 +19,7 @@
 PHP Version = %s
 
 System = %s
-Build Date = %s
+Build Date = %s%a
 Configure Command = %s
 Server API = Command Line Interface
 Virtual Directory Support = %s



-- 
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/tests/general_functions phpinfo.phpt

2008-08-17 Thread Pierre-Alain Joye
pajoye  Sun Aug 17 16:44:13 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/general_functions   phpinfo.phpt 
  Log:
  - MFH: add %a for Compiler/Architecture
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/phpinfo.phpt?r1=1.1.2.2.2.3r2=1.1.2.2.2.4diff_format=u
Index: php-src/ext/standard/tests/general_functions/phpinfo.phpt
diff -u php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.1.2.2.2.3 
php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.1.2.2.2.4
--- php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.1.2.2.2.3   
Tue Jul  8 08:37:56 2008
+++ php-src/ext/standard/tests/general_functions/phpinfo.phpt   Sun Aug 17 
16:44:13 2008
@@ -19,7 +19,7 @@
 PHP Version = %s
 
 System = %s
-Build Date = %s
+Build Date = %s%a
 Configure Command = %s
 Server API = Command Line Interface
 Virtual Directory Support = %s



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

2008-08-17 Thread Felipe Pena
felipe  Sun Aug 17 17:04:09 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/ming   ming.c 
  Log:
  - Fix build
  
http://cvs.php.net/viewvc.cgi/php-src/ext/ming/ming.c?r1=1.79.2.4.2.8.2.13r2=1.79.2.4.2.8.2.14diff_format=u
Index: php-src/ext/ming/ming.c
diff -u php-src/ext/ming/ming.c:1.79.2.4.2.8.2.13 
php-src/ext/ming/ming.c:1.79.2.4.2.8.2.14
--- php-src/ext/ming/ming.c:1.79.2.4.2.8.2.13   Wed Aug 13 19:06:10 2008
+++ php-src/ext/ming/ming.c Sun Aug 17 17:04:09 2008
@@ -19,7 +19,7 @@
   +--+
 */
 
-/* $Id: ming.c,v 1.79.2.4.2.8.2.13 2008/08/13 19:06:10 felipe Exp $ */
+/* $Id: ming.c,v 1.79.2.4.2.8.2.14 2008/08/17 17:04:09 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -4389,7 +4389,7 @@
 
item = getDisplayItem(zitem TSRMLS_CC);
 
-   block = (SWFBlock) getCharacter(*zblock TSRMLS_CC);
+   block = (SWFBlock) getCharacter(zblock TSRMLS_CC);
movie =  getMovie(getThis() TSRMLS_CC);
ublock.block = block;
 



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

2008-08-17 Thread Jani Taskinen
janiSun Aug 17 19:24:11 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  fix news
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.273r2=1.2027.2.547.2.965.2.274diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.273 
php-src/NEWS:1.2027.2.547.2.965.2.274
--- php-src/NEWS:1.2027.2.547.2.965.2.273   Sun Aug 17 11:01:23 2008
+++ php-src/NEWSSun Aug 17 19:24:10 2008
@@ -15,8 +15,10 @@
 - Added stream_context_set_default() function. (Davey Shafik)
 - Added optional is_xhtml parameter to nl2br() which makes the function
   output br when false and br / when true (FR #34381). (Kalle)
-- Improved Windows support(incl. 2008/Vista) and portability for stat, touch
-  filemtime, filesize and related functions. (Pierre)
+
+- Improved Windows support and portability for stat(), touch(), filemtime(),
+  filesize() and related functions. (Pierre)
+
 - Fixed a bug causing miscalculations with the last weekday of n month
   relative time string. (Derick)
 



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



Re: [PHP-CVS] cvs: php-src /ext/hash CREDITS config.m4 hash.c /ext/hash/tests mhash_001.phpt mhash_002.phpt mhash_003.phpt skip_mhash.inc /ext/mhash config.m4 mhash.c mhash.dsp php_mhash.h /ext/mhash/

2008-08-17 Thread Jani Taskinen

Pierre Joye kirjoitti:

hi,

On Sun, Aug 17, 2008 at 2:09 PM, Jani Taskinen [EMAIL PROTECTED] wrote:


You don't need to have multiple PHP_NEW_EXTENSION lines in config*.m4's to
enable multiple extensions and is not really useful either since you break
the ext_shared stuff, etc. If you do that anywhere, you're doing something
wrong.


I was not saying that, I only stated why the other ext has been kept.
If you can do it in a clean(er) way, please go ahead :)

Cheers,


It's simply ridiculous to keep a dummy extension JUST that someone can do 
extension_exists(mhash)..


--Jani


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



Re: [PHP-CVS] cvs: php-src /ext/hash CREDITS config.m4 hash.c /ext/hash/tests mhash_001.phpt mhash_002.phpt mhash_003.phpt skip_mhash.inc /ext/mhash config.m4 mhash.c mhash.dsp php_mhash.h /ext/mhash/

2008-08-17 Thread Pierre Joye
On Sun, Aug 17, 2008 at 9:26 PM, Jani Taskinen [EMAIL PROTECTED] wrote:
 Pierre Joye kirjoitti:

 hi,

 On Sun, Aug 17, 2008 at 2:09 PM, Jani Taskinen [EMAIL PROTECTED]
 wrote:

 You don't need to have multiple PHP_NEW_EXTENSION lines in config*.m4's
 to
 enable multiple extensions and is not really useful either since you
 break
 the ext_shared stuff, etc. If you do that anywhere, you're doing
 something
 wrong.

 I was not saying that, I only stated why the other ext has been kept.
 If you can do it in a clean(er) way, please go ahead :)

 Cheers,

 It's simply ridiculous to keep a dummy extension JUST that someone can do
 extension_exists(mhash)..

I agree, but you know my opinion about such BC decision :)

-- 
Pierre

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

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



Re: [PHP-CVS] cvs: CVSROOT / avail

2008-08-17 Thread Arnaud Le Blanc
Hi,

On Sunday 17 August 2008 11:32:53 Marcus Boerger wrote:
 Hello Arnaud, hi all,
 
   the submit message got lost: Upgrade Arnaud, so that he may submit his
   ini parsing fix.

Thanks :) 

 
 marcus
 
 Sunday, August 17, 2008, 11:27:18 AM, you wrote:
 
  helly   Sun Aug 17 09:27:18 2008 UTC
 
Modified files:  
  /CVSROOTavail 
Log:
avail

  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1435r2=1.1436diff_format=u
  Index: CVSROOT/avail
  diff -u CVSROOT/avail:1.1435 CVSROOT/avail:1.1436
  --- CVSROOT/avail:1.1435Tue Aug 12 13:39:42 2008
  +++ CVSROOT/avail   Sun Aug 17 09:27:16 2008
  @@ -36,7 +36,7 @@
   avail|loudi|phd
   
   # People who work on the Engine - not people with just tests access
  -avail|
andi,zeev,andrei,stas,sterling,sascha,derick,sebastian,phanto,jani,hirokawa,fujimoto,rvenkat,sesser,kalowsky,iliaa,hyanantha,georg,wez,edink,helly,hholzgra,imajes,gschlossnagle,moriyoshi,dmitry,jon,pollita,tony2001,johannes,bjori,davidw,nicholsr,wharmby,felipe,robinf,scottmac,nlopess,mattwil,colder|
Zend,ZendEngine2,TSRM
  +avail|
andi,zeev,andrei,stas,sterling,sascha,derick,sebastian,phanto,jani,hirokawa,fujimoto,rvenkat,sesser,kalowsky,iliaa,hyanantha,georg,wez,edink,helly,hholzgra,imajes,gschlossnagle,moriyoshi,dmitry,jon,pollita,tony2001,johannes,bjori,davidw,nicholsr,wharmby,felipe,robinf,scottmac,nlopess,mattwil,colder,lbarnaud|
Zend,ZendEngine2,TSRM
   
   # The PHP Documentation Group maintains the documentation and its
   # translations.
 
 
 
 
 
 
 Best regards,
  Marcus
 
 

Regards,

Arnaud

-- 
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 /ext/standard/tests/general_functions parse_ini_file.phpt ZendEngine2 zend_ini_scanner.l

2008-08-17 Thread Arnaud Le Blanc
lbarnaudSun Aug 17 21:55:27 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/ZendEngine2zend_ini_scanner.l 
/php-src/ext/standard/tests/general_functions   parse_ini_file.phpt 
  Log:
  MFH: Allow underscore at start of labels as underscore has no meaning here
  (fixes #44842)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.275r2=1.2027.2.547.2.965.2.276diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.275 
php-src/NEWS:1.2027.2.547.2.965.2.276
--- php-src/NEWS:1.2027.2.547.2.965.2.275   Sun Aug 17 21:00:21 2008
+++ php-src/NEWSSun Aug 17 21:55:26 2008
@@ -38,6 +38,8 @@
   newline). (Arnaud)
 - Fixed bug #45044 (relative paths not resolved correctly). (Dmitry)
 - Fixed bug #44925 (preg_grep() modifies input array). (Nuno)
+- Fixed bug #44842 (parse_ini_file keys that start/end with underscore). 
+  (Arnaud)
 - Fixed bug #44100 (Inconsistent handling of static array declarations with
   duplicate keys). (Dmitry)
 - Fixed bug #43817 (opendir() fails on Windows directories with parent
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini_scanner.l?r1=1.41.2.2.2.2.2.9r2=1.41.2.2.2.2.2.10diff_format=u
Index: ZendEngine2/zend_ini_scanner.l
diff -u ZendEngine2/zend_ini_scanner.l:1.41.2.2.2.2.2.9 
ZendEngine2/zend_ini_scanner.l:1.41.2.2.2.2.2.10
--- ZendEngine2/zend_ini_scanner.l:1.41.2.2.2.2.2.9 Sun Aug 17 21:00:22 2008
+++ ZendEngine2/zend_ini_scanner.l  Sun Aug 17 21:55:26 2008
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: zend_ini_scanner.l,v 1.41.2.2.2.2.2.9 2008/08/17 21:00:22 lbarnaud Exp 
$ */
+/* $Id: zend_ini_scanner.l,v 1.41.2.2.2.2.2.10 2008/08/17 21:55:26 lbarnaud 
Exp $ */
 
 #include errno.h
 #include zend.h
@@ -312,7 +312,7 @@
 TABS_AND_SPACES [ \t]
 WHITESPACE [ \t]+
 CONSTANT [a-zA-Z][a-zA-Z0-9_]*
-LABEL [a-zA-Z0-9][a-zA-Z0-9._-]*
+LABEL [a-zA-Z0-9_][a-zA-Z0-9._-]*
 TOKENS [:,.\[\]'()|^+-/*=%$!~[EMAIL PROTECTED]
 OPERATORS [|~()!]
 DOLLAR_CURLY ${
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/parse_ini_file.phpt?r1=1.1.2.2.2.2r2=1.1.2.2.2.3diff_format=u
Index: php-src/ext/standard/tests/general_functions/parse_ini_file.phpt
diff -u 
php-src/ext/standard/tests/general_functions/parse_ini_file.phpt:1.1.2.2.2.2 
php-src/ext/standard/tests/general_functions/parse_ini_file.phpt:1.1.2.2.2.3
--- 
php-src/ext/standard/tests/general_functions/parse_ini_file.phpt:1.1.2.2.2.2
Tue Apr  8 12:33:54 2008
+++ php-src/ext/standard/tests/general_functions/parse_ini_file.phptSun Aug 
17 21:55:26 2008
@@ -94,6 +94,15 @@
 file_put_contents($filename, $ini);
 var_dump(parse_ini_file($filename, true));
 
+/* #44842, labels starting with underscore */
+$ini = 'INI'
+foo=bar1
+_foo=bar2
+foo_=bar3
+INI;
+file_put_contents($filename, $ini);
+var_dump(parse_ini_file($filename, true));
+
 @unlink($filename);
 echo Done\n;
 ?
@@ -182,4 +191,12 @@
 string(5) value
   }
 }
+array(3) {
+  [foo]=
+  string(4) bar1
+  [_foo]=
+  string(4) bar2
+  [foo_]=
+  string(4) bar3
+}
 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_merge.phpt array_merge_error.phpt array_merge_recursive_error.phpt array_push.phpt array_push_error1.phpt array_push_varia

2008-08-17 Thread Felipe Pena
felipe  Sun Aug 17 22:11:22 2008 UTC

  Modified files:  
/php-src/ext/standard   array.c 
/php-src/ext/standard/tests/array   array_merge.phpt 
array_merge_error.phpt 
array_merge_recursive_error.phpt 
array_push.phpt 
array_push_error1.phpt 
array_push_variation1.phpt 
array_unshift.phpt 
array_unshift_error.phpt 
array_unshift_variation1.phpt 
compact_error.phpt 
  Log:
  - New parameter parsing API
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.460r2=1.461diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.460 php-src/ext/standard/array.c:1.461
--- php-src/ext/standard/array.c:1.460  Sun Aug 10 17:49:29 2008
+++ php-src/ext/standard/array.cSun Aug 17 22:11:21 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.460 2008/08/10 17:49:29 felipe Exp $ */
+/* $Id: array.c,v 1.461 2008/08/17 22:11:21 felipe Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -1612,17 +1612,11 @@
Creates a hash containing variables and their values */
 PHP_FUNCTION(compact)
 {
-   zval ***args;   /* function arguments array */
-   int i;
-
-   if (ZEND_NUM_ARGS()  1) {
-   WRONG_PARAM_COUNT;
-   }
-   args = (zval ***)safe_emalloc(ZEND_NUM_ARGS(), sizeof(zval **), 0);
-
-   if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
-   efree(args);
-   WRONG_PARAM_COUNT;
+   zval ***args = NULL;/* function arguments array */
+   int num_args, i;
+   
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, +, args, 
num_args) == FAILURE) {
+   return;
}
 
if (!EG(active_symbol_table)) {
@@ -2091,29 +2085,12 @@
int i,  /* Loop counter */
argc;   /* Number of function arguments */
 
-   /* Get the argument count and check it */
-   argc = ZEND_NUM_ARGS();
-   if (argc  2) {
-   WRONG_PARAM_COUNT;
-   }
-
-   /* Allocate arguments array and get the arguments, checking for errors. 
*/
-   args = (zval ***)safe_emalloc(argc, sizeof(zval **), 0);
-   if (zend_get_parameters_array_ex(argc, args) == FAILURE) {
-   efree(args);
-   WRONG_PARAM_COUNT;
-   }
-
-   /* Get first argument and check that it's an array */
-   stack = *args[0];
-   if (Z_TYPE_P(stack) != IS_ARRAY) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, First argument 
should be an array);
-   efree(args);
-   RETURN_FALSE;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a+, stack, 
args, argc) == FAILURE) {
+   return;
}
 
/* For each subsequent argument, make it a reference, increase 
refcount, and add it to the end of the array */
-   for (i=1; iargc; i++) {
+   for (i = 0; i  argc; i++) {
new_var = *args[i];
Z_ADDREF_P(new_var);
 
@@ -2224,30 +2201,13 @@
HashTable *new_hash;/* New hashtable for the stack */
int argc;   /* Number of function arguments 
*/
 
-   /* Get the argument count and check it */
-   argc = ZEND_NUM_ARGS();
-   if (argc  2) {
-   WRONG_PARAM_COUNT;
-   }
-
-   /* Allocate arguments array and get the arguments, checking for errors. 
*/
-   args = (zval ***)safe_emalloc(argc, sizeof(zval **), 0);
-   if (zend_get_parameters_array_ex(argc, args) == FAILURE) {
-   efree(args);
-   WRONG_PARAM_COUNT;
-   }
-
-   /* Get first argument and check that it's an array */
-   stack = *args[0];
-   if (Z_TYPE_P(stack) != IS_ARRAY) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, The first argument 
should be an array);
-   efree(args);
-   RETURN_FALSE;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a+, stack, 
args, argc) == FAILURE) {
+   return;
}
 
/* Use splice to insert the elements at the beginning. Destroy old
 * hashtable and replace it with new one */
-   new_hash = php_splice(Z_ARRVAL_P(stack), 0, 0, args[1], argc - 1, 
NULL);
+   new_hash = php_splice(Z_ARRVAL_P(stack), 0, 0, args[0], argc, NULL);
zend_hash_destroy(Z_ARRVAL_P(stack));
if (Z_ARRVAL_P(stack) == EG(symbol_table)) {
zend_reset_all_cv(EG(symbol_table) TSRMLS_CC);
@@ -2573,17 +2533,8 @@
zval ***args = NULL;
  

[PHP-CVS] cvs: php-src /ext/mbstring mbstring.c php_mbregex.c /ext/mbstring/tests ini_language.phpt mb_output_handler_pattern-01.phpt mb_output_handler_pattern-02.phpt mb_output_handler_pattern-03.ph

2008-08-17 Thread Felipe Pena
felipe  Mon Aug 18 00:36:04 2008 UTC

  Modified files:  
/php-src/ext/mbstring   mbstring.c php_mbregex.c 
/php-src/ext/mbstring/tests ini_language.phpt 
mb_output_handler_pattern-01.phpt 
mb_output_handler_pattern-02.phpt 
mb_output_handler_pattern-03.phpt 
mb_output_handler_pattern-04.phpt 
mb_output_handler_pattern-05.phpt 
mb_output_handler_pattern-06.phpt 
mb_output_handler_pattern-07.phpt 
mb_output_handler_pattern-08.phpt 
mb_output_handler_pattern-09.phpt 
mb_output_handler_pattern-10.phpt 
mb_output_handler_pattern-11.phpt 
mb_output_handler_pattern-12.phpt 
mb_parse_str.phpt 
mb_regex_encoding_error1.phpt 
mb_regex_encoding_variation1.phpt 
mb_strtolower_basic.phpt 
mb_substr_error1.phpt 
mb_substr_variation1.phpt 
mb_substr_variation2.phpt 
  Log:
  - New parameter parsing API
  - Fixed tests
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.296r2=1.297diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.296 
php-src/ext/mbstring/mbstring.c:1.297
--- php-src/ext/mbstring/mbstring.c:1.296   Mon Aug 11 15:40:41 2008
+++ php-src/ext/mbstring/mbstring.c Mon Aug 18 00:36:03 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.296 2008/08/11 15:40:41 nlopess Exp $ */
+/* $Id: mbstring.c,v 1.297 2008/08/18 00:36:03 felipe Exp $ */
 
 /*
  * PHP 4 Multibyte String module mbstring
@@ -3466,37 +3466,30 @@
 
 #define PHP_MBSTR_STACK_BLOCK_SIZE 32
 
-/* {{{ proto string mb_convert_variables(string to-encoding, mixed 
from-encoding [, mixed ...])
+/* {{{ proto string mb_convert_variables(string to-encoding, mixed 
from-encoding, mixed vars [, ...])
Converts the string resource in variables to desired encoding */
 PHP_FUNCTION(mb_convert_variables)
 {
-   zval ***args, ***stack, **var, **hash_entry;
+   zval ***args, ***stack, **var, **hash_entry, **zfrom_enc;
HashTable *target_hash;
mbfl_string string, result, *ret;
enum mbfl_no_encoding from_encoding, to_encoding;
mbfl_encoding_detector *identd;
mbfl_buffer_converter *convd;
-   int n, argc, stack_level, stack_max, elistsz;
+   int n, to_enc_len, argc, stack_level, stack_max, elistsz;
enum mbfl_no_encoding *elist;
-   char *name;
+   char *name, *to_enc;
void *ptmp;
 
-   argc = ZEND_NUM_ARGS();
-   if (argc  3) {
-   WRONG_PARAM_COUNT;
-   }
-   args = (zval ***)ecalloc(argc, sizeof(zval **));
-   if (zend_get_parameters_array_ex(argc, args) == FAILURE) {
-   efree((void *)args);
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sZ+, to_enc, 
to_enc_len, zfrom_enc, args, argc) == FAILURE) {
+   return;
}
 
/* new encoding */
-   convert_to_string_ex(args[0]);
-   to_encoding = mbfl_name2no_encoding(Z_STRVAL_PP(args[0]));
+   to_encoding = mbfl_name2no_encoding(to_enc);
if (to_encoding == mbfl_no_encoding_invalid) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown encoding 
\%s\, Z_STRVAL_PP(args[0]));
-   efree((void *)args);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown encoding 
\%s\, to_enc);
+   efree(args);
RETURN_FALSE;
}
 
@@ -3510,13 +3503,13 @@
/* pre-conversion encoding */
elist = NULL;
elistsz = 0;
-   switch (Z_TYPE_PP(args[1])) {
+   switch (Z_TYPE_PP(zfrom_enc)) {
case IS_ARRAY:
-   php_mb_parse_encoding_array(*args[1], elist, elistsz, 0 
TSRMLS_CC);
+   php_mb_parse_encoding_array(*zfrom_enc, elist, elistsz, 0 
TSRMLS_CC);
break;
default:
-   convert_to_string_ex(args[1]);
-   php_mb_parse_encoding_list(Z_STRVAL_PP(args[1]), 
Z_STRLEN_PP(args[1]), elist, elistsz, 0 TSRMLS_CC);
+   convert_to_string_ex(zfrom_enc);
+   php_mb_parse_encoding_list(Z_STRVAL_PP(zfrom_enc), 
Z_STRLEN_PP(zfrom_enc), elist, elistsz, 0 TSRMLS_CC);
break;
}
if (elistsz = 0) {
@@ -3531,7 +3524,7 @@
stack_level = 0;
identd = mbfl_encoding_detector_new(elist, elistsz, 

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

2008-08-17 Thread Felipe Pena
felipe  Mon Aug 18 00:37:16 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mbstring   mbstring.c 
  Log:
  - New parameter parsing API (for mb_convert_variables())
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.25.2.30r2=1.224.2.22.2.25.2.31diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.30 
php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.31
--- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.30Mon Aug 11 
15:42:35 2008
+++ php-src/ext/mbstring/mbstring.c Mon Aug 18 00:37:16 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.224.2.22.2.25.2.30 2008/08/11 15:42:35 nlopess Exp $ */
+/* $Id: mbstring.c,v 1.224.2.22.2.25.2.31 2008/08/18 00:37:16 felipe Exp $ */
 
 /*
  * PHP 4 Multibyte String module mbstring
@@ -3600,37 +3600,30 @@
 
 #define PHP_MBSTR_STACK_BLOCK_SIZE 32
 
-/* {{{ proto string mb_convert_variables(string to-encoding, mixed 
from-encoding [, mixed ...])
+/* {{{ proto string mb_convert_variables(string to-encoding, mixed 
from-encoding, mixed vars [, ...])
Converts the string resource in variables to desired encoding */
 PHP_FUNCTION(mb_convert_variables)
 {
-   zval ***args, ***stack, **var, **hash_entry;
+   zval ***args, ***stack, **var, **hash_entry, **zfrom_enc;
HashTable *target_hash;
mbfl_string string, result, *ret;
enum mbfl_no_encoding from_encoding, to_encoding;
mbfl_encoding_detector *identd;
mbfl_buffer_converter *convd;
-   int n, argc, stack_level, stack_max, elistsz;
+   int n, to_enc_len, argc, stack_level, stack_max, elistsz;
enum mbfl_no_encoding *elist;
-   char *name;
-   void *ptmp;
-
-   argc = ZEND_NUM_ARGS();
-   if (argc  3) {
-   WRONG_PARAM_COUNT;
-   }
-   args = (zval ***)ecalloc(argc, sizeof(zval **));
-   if (zend_get_parameters_array_ex(argc, args) == FAILURE) {
-   efree((void *)args);
-   WRONG_PARAM_COUNT;
+   char *name, *to_enc;
+   void *ptmp; 
+   
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sZ+, to_enc, 
to_enc_len, zfrom_enc, args, argc) == FAILURE) {
+   return;
}
 
/* new encoding */
-   convert_to_string_ex(args[0]);
-   to_encoding = mbfl_name2no_encoding(Z_STRVAL_PP(args[0]));
+   to_encoding = mbfl_name2no_encoding(to_enc);
if (to_encoding == mbfl_no_encoding_invalid) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown encoding 
\%s\, Z_STRVAL_PP(args[0]));
-   efree((void *)args);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown encoding 
\%s\, to_enc);
+   efree(args);
RETURN_FALSE;
}
 
@@ -3644,13 +3637,13 @@
/* pre-conversion encoding */
elist = NULL;
elistsz = 0;
-   switch (Z_TYPE_PP(args[1])) {
+   switch (Z_TYPE_PP(zfrom_enc)) {
case IS_ARRAY:
-   php_mb_parse_encoding_array(*args[1], elist, elistsz, 0 
TSRMLS_CC);
+   php_mb_parse_encoding_array(*zfrom_enc, elist, elistsz, 0 
TSRMLS_CC);
break;
default:
-   convert_to_string_ex(args[1]);
-   php_mb_parse_encoding_list(Z_STRVAL_PP(args[1]), 
Z_STRLEN_PP(args[1]), elist, elistsz, 0 TSRMLS_CC);
+   convert_to_string_ex(zfrom_enc);
+   php_mb_parse_encoding_list(Z_STRVAL_PP(zfrom_enc), 
Z_STRLEN_PP(zfrom_enc), elist, elistsz, 0 TSRMLS_CC);
break;
}
if (elistsz = 0) {
@@ -3665,7 +3658,7 @@
stack_level = 0;
identd = mbfl_encoding_detector_new(elist, elistsz, 
MBSTRG(strict_detection));
if (identd != NULL) {
-   n = 2;
+   n = 0;
while (n  argc || stack_level  0) {
if (stack_level = 0) {
var = args[n++];
@@ -3746,7 +3739,7 @@
stack_max = PHP_MBSTR_STACK_BLOCK_SIZE;
stack = (zval ***)safe_emalloc(stack_max, sizeof(zval **), 0);
stack_level = 0;
-   n = 2;
+   n = 0;
while (n  argc || stack_level  0) {
if (stack_level = 0) {
var = args[n++];
@@ -3812,7 +3805,7 @@
mbfl_buffer_converter_delete(convd);
}
 
-   efree((void *)args);
+   efree(args);
 
name = (char *)mbfl_no_encoding2name(from_encoding);
if (name != NULL) {



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



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

2008-08-17 Thread Moriyoshi Koizumi
moriyoshi   Mon Aug 18 03:26:07 2008 UTC

  Modified files:  
/php-src/ext/standard   html.c 
  Log:
  - Beware of signedness
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/html.c?r1=1.134r2=1.135diff_format=u
Index: php-src/ext/standard/html.c
diff -u php-src/ext/standard/html.c:1.134 php-src/ext/standard/html.c:1.135
--- php-src/ext/standard/html.c:1.134   Sun Aug 10 13:25:52 2008
+++ php-src/ext/standard/html.c Mon Aug 18 03:26:06 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: html.c,v 1.134 2008/08/10 13:25:52 lbarnaud Exp $ */
+/* $Id: html.c,v 1.135 2008/08/18 03:26:06 moriyoshi Exp $ */
 
 /*
  * HTML entity resources:
@@ -1201,21 +1201,21 @@
if (*s == 'x' || *s == 
'X') {
s++;
while (s  e) {
-   if 
(!isxdigit(*s++)) {
+   if 
(!isxdigit((int)*(unsigned char *)s++)) {

goto encode_amp;
}
}
/* Dec (#90;)*/
} else {
while (s  e) {
-   if 
(!isdigit(*s++)) {
+   if 
(!isdigit((int)*(unsigned char *)s++)) {

goto encode_amp;
}
}
}
} else { /* text entities */
while (s  e) {
-   if 
(!isalnum(*s++)) {
+   if 
(!isalnum((int)*(unsigned char *)s++)) {
goto 
encode_amp;
}
}



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

2008-08-17 Thread Moriyoshi Koizumi
moriyoshi   Mon Aug 18 03:26:22 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   html.c 
  Log:
  - MFH: beware of signedness
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/html.c?r1=1.111.2.2.2.14.2.10r2=1.111.2.2.2.14.2.11diff_format=u
Index: php-src/ext/standard/html.c
diff -u php-src/ext/standard/html.c:1.111.2.2.2.14.2.10 
php-src/ext/standard/html.c:1.111.2.2.2.14.2.11
--- php-src/ext/standard/html.c:1.111.2.2.2.14.2.10 Sun Aug 10 13:26:13 2008
+++ php-src/ext/standard/html.c Mon Aug 18 03:26:21 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: html.c,v 1.111.2.2.2.14.2.10 2008/08/10 13:26:13 lbarnaud Exp $ */
+/* $Id: html.c,v 1.111.2.2.2.14.2.11 2008/08/18 03:26:21 moriyoshi Exp $ */
 
 /*
  * HTML entity resources:
@@ -1198,21 +1198,21 @@
if (*s == 'x' || *s == 
'X') {
s++;
while (s  e) {
-   if 
(!isxdigit(*s++)) {
+   if 
(!isxdigit((int)*(unsigned char *)s++)) {

goto encode_amp;
}
}
/* Dec (#90;)*/
} else {
while (s  e) {
-   if 
(!isdigit(*s++)) {
+   if 
(!isdigit((int)*(unsigned char *)s++)) {

goto encode_amp;
}
}
}
} else { /* text entities */
while (s  e) {
-   if 
(!isalnum(*s++)) {
+   if 
(!isalnum((int)*(unsigned char *)s++)) {
goto 
encode_amp;
}
}



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

2008-08-17 Thread Moriyoshi Koizumi
moriyoshi   Mon Aug 18 03:26:40 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   html.c 
  Log:
  - MFH: beware of signedness
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/html.c?r1=1.111.2.2.2.21r2=1.111.2.2.2.22diff_format=u
Index: php-src/ext/standard/html.c
diff -u php-src/ext/standard/html.c:1.111.2.2.2.21 
php-src/ext/standard/html.c:1.111.2.2.2.22
--- php-src/ext/standard/html.c:1.111.2.2.2.21  Sun Aug 10 13:26:25 2008
+++ php-src/ext/standard/html.c Mon Aug 18 03:26:40 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: html.c,v 1.111.2.2.2.21 2008/08/10 13:26:25 lbarnaud Exp $ */
+/* $Id: html.c,v 1.111.2.2.2.22 2008/08/18 03:26:40 moriyoshi Exp $ */
 
 /*
  * HTML entity resources:
@@ -1203,21 +1203,21 @@
if (*s == 'x' || *s == 
'X') {
s++;
while (s  e) {
-   if 
(!isxdigit(*s++)) {
+   if 
(!isxdigit((int)*(unsigned char *)s++)) {

goto encode_amp;
}
}
/* Dec (#90;)*/
} else {
while (s  e) {
-   if 
(!isdigit(*s++)) {
+   if 
(!isdigit((int)*(unsigned char *)s++)) {

goto encode_amp;
}
}
}
} else { /* text entities */
while (s  e) {
-   if 
(!isalnum(*s++)) {
+   if 
(!isalnum((int)*(unsigned char *)s++)) {
goto 
encode_amp;
}
}



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



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

2008-08-17 Thread Arnaud Le Blanc
lbarnaudMon Aug 18 03:54:50 2008 UTC

  Modified files:  
/php-src/main   output.c 
  Log:
  update buffer size after having effectively realloc()ed it when appending
  data to an output buffer
  # may caused some problems if erealloc() failed here because of memory 
  # limit (memory limit exhausted error message then written to
  # the buffer, etc)
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.210r2=1.211diff_format=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.210 php-src/main/output.c:1.211
--- php-src/main/output.c:1.210 Tue Mar  4 23:39:15 2008
+++ php-src/main/output.c   Mon Aug 18 03:54:49 2008
@@ -19,7 +19,7 @@
+--+
 */
 
-/* $Id: output.c,v 1.210 2008/03/04 23:39:15 felipe Exp $ */
+/* $Id: output.c,v 1.211 2008/08/18 03:54:49 lbarnaud Exp $ */
 
 #ifndef PHP_OUTPUT_DEBUG
 #  define PHP_OUTPUT_DEBUG 0
@@ -913,7 +913,8 @@
size_t grow_buf = 
PHP_OUTPUT_HANDLER_INITBUF_SIZE(buf-used - (handler-buffer.size - 
handler-buffer.used));
size_t grow_max = MAX(grow_int, grow_buf);

-   handler-buffer.data = erealloc(handler-buffer.data, 
handler-buffer.size += grow_max);
+   handler-buffer.data = erealloc(handler-buffer.data, 
handler-buffer.size + grow_max);
+   handler-buffer.size += grow_max;
}
memcpy(handler-buffer.data + handler-buffer.used, buf-data, 
buf-used);
handler-buffer.used += buf-used;



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



[PHP-CVS] cvs: php-src /main output.c /tests/lang bug45392.phpt

2008-08-17 Thread Arnaud Le Blanc
lbarnaudMon Aug 18 04:07:54 2008 UTC

  Added files: 
/php-src/tests/lang bug45392.phpt 

  Modified files:  
/php-src/main   output.c 
  Log:
  Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit).
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.211r2=1.212diff_format=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.211 php-src/main/output.c:1.212
--- php-src/main/output.c:1.211 Mon Aug 18 03:54:49 2008
+++ php-src/main/output.c   Mon Aug 18 04:07:54 2008
@@ -19,7 +19,7 @@
+--+
 */
 
-/* $Id: output.c,v 1.211 2008/08/18 03:54:49 lbarnaud Exp $ */
+/* $Id: output.c,v 1.212 2008/08/18 04:07:54 lbarnaud Exp $ */
 
 #ifndef PHP_OUTPUT_DEBUG
 #  define PHP_OUTPUT_DEBUG 0
@@ -1275,7 +1275,11 @@

/* pass output along */
if (context.out.data  context.out.used  !(flags  
PHP_OUTPUT_POP_DISCARD)) {
-   php_output_write(context.out.data, context.out.used 
TSRMLS_CC);
+   /* in case of unclean_shutdown, do not output the 
buffer if it is not
+   * meant to be until end of script or ob_end_*() call */
+   if (!CG(unclean_shutdown) || orphan-size) {
+   php_output_write(context.out.data, 
context.out.used TSRMLS_CC);
+   }
}

/* destroy the handler (after write!) */

http://cvs.php.net/viewvc.cgi/php-src/tests/lang/bug45392.phpt?view=markuprev=1.1
Index: php-src/tests/lang/bug45392.phpt
+++ php-src/tests/lang/bug45392.phpt
--TEST--
Bug #45392 (ob_start()/ob_end_clean() and memory_limit)
--INI--
display_errors=stderr
--FILE--
?php
echo __LINE__ . \n;
ini_set('memory_limit', 100);
ob_start(NULL, 10);
echo __LINE__ .\n;
ob_start();
$i = 0;
while($i++  5000)  {
  echo str_repeat(may not be displayed , 42);
}
ob_end_flush();
ob_end_clean();
?
--EXPECTF--
2
Fatal error: Allowed memory size of %d bytes exhausted%s
5



-- 
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 output.c /tests/lang bug45392.phpt

2008-08-17 Thread Arnaud Le Blanc
lbarnaudMon Aug 18 04:08:17 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/tests/lang bug45392.phpt 

  Modified files:  
/php-src/main   output.c 
  Log:
  MFH: Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit).
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.167.2.3.2.4.2.7r2=1.167.2.3.2.4.2.8diff_format=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.167.2.3.2.4.2.7 
php-src/main/output.c:1.167.2.3.2.4.2.8
--- php-src/main/output.c:1.167.2.3.2.4.2.7 Sat Aug  2 04:46:07 2008
+++ php-src/main/output.c   Mon Aug 18 04:08:17 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: output.c,v 1.167.2.3.2.4.2.7 2008/08/02 04:46:07 felipe Exp $ */
+/* $Id: output.c,v 1.167.2.3.2.4.2.8 2008/08/18 04:08:17 lbarnaud Exp $ */
 
 #include php.h
 #include ext/standard/head.h
@@ -336,7 +336,13 @@
 PHPAPI void php_end_ob_buffers(zend_bool send_buffer TSRMLS_DC)
 {
while (OG(ob_nesting_level)!=0) {
-   php_end_ob_buffer(send_buffer, 0 TSRMLS_CC);
+   /* in case of unclean_shutdown, do not output the buffer if it 
is not 
+* meant to be until end of script or ob_end_*() call */
+   if (CG(unclean_shutdown)  !OG(active_ob_buffer).chunk_size) {
+   php_end_ob_buffer(0, 0 TSRMLS_CC);
+   } else {
+   php_end_ob_buffer(send_buffer, 0 TSRMLS_CC);
+   }
}
 }
 /* }}} */

http://cvs.php.net/viewvc.cgi/php-src/tests/lang/bug45392.phpt?view=markuprev=1.1
Index: php-src/tests/lang/bug45392.phpt
+++ php-src/tests/lang/bug45392.phpt
--TEST--
Bug #45392 (ob_start()/ob_end_clean() and memory_limit)
--INI--
display_errors=stderr
--FILE--
?php
echo __LINE__ . \n;
ini_set('memory_limit', 100);
ob_start(NULL, 10);
echo __LINE__ .\n;
ob_start();
$i = 0;
while($i++  5000)  {
  echo str_repeat(may not be displayed , 42);
}
ob_end_flush();
ob_end_clean();
?
--EXPECTF--
2
Fatal error: Allowed memory size of %d bytes exhausted%s
5



-- 
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 /main output.c /tests/lang bug45392.phpt

2008-08-17 Thread Arnaud Le Blanc
lbarnaudMon Aug 18 04:09:38 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/tests/lang bug45392.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/main   output.c 
  Log:
  MFH: Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1199r2=1.2027.2.547.2.1200diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1199 php-src/NEWS:1.2027.2.547.2.1200
--- php-src/NEWS:1.2027.2.547.2.1199Wed Aug 13 19:43:48 2008
+++ php-src/NEWSMon Aug 18 04:09:37 2008
@@ -43,6 +43,7 @@
   before shutdown) (basant dot kukreja at sun dot com)
 - Fixed bug #45406 (session.serialize_handler declared by shared extension 
   fails). (Kalle, oleg dot grenrus at dynamoid dot com)
+- Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit). (Arnaud)
 - Fixed bug #45352 (Segmentation fault because of tick function on second
   request). (Dmitry)
 - Fixed bug #45312 (Segmentation fault on second request for array functions).
http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.167.2.3.2.5r2=1.167.2.3.2.6diff_format=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.167.2.3.2.5 php-src/main/output.c:1.167.2.3.2.6
--- php-src/main/output.c:1.167.2.3.2.5 Mon Dec 31 07:20:15 2007
+++ php-src/main/output.c   Mon Aug 18 04:09:37 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: output.c,v 1.167.2.3.2.5 2007/12/31 07:20:15 sebastian Exp $ */
+/* $Id: output.c,v 1.167.2.3.2.6 2008/08/18 04:09:37 lbarnaud Exp $ */
 
 #include php.h
 #include ext/standard/head.h
@@ -336,7 +336,13 @@
 PHPAPI void php_end_ob_buffers(zend_bool send_buffer TSRMLS_DC)
 {
while (OG(ob_nesting_level)!=0) {
-   php_end_ob_buffer(send_buffer, 0 TSRMLS_CC);
+   /* in case of unclean_shutdown, do not output the buffer if it 
is not 
+* meant to be until end of script or ob_end_*() call */
+   if (CG(unclean_shutdown)  !OG(active_ob_buffer).chunk_size) {
+   php_end_ob_buffer(0, 0 TSRMLS_CC);
+   } else {
+   php_end_ob_buffer(send_buffer, 0 TSRMLS_CC);
+   }
}
 }
 /* }}} */

http://cvs.php.net/viewvc.cgi/php-src/tests/lang/bug45392.phpt?view=markuprev=1.1
Index: php-src/tests/lang/bug45392.phpt
+++ php-src/tests/lang/bug45392.phpt
--TEST--
Bug #45392 (ob_start()/ob_end_clean() and memory_limit)
--INI--
display_errors=stderr
--FILE--
?php
echo __LINE__ . \n;
ini_set('memory_limit', 100);
ob_start(NULL, 10);
echo __LINE__ .\n;
ob_start();
$i = 0;
while($i++  5000)  {
  echo str_repeat(may not be displayed , 42);
}
ob_end_flush();
ob_end_clean();
?
--EXPECTF--
2
Fatal error: Allowed memory size of %d bytes exhausted%s
5



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



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

2008-08-17 Thread Arnaud Le Blanc
lbarnaudMon Aug 18 04:11:52 2008 UTC

  Modified files:  
/php-src/main   output.c 
  Log:
  ws
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.212r2=1.213diff_format=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.212 php-src/main/output.c:1.213
--- php-src/main/output.c:1.212 Mon Aug 18 04:07:54 2008
+++ php-src/main/output.c   Mon Aug 18 04:11:51 2008
@@ -19,7 +19,7 @@
+--+
 */
 
-/* $Id: output.c,v 1.212 2008/08/18 04:07:54 lbarnaud Exp $ */
+/* $Id: output.c,v 1.213 2008/08/18 04:11:51 lbarnaud Exp $ */
 
 #ifndef PHP_OUTPUT_DEBUG
 #  define PHP_OUTPUT_DEBUG 0
@@ -1276,7 +1276,7 @@
/* pass output along */
if (context.out.data  context.out.used  !(flags  
PHP_OUTPUT_POP_DISCARD)) {
/* in case of unclean_shutdown, do not output the 
buffer if it is not
-   * meant to be until end of script or ob_end_*() call */
+* meant to be until end of script or ob_end_*() call */
if (!CG(unclean_shutdown) || orphan-size) {
php_output_write(context.out.data, 
context.out.used TSRMLS_CC);
}



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



[PHP-CVS] cvs: php-src /ext/standard/tests/dir readdir_variation2.phpt rewinddir_variation2.phpt

2008-08-17 Thread Arnaud Le Blanc
lbarnaudMon Aug 18 04:45:25 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/dir rewinddir_variation2.phpt 
readdir_variation2.phpt 
  Log:
  Fix tests (closes #45841)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/rewinddir_variation2.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/dir/rewinddir_variation2.phpt
diff -u php-src/ext/standard/tests/dir/rewinddir_variation2.phpt:1.3 
php-src/ext/standard/tests/dir/rewinddir_variation2.phpt:1.4
--- php-src/ext/standard/tests/dir/rewinddir_variation2.phpt:1.3Mon May 
26 23:48:29 2008
+++ php-src/ext/standard/tests/dir/rewinddir_variation2.phptMon Aug 18 
04:45:25 2008
@@ -36,7 +36,7 @@
 
 -- Create the directory handle, read and close the directory --
 resource(%d) of type (stream)
-unicode(1) .
+unicode(%d) %s
 
 -- Call to rewinddir() --
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/readdir_variation2.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/dir/readdir_variation2.phpt
diff -u php-src/ext/standard/tests/dir/readdir_variation2.phpt:1.3 
php-src/ext/standard/tests/dir/readdir_variation2.phpt:1.4
--- php-src/ext/standard/tests/dir/readdir_variation2.phpt:1.3  Mon May 26 
23:48:29 2008
+++ php-src/ext/standard/tests/dir/readdir_variation2.phpt  Mon Aug 18 
04:45:25 2008
@@ -18,11 +18,20 @@
 $dir_handle = opendir($path);
 
 echo \n-- Pass an empty directory to readdir() --\n;
+function mysort($a,$b) {
+   return strlen($a)  strlen($b) ? 1 : -1;
+}
+$entries = array();
 while(FALSE !== ($file = readdir($dir_handle))){
-   var_dump($file);
+   $entries[] = $file;
 }
 
 closedir($dir_handle);
+
+usort($entries, mysort);
+foreach($entries as $entry) {
+   var_dump($entry);
+}
 ?
 ===DONE===
 --CLEAN--



-- 
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/tests/dir readdir_variation2.phpt rewinddir_variation2.phpt

2008-08-17 Thread Arnaud Le Blanc
lbarnaudMon Aug 18 04:45:49 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/dir rewinddir_variation2.phpt 
readdir_variation2.phpt 
  Log:
  MFH: Fix tests (closes #45841)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/rewinddir_variation2.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/standard/tests/dir/rewinddir_variation2.phpt
diff -u php-src/ext/standard/tests/dir/rewinddir_variation2.phpt:1.1.4.2 
php-src/ext/standard/tests/dir/rewinddir_variation2.phpt:1.1.4.3
--- php-src/ext/standard/tests/dir/rewinddir_variation2.phpt:1.1.4.2Fri Mar 
 7 16:12:03 2008
+++ php-src/ext/standard/tests/dir/rewinddir_variation2.phptMon Aug 18 
04:45:49 2008
@@ -36,7 +36,7 @@
 
 -- Create the directory handle, read and close the directory --
 resource(%d) of type (stream)
-string(1) .
+string(%d) %s
 
 -- Call to rewinddir() --
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/readdir_variation2.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/standard/tests/dir/readdir_variation2.phpt
diff -u php-src/ext/standard/tests/dir/readdir_variation2.phpt:1.1.4.2 
php-src/ext/standard/tests/dir/readdir_variation2.phpt:1.1.4.3
--- php-src/ext/standard/tests/dir/readdir_variation2.phpt:1.1.4.2  Tue Mar 
 4 17:09:24 2008
+++ php-src/ext/standard/tests/dir/readdir_variation2.phpt  Mon Aug 18 
04:45:49 2008
@@ -18,11 +18,20 @@
 $dir_handle = opendir($path);
 
 echo \n-- Pass an empty directory to readdir() --\n;
+function mysort($a,$b) {
+   return strlen($a)  strlen($b) ? 1 : -1;
+}
+$entries = array();
 while(FALSE !== ($file = readdir($dir_handle))){
-   var_dump($file);
+   $entries[] = $file;
 }
 
 closedir($dir_handle);
+
+usort($entries, mysort);
+foreach($entries as $entry) {
+   var_dump($entry);
+}
 ?
 ===DONE===
 --CLEAN--



-- 
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/dir readdir_variation2.phpt rewinddir_variation2.phpt

2008-08-17 Thread Arnaud Le Blanc
lbarnaudMon Aug 18 04:46:05 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/dir rewinddir_variation2.phpt 
readdir_variation2.phpt 
  Log:
  MFH: Fix tests (closes #45841)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/rewinddir_variation2.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/dir/rewinddir_variation2.phpt
diff -u php-src/ext/standard/tests/dir/rewinddir_variation2.phpt:1.1.2.1 
php-src/ext/standard/tests/dir/rewinddir_variation2.phpt:1.1.2.2
--- php-src/ext/standard/tests/dir/rewinddir_variation2.phpt:1.1.2.1Fri Mar 
 7 16:08:58 2008
+++ php-src/ext/standard/tests/dir/rewinddir_variation2.phptMon Aug 18 
04:46:05 2008
@@ -36,7 +36,7 @@
 
 -- Create the directory handle, read and close the directory --
 resource(%d) of type (stream)
-string(1) .
+string(%d) %s
 
 -- Call to rewinddir() --
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/readdir_variation2.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/dir/readdir_variation2.phpt
diff -u php-src/ext/standard/tests/dir/readdir_variation2.phpt:1.1.2.1 
php-src/ext/standard/tests/dir/readdir_variation2.phpt:1.1.2.2
--- php-src/ext/standard/tests/dir/readdir_variation2.phpt:1.1.2.1  Tue Mar 
 4 17:06:46 2008
+++ php-src/ext/standard/tests/dir/readdir_variation2.phpt  Mon Aug 18 
04:46:05 2008
@@ -18,11 +18,20 @@
 $dir_handle = opendir($path);
 
 echo \n-- Pass an empty directory to readdir() --\n;
+function mysort($a,$b) {
+   return strlen($a)  strlen($b) ? 1 : -1;
+}
+$entries = array();
 while(FALSE !== ($file = readdir($dir_handle))){
-   var_dump($file);
+   $entries[] = $file;
 }
 
 closedir($dir_handle);
+
+usort($entries, mysort);
+foreach($entries as $entry) {
+   var_dump($entry);
+}
 ?
 ===DONE===
 --CLEAN--



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