Added a validation to the function create link file CT#191

skala
Arthur Portugal 15 years ago
parent f0c7117e04
commit 2f1ca458f1
  1. 9
      main/inc/lib/fileUpload.lib.php

@ -1527,10 +1527,13 @@ function create_link_file($filePath, $url)
.'<body>'
.'</body>'
.'</html>';
if (!($fp = fopen ($filePath, 'w'))) {
return false;
if(file_exists($filePath)){
if (!($fp = fopen ($filePath, 'w'))) {
return false;
}
return fwrite($fp, $fileContent);
}
return fwrite($fp, $fileContent);
}
//------------------------------------------------------------------------------

Loading…
Cancel
Save