[TYPO3] seo_basics and PHP error "cannot use string offset as an array"
Dmitry Dulepov [typo3]
dmitry at typo3.org
Fri Aug 29 11:01:58 CEST 2008
Hi!
Andrew Plank wrote:
> Just installed seo_basics, but the sitemap feature wouldn't work (was
> getting a "cannot user string offset as an array" error in PHP) so I had
> to comment out the code that enables it in ext_localconf.php.
>
> After a bit of effort, I found a solution (should anyone else have this
> problem)
>
> Change this:
>
> foreach ($realurl as $host => $cnf) {
> $realurl[$host]['fileName']['index']['sitemap.xml']
> ['keyValues']['type'] = 776;
> }
>
> To this:
>
> foreach ($realurl as $host => $cnf) {
> $realurl[$host]['fileName'] = array(); //<- the fix
> $realurl[$host]['fileName']['index']['sitemap.xml']
> ['keyValues']['type'] = 776;
> }
And what if configuration already defined $realurl[$host]['fileName']? You erase it.
--
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/pages/book-reviews/presentation-zen-by-garr-reynolds/
More information about the TYPO3-english
mailing list