kopia lustrzana https://github.com/pixelfed/pixelfed
				
				
				
			prevent crash when avatar not set on fresh install
							rodzic
							
								
									9fba7017fc
								
							
						
					
					
						commit
						bdc8ec77f0
					
				|  | @ -132,7 +132,7 @@ class Profile extends Model | |||
|     { | ||||
|         $url = Cache::remember("avatar:{$this->id}", 1440, function() { | ||||
|             $path = $this->avatar->media_path ?? 'public/avatars/default.png'; | ||||
|             $version = hash('sha1', $this->avatar->created_at); | ||||
|             $version = $this->avatar ? hash('sha1', $this->avatar->created_at) : ''; | ||||
|             $path = "{$path}?v={$version}"; | ||||
|             return url(Storage::url($path)); | ||||
|         }); | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Jeroen Smeets
						Jeroen Smeets