Previously imapsync only attached the timeout1 / timeout2 arguments if the argument was negative (which is not even possible). Now the argument is added for every positive number.
Fixes#6590
The return value of the function caused a warning
in header.inc.php:42 if no additional links were set.
header.inc.php is the only caller of this function,
thus it is safe to return an empty array here.