Skip to content

Commit

Permalink
phpstan fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrothauer committed Jul 4, 2024
1 parent d5c3707 commit bd46038
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Controller/EventsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ private function _edit($events, $isEditMode)
$data['lat'] = str_replace(',', '.', $data['lat']);
$data['lng'] = str_replace(',', '.', $data['lng']);
}
$data['province_id'] = $geoData['provinceId'];
$data['province_id'] = $geoData['provinceId'] ?? 0;
if ($isEditMode) {
$data['uid'] = $events[0]->uid;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/WorkshopsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private function _edit($workshop, $isEditMode)
$this->request = $this->request->withData('Workshops.lat', str_replace(',', '.', $this->request->getData('Workshops.lat')));
$this->request = $this->request->withData('Workshops.lng', str_replace(',', '.', $this->request->getData('Workshops.lng')));
}
$this->request = $this->request->withData('Workshops.province_id', $geoData['provinceId']);
$this->request = $this->request->withData('Workshops.province_id', $geoData['provinceId'] ?? 0);

$patchedEntity = $this->Workshop->getPatchedEntityForAdminEdit($workshop, $this->request->getData());

Expand Down

0 comments on commit bd46038

Please sign in to comment.