diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh
index 2b80af2ad1eb3f2a3af2fa3c396eeb1db5791d9d..f88db37ba212f99159e5b58a064b5c2402830e12 100644
--- a/lustre/tests/test-framework.sh
+++ b/lustre/tests/test-framework.sh
@@ -1239,7 +1239,7 @@ error_exit() {
 # (like ALWAYS_EXCEPT, but run the test and ignore the results.)
 # e.g. error_ignore 5494 "your message"
 error_ignore() {
-    TYPE="IGNORE (bz$1)"
+    local TYPE="IGNORE (bz$1)"
     shift
     error_noexit "$@"
 }