From c42d69a15d6d452e8630e0b9d7561c76f61a49c1 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Fri, 13 Mar 2015 15:33:04 +0000
Subject: [PATCH] Issue #2417727 by Berdir: Notice: Undefined offset: 1 in
 core/scripts/run-tests.sh on line 952

---
 core/scripts/run-tests.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 5da468ba7719..4dbd4fdd8b93 100644
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -967,7 +967,12 @@ function simpletest_script_reporter_write_xml_results() {
       // Create the XML element for this test case:
       $case = $dom_document->createElement('testcase');
       $case->setAttribute('classname', $test_class);
-      list($class, $name) = explode('->', $result->function, 2);
+      if (strpos($result->function, '->') !== FALSE) {
+        list($class, $name) = explode('->', $result->function, 2);
+      }
+      else {
+        $name = $result->function;
+      }
       $case->setAttribute('name', $name);
 
       // Passes get no further attention, but failures and exceptions get to add more detail:
-- 
GitLab