wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[ljcom] r12653: LJSUP-13663: Error appeares when you try...

Committer: wisest-owl
LJSUP-13663: Error appeares when you try to add a gift

U   trunk/htdocs/admin/vgift/edit.bml
Modified: trunk/htdocs/admin/vgift/edit.bml
===================================================================
--- trunk/htdocs/admin/vgift/edit.bml	2012-09-14 14:04:08 UTC (rev 12652)
+++ trunk/htdocs/admin/vgift/edit.bml	2012-09-17 09:19:33 UTC (rev 12653)
@@ -33,12 +33,18 @@
         #BML::parse_multipart(\%POST, \$error, 999992048);
         #warn "ERROR: $error" and return $error if $error;
         my $large_file = LJ::Request->upload('vgift_content_large');
-        seek $large_file->fh, 0,0;
-        read $large_file->fh, my $large_file_content, $large_file->size;
+        my $large_file_content = '';
+        if ($large_file) {
+            seek $large_file->fh, 0,0;
+            read $large_file->fh, $large_file_content, $large_file->size;
+        }
 
         my $small_file = LJ::Request->upload('vgift_content_small');
-        seek $small_file->fh, 0,0;
-        read $small_file->fh, my $small_file_content, $small_file->size;
+        my $small_file_content = '';
+        if ($small_file) {
+            seek $small_file->fh, 0,0;
+            read $small_file->fh, $small_file_content, $small_file->size;
+        }
 
         my $vgift;
 

Tags: bml, ljcom, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments