jqh 5 年之前
父节点
当前提交
24549c20d6
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      src/Form.php

+ 6 - 5
src/Form.php

@@ -620,11 +620,12 @@ class Form implements Renderable
         }
 
         if ($response = $this->handleUploadFile($data)) {
-            // Stash uploadted file path.
-            $this->step()->stash(
-                [$data['upload_column'] => $response->getData()->id],
-                true
-            );
+            if (($value = $response->getData()) && ! empty($value->id)) {
+                $this->step()->stash(
+                    [$data['upload_column'] => $value->id],
+                    true
+                );
+            }
 
             return $response;
         }