We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98d0bac commit f469ed6Copy full SHA for f469ed6
1 file changed
src/Row.php
@@ -140,9 +140,11 @@ public function search($q)
140
*/
141
public function embedResources($resources)
142
{
143
- foreach($resources as $resource){
144
- $tabName = $this->table->getTabName();
145
- $this->embeddedResources[$resource] = $this->table->getDb()->$resource->filterByParent(['table' => $tabName, 'id' => $this->id]);
+ if($resources){
+ foreach($resources as $resource){
+ $tabName = $this->table->getTabName();
146
+ $this->embeddedResources[$resource] = $this->table->getDb()->$resource->filterByParent(['table' => $tabName, 'id' => $this->id]);
147
+ }
148
}
149
150
0 commit comments