1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01:00

[ticket/11495] Cast some values to int

PHPBB3-11495
This commit is contained in:
Joas Schilling 2013-04-19 19:09:22 +02:00
parent 3d54a81ed9
commit f66b5323a7

View File

@ -202,10 +202,10 @@ abstract class phpbb_nestedset_base implements phpbb_nestedset_interface
*/
if ($action == 'move_up')
{
$left_id = $target[$this->column_left_id];
$left_id = (int) $target[$this->column_left_id];
$right_id = (int) $item[$this->column_right_id];
$diff_up = (int) $item[$this->column_left_id] - $target[$this->column_left_id];
$diff_up = (int) $item[$this->column_left_id] - (int) $target[$this->column_left_id];
$diff_down = (int) $item[$this->column_right_id] + 1 - (int) $item[$this->column_left_id];
$move_up_left = (int) $item[$this->column_left_id];
@ -214,13 +214,13 @@ abstract class phpbb_nestedset_base implements phpbb_nestedset_interface
else
{
$left_id = (int) $item[$this->column_left_id];
$right_id = $target[$this->column_right_id];
$right_id = (int) $target[$this->column_right_id];
$diff_up = (int) $item[$this->column_right_id] + 1 - (int) $item[$this->column_left_id];
$diff_down = $target[$this->column_right_id] - (int) $item[$this->column_right_id];
$diff_down = (int) $target[$this->column_right_id] - (int) $item[$this->column_right_id];
$move_up_left = (int) $item[$this->column_right_id] + 1;
$move_up_right = $target[$this->column_right_id];
$move_up_right = (int) $target[$this->column_right_id];
}
// Now do the dirty job