helly           Wed Oct  5 20:38:55 2005 EDT

  Modified files:              
    /php-src    run-tests.php 
  Log:
  - MFB use new functions
  
http://cvs.php.net/diff.php/php-src/run-tests.php?r1=1.233&r2=1.234&ty=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.233 php-src/run-tests.php:1.234
--- php-src/run-tests.php:1.233 Wed Oct  5 20:35:08 2005
+++ php-src/run-tests.php       Wed Oct  5 20:38:55 2005
@@ -23,7 +23,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: run-tests.php,v 1.233 2005/10/06 00:35:08 helly Exp $ */
+/* $Id: run-tests.php,v 1.234 2005/10/06 00:38:55 helly Exp $ */
 
 /* Sanity check to ensure that pcre extension needed by this script is 
available.
  * In the event it is not, print a nice error message indicating that this 
script will
@@ -572,9 +572,7 @@
                
                if ($just_save_results || !mail_qa_team($failed_tests_data, 
$compression, $status)) {
                        $output_file = $CUR_DIR . '/php_test_results_' . 
date('Ymd_Hi') . ( $compression ? '.txt.gz' : '.txt' );
-                       $fp = fopen($output_file, "wt");
-                       fwrite($fp, $failed_tests_data);
-                       fclose($fp);
+                       file_put_contents($output_file, $failed_tests_data);
                
                        if (!$just_save_results) {
                            echo "\nThe test script was unable to automatically 
send the report to PHP's QA Team\n";
@@ -633,9 +631,7 @@
 {
        global $DETAILED;
 
-       $fp = @fopen($filename,'wt') or error("Cannot open file '" . $filename 
. "' (save_text)");
-       fwrite($fp,$text);
-       fclose($fp);
+       @file_put_contents($filename, $text) or error("Cannot open file '" . 
$filename . "' (save_text)");
        if (1 < $DETAILED) echo "
 FILE $filename {{{
 $text

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

Reply via email to