Fixed PHP warning for foreach in class-general.php