Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -1147,12 +1147,6 @@
'count' => 2,
'path' => __DIR__ . '/src/Controller/Backend/ContentEditController.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method getLocale\\(\\) on Bolt\\\\Entity\\\\User\\|null\\.$#',
'identifier' => 'method.nonObject',
'count' => 1,
'path' => __DIR__ . '/src/Controller/Backend/ContentEditController.php',
];
$ignoreErrors[] = [
'message' => '#^Method Bolt\\\\Controller\\\\Backend\\\\ContentEditController\\:\\:getFieldToUpdate\\(\\) has parameter \\$fieldDefinition with no type specified\\.$#',
'identifier' => 'missingType.parameter',
Expand Down
3 changes: 1 addition & 2 deletions src/Controller/Backend/ContentEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,9 @@ public function save(Request $request, ?Content $originalContent = null, ?Conten
$event = new ContentEvent($content);
$this->dispatcher->dispatch($event, ContentEvent::POST_SAVE);

$locale = $originalAuthor->getLocale();

// If we're "Saving Ajaxy"
if ($request->isXmlHttpRequest()) {
$locale = $originalAuthor ? $originalAuthor->getLocale() : $request->getLocale();
$modified = sprintf(
'(%s: %s)',
$this->translator->trans('field.modifiedAt', [], null, $locale),
Expand Down
Loading