Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.37
diff -u -r1.37 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	6 Sep 2008 08:36:20 -0000	1.37
+++ modules/simpletest/drupal_web_test_case.php	9 Sep 2008 03:27:15 -0000
@@ -898,7 +898,9 @@
             // is broken. This is a less than elegant workaround. Alternatives
             // are being explored at #253506.
             foreach ($upload as $key => $file) {
-              $post[$key] = '@' . realpath($file);
+              if ($file = realpath($file) && is_file($file)) {
+                $post[$key] = '@' . $file;
+              }
             }
           }
           else {
