Skip to content

Commit

Permalink
Fix uninitualized variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ipf committed Jan 8, 2025
1 parent 790423f commit 1f76577
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Classes/Controller/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ protected function addStandardAssignments(): void
$this->searchProvider->setConfigurationValue('extendedSearch', $this->searchProvider->isExtendedSearch());
$this->searchProvider->setConfigurationValue(
'uid',
$this->configurationManager->getContentObject()->data['uid']
$this->request->getAttribute('currentContentObject')->data['uid']
);
$this->searchProvider->setConfigurationValue('prefixID', 'tx_find_find');
$this->searchProvider->setConfigurationValue('pageTitle', $GLOBALS['TSFE']->page['title']);
Expand Down
6 changes: 2 additions & 4 deletions Classes/ViewHelpers/Find/PageListViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,11 @@ public function initializeArguments()
$this->registerArgument('minimumGapSize', 'int', 'gaps of fewer items than this are filles', false, 2);
}

/**
* @return array
*/
public static function renderStatic(
array $arguments,
\Closure $renderChildrenClosure,
RenderingContextInterface $renderingContext,
) {
): array {
$currentPage = ($arguments['currentPage'] ? (int) $arguments['currentPage'] : 1);
$numberOfPages = (int) ceil($arguments['resultCount'] / $arguments['perPage']);
$adjacentPages = (int) $arguments['adjacentPages'];
Expand All @@ -63,6 +60,7 @@ public static function renderStatic(
$minimumGapSize = (int) $arguments['minimumGapSize'];

$pageIndex = 1;
$pages = [];
while ($pageIndex <= $numberOfPages) {
$pageInfo = ['number' => $pageIndex, 'current' => false, 'gap' => false];

Expand Down
16 changes: 7 additions & 9 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,21 @@
use Rector\Set\ValueObject\SetList;
use Ssch\TYPO3Rector\Set\Typo3LevelSetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
return RectorConfig::configure()->withPaths(
[
__DIR__.'/Classes',
__DIR__.'/Tests',
__DIR__.'/Configuration',
__DIR__.'/Resources',
__DIR__.'/*.php',
]);

$rectorConfig->skip([__DIR__.'/.Build/vendor',
]
)
->withSkip([__DIR__.'/.Build/vendor',
__DIR__.'/var',
__DIR__.'/*.cache', ]);

$rectorConfig->sets([
__DIR__.'/*.cache', ])
->withSets([
SetList::PHP_83,
Typo3LevelSetList::UP_TO_TYPO3_12,
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
]);
};

0 comments on commit 1f76577

Please sign in to comment.