[dev] Re: Missing sprintf() arguments in sam/lib/api.php

John Morrissey jwm at horde.net
Mon May 5 22:57:29 PDT 2003


On Mon, May 05, 2003 at 09:57:03PM -0400, John Morrissey wrote:
% See attached patch.

Erm, this one.

john
-- 
John Morrissey          _o            /\         ----  __o
jwm at horde.net        _-< \_          /  \       ----  <  \,
www.horde.net/    __(_)/_(_)________/    \_______(_) /_(_)__
-------------- next part --------------
Index: sam/lib/api.php
===================================================================
RCS file: /repository/sam/lib/api.php,v
retrieving revision 1.2
diff -u -r1.2 api.php
--- sam/lib/api.php	26 Feb 2003 17:37:30 -0000	1.2
+++ sam/lib/api.php	6 May 2003 01:56:19 -0000
@@ -40,13 +40,13 @@
     if (is_array($addresses)) {
         foreach ($addresses as $address) {
             if (in_array($address, $blacklist_from)) {
-                return PEAR::raiseError(sprintf(_("%s is already in your blacklist filter.")));
+                return PEAR::raiseError(sprintf(_("%s is already in your blacklist filter."), $address));
             }
             $blacklist_from[] = $address;
         }
     } else {
         if (in_array($addresses, $blacklist_from)) {
-            return PEAR::raiseError(sprintf(_("%s is already in your blacklist filter.")));
+            return PEAR::raiseError(sprintf(_("%s is already in your blacklist filter."), $addresses));
         }
         $blacklist_from[] = $addresses;
     }
@@ -70,13 +70,13 @@
     if (is_array($addresses)) {
         foreach ($addresses as $address) {
             if (in_array($address, $whitelist_from)) {
-                return PEAR::raiseError(sprintf(_("%s is already in your whitelist filter.")));
+                return PEAR::raiseError(sprintf(_("%s is already in your whitelist filter."), $address));
             }
             $whitelist_from[] = $address;
         }
     } else {
         if (in_array($addresses, $whitelist_from)) {
-            return PEAR::raiseError(sprintf(_("%s is already in your whitelist filter.")));
+            return PEAR::raiseError(sprintf(_("%s is already in your whitelist filter."), $addresses));
         }
         $whitelist_from[] = $addresses;
     }


More information about the dev mailing list