Skip to content

Commit

Permalink
Fix EZP-26209: Textline legacy search indexing causes TransactionError (
Browse files Browse the repository at this point in the history
  • Loading branch information
blankse authored and andrerom committed Dec 21, 2017
1 parent 215a997 commit 59d2c2b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/search/plugins/ezsearchengine/ezsearchengine.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ function indexWords( $contentObject, $indexArray, $wordIDArray, $placement = 0 )
$indexWord = $indexArray[$i]['Word'];
$contentClassAttributeID = $indexArray[$i]['ContentClassAttributeID'];
$identifier = $indexArray[$i]['identifier'];
$integerValue = $indexArray[$i]['integer_value'];
$integerValue = min( $indexArray[$i]['integer_value'], eZDBInterface::MAX_INT );
$integerValue = max( $integerValue, eZDBInterface::MIN_INT );
$wordID = $wordIDArray[$indexWord];

if ( isset( $indexArray[$i+1] ) )
Expand Down
14 changes: 14 additions & 0 deletions lib/ezdb/classes/ezdbinterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@ class eZDBInterface
const SERVER_MASTER = 1;
const SERVER_SLAVE = 2;

/**
* Maximal value for int columns
*
* @var int
*/
const MAX_INT = 2147483647;

/**
* Minimal value for int columns
*
* @var int
*/
const MIN_INT = -2147483648;

/**
* Creates a new eZDBInterface object and connects to the database backend.
*
Expand Down

0 comments on commit 59d2c2b

Please sign in to comment.