Fix #0016431: Numerous "Invalid argument supplied for foreach()" errors when installing with DB script printed to screen

Signed-off-by: Damien Regad <dregad@mantisbt.org>