Commit 05bbf375 authored by Markus Klein's avatar 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/30419
Tested-by: SITS Developer
Reviewed-by: Markus Klein
Tested-by: Markus Klein
parent 4fbb2504
......@@ -186,7 +186,7 @@ class SC_db_new_content_el {
$this->id = intval(t3lib_div::_GP('id'));
$this->sys_language = intval(t3lib_div::_GP('sys_language_uid'));
$this->R_URI = t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'));
$this->colPos = (int)t3lib_div::_GP('colPos');
$this->colPos = t3lib_div::_GP('colPos') === NULL ? NULL : (int)t3lib_div::_GP('colPos');
$this->uid_pid = intval(t3lib_div::_GP('uid_pid'));
$this->MCONF['name'] = 'xMOD_db_new_content_el';
......@@ -227,7 +227,7 @@ class SC_db_new_content_el {
$posMap->cur_sys_language = $this->sys_language;
$posMap->backPath = $BACK_PATH;
if ((string)$this->colPos!='') { // If a column is pre-set:
if (isset($this->colPos)) { // If a column is pre-set:
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