Skip to content

Commit e52c053

Browse files
authored
Merge pull request #216 from ayoub-acx/fix-modified-date-null
fix modified date nill
2 parents 90e32ab + b5b9456 commit e52c053

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

components/SEOBundle/bundle/Controller/SitemapController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ protected function fillSitemap(DOMDocument $sitemap, DOMElement $root, SearchRes
141141
continue;
142142
}
143143

144-
$modified = $location->contentInfo->modificationDate->format('c');
144+
$modified = $location->contentInfo->modificationDate ?
145+
$location->contentInfo->modificationDate->format('c') : null;
145146
$loc = $sitemap->createElement('loc', $url);
146147
$lastmod = $sitemap->createElement('lastmod', $modified);
147148
$urlElt = $sitemap->createElement('url');

components/SolrSearchExtraBundle/src/lib/Tika/TikaLocalClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected function run($command): string
3737
'-jar',
3838
$this->jar,
3939
];
40-
$shellCommand = array_merge($shellCommand, explode(" ", $command));
40+
$shellCommand = array_merge($shellCommand, explode(' ', $command));
4141

4242
$process = new Process($shellCommand);
4343
$process->setWorkingDirectory(__DIR__.'/../../../');

0 commit comments

Comments
 (0)