Fixed bug #12958: Catchable fatal error in indexed_search
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Mon, 22 Feb 2010 13:32:47 +0000 (13:32 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Mon, 22 Feb 2010 13:32:47 +0000 (13:32 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6967 709f56b5-9817-0410-a4d7-c38de5d9e867

typo3/sysext/indexed_search/modfunc1/class.tx_indexedsearch_modfunc1.php
typo3/sysext/lang/locallang_general.xml

index b98fb68..bf709ad 100755 (executable)
@@ -434,10 +434,13 @@ class tx_indexedsearch_modfunc1 extends t3lib_extobjbase {
 
                                        // cHash parameters:
                                $arr = unserialize($row['cHashParams']);
-                               if (is_array($arr))             {
-                                       $theCHash = $arr['cHash'];
-                                       unset($arr['cHash']);
+                               if (!is_array($arr)) {
+                                       $arr = array(
+                                               'cHash' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.error', true)
+                                       );
                                }
+                               $theCHash = $arr['cHash'];
+                               unset($arr['cHash']);
 
                                if ($row['item_type'])  {       // pdf...
                                        $lines[] = '<td>'.($arr['key'] ? 'Page '.$arr['key'] : '').'&nbsp;</td>';
index 2e95f0e..e2bcd1d 100755 (executable)
@@ -61,6 +61,7 @@
                        <label index="LGL.l18n_parent">Transl.Orig:</label>
                        <label index="LGL.allLanguages">[All]</label>
                        <label index="LGL.versionLabel">Versioning Label:</label>
+                       <label index="LGL.error">Error!</label>
                </languageKey>
        </data>
 </T3locallang>