Skip to content

Commit

Permalink
[BUGFIX] Use the correct return type for method copyRecord_raw
Browse files Browse the repository at this point in the history
DataHandler->copyRecord_raw can also return null.
This should be reflected in the doc header as well.

Resolves: #102098
Releases: main, 12.4, 11.5
Change-Id: Ic7a12233efd32b67f0bf25d6478a03f807a5623e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81353
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
simonschaufi authored and lolli42 committed Oct 6, 2023
1 parent d5076df commit 6448b4c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions Build/phpstan/phpstan-baseline.neon
Expand Up @@ -700,11 +700,6 @@ parameters:
count: 1
path: ../../typo3/sysext/core/Classes/DataHandling/DataHandler.php

-
message: "#^Method TYPO3\\\\CMS\\\\Core\\\\DataHandling\\\\DataHandler\\:\\:copyRecord_raw\\(\\) should return int but returns null\\.$#"
count: 4
path: ../../typo3/sysext/core/Classes/DataHandling/DataHandler.php

-
message: "#^Method TYPO3\\\\CMS\\\\Core\\\\DataHandling\\\\DataHandler\\:\\:doesPageHaveUnallowedTables\\(\\) should return array\\|bool but returns string\\.$#"
count: 1
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/core/Classes/DataHandling/DataHandler.php
Expand Up @@ -3594,7 +3594,7 @@ public function copySpecificPage($uid, $destPid, $copyTablesArray, $first = fals
* @param int $pid Element PID (real PID, not checked)
* @param array $overrideArray Override array - must NOT contain any fields not in the table!
* @param array $workspaceOptions Options to be forwarded if actions happen on a workspace currently
* @return int Returns the new ID of the record (if applicable)
* @return int|null Returns the new ID of the record (if applicable)
* @internal should only be used from within DataHandler
*/
public function copyRecord_raw($table, $uid, $pid, $overrideArray = [], array $workspaceOptions = [])
Expand Down

0 comments on commit 6448b4c

Please sign in to comment.