diff --git a/inc/lib_config.php b/inc/lib_config.php
index 6863146cde90fad8c78bbd622767741e511bf95e..75ddaafc31692c335747be728b3a2fb414c24d42 100644
--- a/inc/lib_config.php
+++ b/inc/lib_config.php
@@ -134,6 +134,7 @@ class OC_CONFIG{
 				$configContent .= "\n\$CONFIG_$key = $value;";  // e.g. $CONFIG_PI = 3.14;
 			}
 		}
+		$configContent .= "\n?>";
 		$filename = "$SERVERROOT/config/config.php";
 		file_put_contents($filename, $configContent);
 	}