[4.2] Database : set $options as an empty array per default

Fix #5959 
Also add missing docblocks