[TYPO3] seo_basics and PHP error "cannot use string offset as an array"

Dmitry Dulepov [typo3] dmitry at typo3.org
Fri Aug 29 13:02:07 CEST 2008


Hi!

Andrew Plank wrote:
> Aha! Now I see why I was getting the error in the first place... My 
> realurl_conf.php file is missing a 'fileName' => array() declaration.
> 
> Thanks for waking me up to that, Dmitry! :D

Well, there is still a bug because this section is optional ;) You can fix it using this code:

foreach ($realurl as $host => $cnf) {
   if (!isset($realurl[$host]['fileName'])) {
       $realurl[$host]['fileName'] = array(); //<- the fix
   }
   $realurl[$host]['fileName']['index']['sitemap.xml']
      ['keyValues']['type'] = 776;
} 

-- 
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