`preloadSubsectionEntries` assumes `$parents` will be an array
brendo opened this issue · 3 comments
brendo commented
Resulting in:
Invalid argument supplied for foreach()
An error occurred in /Users/brendanabbott/Sites/symphony-2.local/extensions/subsectionmanager/extension.driver.php around line 337
332: */
333: public static function preloadSubsectionEntries($parents) {
334:
335: // Get parent data
336: $fields = array();
337: foreach($parents as $entry) {
338: $data = $entry->getData();
339:
340: // Get relation id
341: foreach($data as $field => $settings) {
I'd recommend setting the function to (array $parents = array()) or checking that $parents is actually an array before running foreach
ahwayakchih commented
brendo commented
Confirmed
PS: If you just type # {issue-number} (without the space between) in your commit messages, github will automatically link it to the relevant issue.
ahwayakchih commented
Cool, thanks :).