Skip to content
Snippets Groups Projects
Commit 3e756407 authored by Georg Ehrke's avatar Georg Ehrke
Browse files

check if the tempfile was created successfully

parent a62e109e
Branches
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment