commit 3a396312cc78c63c3acb19f0d5c9c452340650b9 Author: Pieter Frenssen Date: Tue Apr 1 11:59:07 2014 +0200 1988780-13 diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index a69d3af..5e04270 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -2529,12 +2529,7 @@ class DrupalWebTestCase extends DrupalTestCase { // Return the string. $value = count($parts) > 1 ? 'concat(' . implode(', \'"\', ', $parts) . ')' : $parts[0]; } - // Use preg_replace_callback() instead of preg_replace() to prevent the - // regular expression engine from trying to substitute backreferences. - $replacement = function ($matches) use ($value) { - return $value; - }; - $xpath = preg_replace_callback('/' . preg_quote($placeholder) . '\b/', $replacement, $xpath); + $xpath = str_replace($placeholder, $value, $xpath); } return $xpath; }