Commit c654e762 authored by Antoine Le Gonidec's avatar Antoine Le Gonidec

Archive::getDependenciesAttribute — Fix crash when trying to return details of...

Archive::getDependenciesAttribute — Fix crash when trying to return details of an archive with no dependency
parent 2dde5980
......@@ -89,6 +89,7 @@ class Archive extends Model {
$type = $this->type;
$generic_dependencies = $dependencies_relationships_table->where('archive_type', $type)
->pluck('dependency_name');
$dependencies = [];
foreach ( $generic_dependencies as $name ) {
$dependencies_table = app('db')->table($this->dependencies_table);
$packages = $dependencies_table->where('name', $name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment