mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 21:49:01 +01:00
Check that $incidentDate is set before using it
This commit is contained in:
parent
a9a5eef275
commit
80caeea86a
@ -126,10 +126,12 @@ class IncidentController extends Controller
|
||||
Binput::get('notify', true)
|
||||
));
|
||||
|
||||
$incident->update([
|
||||
'created_at' => $incidentDate,
|
||||
'updated_at' => $incidentDate,
|
||||
]);
|
||||
if (isset($incidentDate)) {
|
||||
$incident->update([
|
||||
'created_at' => $incidentDate,
|
||||
'updated_at' => $incidentDate,
|
||||
]);
|
||||
}
|
||||
} catch (ValidationException $e) {
|
||||
return Redirect::route('dashboard.incidents.add')
|
||||
->withInput(Binput::all())
|
||||
|
Loading…
x
Reference in New Issue
Block a user