[TYPO3-dev] [seo_basics] Bugfix for realurl string pointer
Steffen Gebert
steffen at steffen-gebert.de
Tue Jan 6 17:42:37 CET 2009
Hi Benni,
I found a bug in seo_basics, which results in a "cannot user string offset as an array" like in [1].
But this time it's caused because of string pointers in realurl config - you surely know the following config is totally valid:
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
'example.org' => 'www.example.org',
'www.example.org' => array(
...
But seo_basics treats the string 'www.example.org' as an array while processing key 'example.org'.
FIX:
--- seo_basics.orig/ext_localconf.php 2009-01-06 17:34:29.000000000 +0100
+++ seo_basics/ext_localconf.php 2009-01-06 17:33:29.000000000 +0100
@@ -20,6 +20,11 @@
$realurl = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'];
if (is_array($realurl)) {
foreach ($realurl as $host => $cnf) {
+ // we won't do anything with string pointer (e.g. example.org => www.example.org)
+ if (!is_array($realurl[$host])) {
+ continue;
+ }
+
if (!isset($realurl[$host]['fileName'])) {
$realurl[$host]['fileName'] = array();
}
[1] http://lists.netfielders.de/pipermail/typo3-english/2008-August/052967.html
Regards
Steffen
More information about the TYPO3-dev
mailing list