Fixed a "bug" where function return values was used in an empty() call.
Stupid PHP!