File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -327,21 +327,21 @@ public function getBookVariables($id)
327327     * 
328328     * @param int $bookID 
329329     * @param string $email User email 
330-      * @param array $data  User vars in [key=>value] format 
330+      * @param array $vars  User vars in [key=>value] format 
331331     * @return stdClass 
332332     */ 
333-     public  function  updateEmailVariables (int  $ bookID , string  $ email , array  $ data  )
333+     public  function  updateEmailVariables (int  $ bookID , string  $ email , array  $ vars  )
334334    {
335335        if  (empty ($ bookID )) {
336336            return  $ this  ->handleError ('Empty book id ' );
337337        }
338338
339-         $ vars   = ['email '  => $ email , 'variables '  => []];
340-         foreach  ($ data   as  $ name  => $ val ) {
341-             $ vars  ['variables ' ][] = ['name '  => $ name , 'value '  => $ val ];
339+         $ data   = ['email '  => $ email , 'variables '  => []];
340+         foreach  ($ vars   as  $ name  => $ val ) {
341+             $ data  ['variables ' ][] = ['name '  => $ name , 'value '  => $ val ];
342342        }
343343
344-         $ requestResult  = $ this  ->sendRequest ('/addressbooks/ '  . $ bookID  . '/emails/variable ' , 'POST ' , $ vars  );
344+         $ requestResult  = $ this  ->sendRequest ('/addressbooks/ '  . $ bookID  . '/emails/variable ' , 'POST ' , $ data  );
345345
346346        return  $ this  ->handleResult ($ requestResult );
347347    }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments