}
// save box to page assignments
- if (!empty($this->parameters['boxToPage'])) {
+ if (isset($this->parameters['boxToPage'])) {
$sql = "DELETE FROM wcf".WCF_N."_box_to_page
WHERE pageID = ?";
$deleteStatement = WCF::getDB()->prepareStatement($sql);
foreach ($this->getObjects() as $page) {
$deleteStatement->execute([$page->pageID]);
- foreach ($this->parameters['boxToPage'] as $boxData) {
- $insertStatement->execute([
- $boxData['boxID'],
- $page->pageID,
- $boxData['visible']
- ]);
- }
+ if (!empty($this->parameters['boxToPage'])) {
+ foreach ($this->parameters['boxToPage'] as $boxData) {
+ $insertStatement->execute([
+ $boxData['boxID'],
+ $page->pageID,
+ $boxData['visible']
+ ]);
+ }
+ }
}
}
}