diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-02-23 18:23:09 +0100 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-02-23 18:23:09 +0100 |
commit | 3e756407a0e2cd2da68a59b0ea50acd72fe4d415 (patch) | |
tree | 3886b26002f0fc72cd1b26c331ee33199c5bb8de /lib/db.php | |
parent | a62e109e8cafe710f7bf47c86815e34106852285 (diff) | |
download | nextcloud-server-3e756407a0e2cd2da68a59b0ea50acd72fe4d415.tar.gz nextcloud-server-3e756407a0e2cd2da68a59b0ea50acd72fe4d415.zip |
check if the tempfile was created successfully
Diffstat (limited to 'lib/db.php')
-rw-r--r-- | lib/db.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/db.php b/lib/db.php index 9d3c20e0145..4c17cd0dbd1 100644 --- a/lib/db.php +++ b/lib/db.php @@ -318,6 +318,9 @@ class OC_DB { // Make changes and save them to a temporary file $file2 = tempnam( get_temp_dir(), 'oc_db_scheme_' ); + if($file2 == ''){ + die('could not create tempfile in get_temp_dir() - aborting'); + } $content = str_replace( '*dbname*', $CONFIG_DBNAME, $content ); $content = str_replace( '*dbprefix*', $CONFIG_DBTABLEPREFIX, $content ); if( $CONFIG_DBTYPE == 'pgsql' ){ //mysql support it too but sqlite doesn't |