Commit ee896746 authored by Nicole Cordes's avatar Nicole Cordes Committed by Markus Klein
Browse files

[BUGFIX] New content elements are always stored on pid 0

Due to patch https://review.typo3.org/#/c/30305/ the string comparison
on colPos fails and new content elements are always stored on pid 0.
This patch corrects the check for an integer colPos type by setting the
unused variable to NULL.

Resolves: #59059
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: Iecd7f0cacf5c9315d882eebeb3893bcfa63ae7eb
Reviewed-on: https://review.typo3.org/30389
Reviewed-by: Fabien Udriot
Tested-by: Fabien Udriot
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Markus Klein
Tested-by: Markus Klein
parent 9a47bd20
......@@ -123,7 +123,7 @@ class NewContentElementController {
$this->id = (int)GeneralUtility::_GP('id');
$this->sys_language = (int)GeneralUtility::_GP('sys_language_uid');
$this->R_URI = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
$this->colPos = (int)GeneralUtility::_GP('colPos');
$this->colPos = GeneralUtility::_GP('colPos') === NULL ? NULL : (int)GeneralUtility::_GP('colPos');
$this->uid_pid = (int)GeneralUtility::_GP('uid_pid');
$this->MCONF['name'] = 'xMOD_db_new_content_el';
$this->modTSconfig = BackendUtility::getModTSconfig($this->id, 'mod.wizards.newContentElement');
......@@ -156,7 +156,7 @@ class NewContentElementController {
$posMap->cur_sys_language = $this->sys_language;
$posMap->backPath = $GLOBALS['BACK_PATH'];
// If a column is pre-set:
if ((string) $this->colPos != '') {
if (isset($this->colPos)) {
if ($this->uid_pid < 0) {
$row = array();
$row['uid'] = abs($this->uid_pid);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment