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 committed Dec 19, 2017
1 parent 81a53da commit fef079e
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'], $db->MAX_INT );
$integerValue = max( $integerValue, $db->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 @@ -1809,6 +1809,20 @@ public function countStringSize( $string )
* @var int One of the eZDB::ERROR_HANDLING_* constants
*/
protected $errorHandling = eZDB::ERROR_HANDLING_STANDARD;

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

/**
* Minimal value for int columns
*
* @var int
*/
public $MIN_INT = -2147483648;
}

?>

0 comments on commit fef079e

Please sign in to comment.