Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix EZP-26209: Textline legacy search indexing causes TransactionError #1338

Merged
merged 1 commit into from
Dec 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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