Gant Branch Sorting not working correct

Hi, i am using the Gantt. I initialized it with

gantt.config.order_branch = true;

and using the data connector for PHP (loaded from github, as it seems that the gantt support is not in the one that can be downloaded from the product page: github.com/DHTMLX/connector-php)

The problem i am facing is, if i have two tasks on the same level (no subtasks) and i am moving the second one to the first position and reload the gantt, the position has not changed. Same if i move the first one to the second position.

A call to the database is initiated and there seems to be an error on the log:
Undefined variable: dropnext at D:\xampp\htdocs\ps_hrplanner\gantt_5.0.5_gpl\codebase\connector\db_common.php line 719

This is the full log:

====================================
Log started, 06/02/2018 11:50:49

DataProcessor object initialized
17_id => 17
17_start_date => 2018-02-01 00:00:00
17_duration => 120
17_text => CuReMa Consulting
17_progress => 0
17_sortorder => 4
17_parent => 0
17_end_date => 2018-06-01 00:00:00
17_target => 21
17_!nativeeditor_status => order
ids => 17

Row data [17]
id => 17
start_date => 2018-02-01 00:00:00
duration => 120
text => CuReMa Consulting
progress => 0
sortorder => 4
parent => 0
end_date => 2018-06-01 00:00:00
target => 21
!nativeeditor_status => order

select sortorder as dhx_index from gantt_tasks where id = ‘17’

update gantt_tasks set sortorder = sortorder - 1 where sortorder >= 4

select sortorder as dhx_index from gantt_tasks where id = ‘21’

Undefined variable: dropnext at D:\xampp\htdocs\ps_hrplanner\gantt_5.0.5_gpl\codebase\connector\db_common.php line 719

update gantt_tasks set sortorder = sortorder + 1 where sortorder >= 4

update gantt_tasks set sortorder = 4 where id = ‘17’

UPDATE gantt_tasks SET parent = 0 WHERE id = 17

Edit operation finished
0 => action:order; sid:17; tid:17;

Done in 0.059712886810303s

This issue will be solved in the new version (i had the chance to check it with the new version).