Browse Source

Fixing PHP warning

Julio Montoya 12 years ago
parent
commit
5b38047ab3
1 changed files with 4 additions and 2 deletions
  1. 4 2
      main/document/document.php

+ 4 - 2
main/document/document.php

@@ -53,7 +53,9 @@ if (isset($_SESSION['temp_audio_nanogong']) && !empty($_SESSION['temp_audio_nano
 }
 
 if (isset($_SESSION['temp_realpath_image']) && !empty($_SESSION['temp_realpath_image'])) {
-    unlink($_SESSION['temp_realpath_image']);
+    if (file_exists($_SESSION['temp_realpath_image'])) {
+        unlink($_SESSION['temp_realpath_image']);
+    }
 }
 
 //Removing sessions
@@ -1587,4 +1589,4 @@ if (!empty($table_footer)) {
 }
 
 // Footer
-Display::display_footer();
+Display::display_footer();