Fixed issue with missing var $mem

See: https://github.com/nonumber/joomla-cms/commit/2a5a116d78f35aa802203e02b1b8047db241f6dd
This commit removed the $mem var initialization, which is still used in an if.

This PR fixed that.