瀏覽代碼

Do not attempt to json_decode null values

Nils Adermann 5 年之前
父節點
當前提交
47812d715f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Packagist/WebBundle/Entity/Version.php

+ 1 - 1
src/Packagist/WebBundle/Entity/Version.php

@@ -642,7 +642,7 @@ class Version
      */
     public function getFunding()
     {
-        return json_decode($this->funding, true);
+        return $this->funding ? json_decode($this->funding, true) : null;
     }
 
     /**