[bugfix: #964] undefined variable errors

http://support.silisoftware.com/phpBB3/viewtopic.php?t=961#p2243
http://support.silisoftware.com/phpBB3/viewtopic.php?t=964