Actions
Bug #89531
closedRegression: "Show" in context menu for pages always shows root page on databases not casting return types
Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2019-10-28
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
no-brainer
Is Regression:
Yes
Sprint Focus:
Description
Since #56351 in V9.5.10 the "Show" link in context menus for pages is not opening the selected page when a database or database driver is used returning only strings, like the default settings of the "pdo_mysql" driver.
The following line from the method getPreviewPid
in Web/typo3/sysext/backend/Classes/ContextMenu/ItemProviders/PageProvider.php
will always return the second value, since $this->record['sys_language_uid']
is not type casted to an integer before doing the strict comparison, which means always false:
return (int)$this->record['sys_language_uid'] === 0 ? (int)$this->record['uid'] : (int)$this->record['l10n_parent'];
Actions