dever 6 years ago
parent
commit
0e7a82ff30
1 changed files with 5 additions and 4 deletions
  1. 5 4
      lib/Store/Qiniu.php

+ 5 - 4
lib/Store/Qiniu.php

@@ -51,13 +51,14 @@ class Qiniu extends Core implements Config
             $file = Dever::load('upload/file-name', array('where_name' => $this->name, 'where_upload' => $this->data['key'], 'rand' => time()));
             
             if (!$this->limit) {
-
                 $data = Dever::curl($this->output['url'] . '?imageInfo');
                 if ($data) {
                     $data = json_decode($data, true);
-                    $this->limit = array($data['width'], $data['height']);
-                    $this->size = $data['size'];
-                    $this->ext = '.' . $data['format'];
+                    if (isset($data['width'])) {
+                        $this->limit = array($data['width'], $data['height']);
+                        $this->size = $data['size'];
+                        $this->ext = '.' . $data['format'];
+                    }
                 }
             }