[BUGFIX] Typecast cookie value to string 81/28281/2
authorGeorg Ringer <georg.ringer@gmail.com>
Wed, 12 Mar 2014 06:28:41 +0000 (07:28 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Wed, 12 Mar 2014 07:08:29 +0000 (08:08 +0100)
The cookie might be null, therefore the INSERTquery fails in
indexed_search.

As a solution, use a type cast to string.

Change-Id: If9e650ee713c75420859813546d138000b3023ff
Resolves: #55989
Releases: 6.2
Reviewed-on: https://review.typo3.org/28281
Reviewed-by: Christian Kuhn
Reviewed-by: Tymoteusz Motylewski
Tested-by: Tymoteusz Motylewski
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php

index 312f5bf..bd56950 100644 (file)
@@ -1303,7 +1303,7 @@ class SearchFormController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
                        'searchoptions' => serialize(array($this->piVars, $sWArr, $pt)),
                        'feuser_id' => (int)$this->fe_user->user['uid'],
                        // fe_user id, integer
-                       'cookie' => $this->fe_user->id,
+                       'cookie' => (string)$this->fe_user->id,
                        // cookie as set or retrieve. If people has cookies disabled this will vary all the time...
                        'IP' => GeneralUtility::getIndpEnv('REMOTE_ADDR'),
                        // Remote IP address