Commit 4f617685 authored by Dave Reid's avatar Dave Reid

Fixed issue with realpath() returning an empty value.

parent ddcba780
......@@ -37,7 +37,12 @@ class XMLSitemapWriter extends XMLWriter {
public function openUri($uri) {
$return = parent::openUri(realpath($uri));
if ($realpath = realpath($uri)) {
// Convert to a real path if possible. Sometimes this function returns
// a FALSE value, so use the original value when that happens.
$uri = $realpath;
$return = parent::openUri($uri);
if (!$return) {
throw new XMLSitemapGenerationException(t('Could not open file @file for writing.', array('@file' => $uri)));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment