From 2ea70d65076e8ddc93968d46c2bd1c707385d0fb Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sun, 9 Nov 2008 03:07:54 +0000 Subject: #304940 by drewish: Stop SimpleTest from trying to upload non-files. --- modules/simpletest/drupal_web_test_case.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index 3d8c6d522..a81a2d74a 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -971,7 +971,10 @@ class DrupalWebTestCase { // is broken. This is a less than elegant workaround. Alternatives // are being explored at #253506. foreach ($upload as $key => $file) { - $post[$key] = '@' . realpath($file); + $file = realpath($file); + if ($file && is_file($file)) { + $post[$key] = '@' . $file; + } } } else { -- cgit v1.2.3