Index: trunk/psLib/src/sys/psString.c
===================================================================
--- trunk/psLib/src/sys/psString.c	(revision 7852)
+++ trunk/psLib/src/sys/psString.c	(revision 7879)
@@ -13,6 +13,6 @@
  *  @author David Robbins, MHPCC
  *
- *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-07-10 20:15:08 $
+ *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-07-12 21:17:51 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -223,15 +223,11 @@
                             const char *key)
 {
-    if (input == NULL ) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                "Invalid string in psStringSubstitute.  Input cannot be NULL or empty.\n");
-        return NULL;
-    } else if (strlen(input) == 0) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                "Invalid string in psStringSubstitute.  Input cannot be NULL or empty.\n");
-        return NULL;
-    }
-    if (key == NULL || strlen(key) == 0) {
-        return NULL;
+    // Empty input gives empty output
+    if (!input || strlen(input) == 0) {
+        return input;
+    }
+    // No key gives the same as the input
+    if (!key || strlen(key) == 0) {
+        return input;
     }
 
