Skip to content

Commit

Permalink
[BUGFIX] Fix wrong return hint for getRecordOverlay
Browse files Browse the repository at this point in the history
This commit changes the return hint of
TYPO3\CMS\Core\Domain\Repository\PageRepository::getRecordOverlay to
mention that the function returns NULL instead of FALSE, if
$OLmode is "hideNonTranslated" and no translation is found

Resolves: #92052
Releases: master, 10.4
Change-Id: I5ee9504d234b230f80a6108ad53698770cc56f60
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65392
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
  • Loading branch information
the-coding-owl authored and andreaskienast committed Aug 21, 2020
1 parent 37ea978 commit 02778ae
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,9 @@ protected function getPageOverlaysForLanguageUids(array $pageUids, array $langua
* @param string $table Table name
* @param array $row Record to overlay. Must contain uid, pid and $table]['ctrl']['languageField']
* @param int $sys_language_content Pointer to the sys_language uid for content on the site.
* @param string $OLmode Overlay mode. If "hideNonTranslated" then records without translation will not be returned un-translated but unset (and return value is FALSE)
* @param string $OLmode Overlay mode. If "hideNonTranslated" then records without translation will not be returned un-translated but unset (and return value is NULL)
* @throws \UnexpectedValueException
* @return mixed Returns the input record, possibly overlaid with a translation. But if $OLmode is "hideNonTranslated" then it will return FALSE if no translation is found.
* @return mixed Returns the input record, possibly overlaid with a translation. But if $OLmode is "hideNonTranslated" then it will return NULL if no translation is found.
*/
public function getRecordOverlay($table, $row, $sys_language_content, $OLmode = '')
{
Expand Down

0 comments on commit 02778ae

Please sign in to comment.