From 95c97c1e96e999a8e6792854bed8f1b6660cb3b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Tue, 25 Aug 2009 22:29:53 +0200 Subject: [PATCH] tel_type can't be null. --- include/user.func.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/user.func.inc.php b/include/user.func.inc.php index 1cbd1f9..c37be8f 100644 --- a/include/user.func.inc.php +++ b/include/user.func.inc.php @@ -428,9 +428,11 @@ function remove_user_address($uid, $adrid) { // }}} // {{{ function add_user_tel() function add_user_tel($uid, $adrid, $telid, $tel) { - XDB::execute( - "INSERT INTO tels SET uid = {?}, adrid = {?}, telid = {?}, tel = {?}, tel_type = {?}, tel_pub = {?}", - $uid, $adrid, $telid, $tel['tel'], $tel['tel_type'], $tel['tel_pub']); + $tel['tel_type'] = ($tel['tel_type'] ? $tel['tel_type'] : ''); + XDB::execute('INSERT INTO tels + SET uid = {?}, adrid = {?}, telid = {?}, tel = {?}, + tel_type = {?}, tel_pub = {?}', + $uid, $adrid, $telid, $tel['tel'], $tel['tel_type'], $tel['tel_pub']); } // }}} // {{{ function update_user_tel() -- 2.1.4