Fix #1063 $pids[0] used incorrectly for $post_info while splitting posts
Add a query limit
Merge pull request #1451 from Sama34/fix-1063

Fix #1063 $pids[0] used incorrectly for $post_info while splitting posts