Browse Source

Fixes bug #548189. The code was checking for the nickname being set in the
post, but the code didn't mind if nickname wasn't set later. This caused
the whole add code to be skipped if you missed the nickname.

jangliss 22 năm trước cách đây
mục cha
commit
78b4aca80b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/addressbook.php

+ 1 - 1
src/addressbook.php

@@ -118,7 +118,7 @@ if(sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'P
     /**************************************************
     /**************************************************
      * Add new address                                *
      * Add new address                                *
      **************************************************/
      **************************************************/
-    if (!empty($addaddr['nickname'])) {
+    if (isset($addaddr)) {
         foreach( $addaddr as $k => $adr ) {
         foreach( $addaddr as $k => $adr ) {
             $addaddr[$k] = strip_tags( $adr );
             $addaddr[$k] = strip_tags( $adr );
         }
         }