diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/simpletest/drupal_web_test_case.php | 5 |
1 files changed, 4 insertions, 1 deletions
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 { |