From aaac5b48069c1b72383679849d90f5bb605b7e11 Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 26 Sep 2009 20:41:36 +0000 Subject: [PATCH] - Prevent a warning if the user has no types on delete --- user.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/user.inc.php b/user.inc.php index 963cff58..1f9ad8b8 100644 --- a/user.inc.php +++ b/user.inc.php @@ -419,7 +419,9 @@ function user_delete($u, $type=false) call_user_func("user_delete_$type", $u); } else { /* Delete the whole user */ - foreach($u['types'] as $t) call_user_func("user_delete_$t", $u); + if(is_array($u['types']) { + foreach($u['types'] as $t) call_user_func("user_delete_$t", $u); + } $finish_delete = true; } if($finish_delete == true) {