Project

General

Profile

Actions

Bug #33444

closed

Fatal error in configuration ($BE_USER->uc)

Added by Philipp Gampe almost 13 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2012-01-25
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

This happens when expanding the [BackendComponents] and then expanding the [States].

This sets $theValue in t3lib_arrayBrowser::wrapValue() and t3lib_arrayBrowser::wrapArrayKey() to be an objects.

This results in warnings that strlen() needs have a string and that addslashes() needs to have a string as argument.

The fatal error result in t3lib_utility_Math::canBeInterpretedAsInteger() is called with this object.

Fix is simply: Add checks for objects before doing the processing.

I can reproduce this bug on 4.6 and 4.7, but not with 4.5.
It has something to do with how the tree states are stored, becaue if I switch the sources, but not reload the backend (from 4.5 to master/4.6) I can even clear temp configuration in user settings, but this error does not show up. Only after backend reload the wrong values are saved in the UC array.

Anyway this is only a related issue.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #33446: canBeInterpretedAsInteger fatals if given an objectClosedPhilipp Gampe2012-01-25

Actions
Actions #1

Updated by Gerrit Code Review almost 13 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8693

Actions #2

Updated by Philipp Gampe almost 13 years ago

Uncaught TYPO3 Exception
#1: PHP Catchable Fatal Error: Object of class stdClass could not be converted to string in /home/phil/t3-playground/t3-git/t3lib/utility/class.t3lib_utility_math.php line 85 (More information)

t3lib_error_Exception thrown in file
/home/phil/t3-playground/t3-git/t3lib/error/class.t3lib_error_errorhandler.php in line 105.

7 t3lib_error_ErrorHandler::handleError(4096, "Object of class stdClass could not be converted to string", "/home/phil/t3-playground/t3-git/t3lib/utility/class.t3lib_utility_math.php", 85, array)

/home/phil/t3-playground/t3-git/t3lib/utility/class.t3lib_utility_math.php:
00083:    return FALSE;
00084:   }
00085:   return (string) intval($var) === (string) $var;
00086:  }
00087: 

6 t3lib_utility_Math::canBeInterpretedAsInteger(stdClass)

/home/phil/t3-playground/t3-git/t3lib/class.t3lib_arraybrowser.php:
00156:   if ($this->varName && !$this->dontLinkVar) {
00157:    $variableName = $this->varName . '[\'' . str_replace('.', '\'][\'', $depth) . '\'] = ' .
00158:     (!t3lib_utility_Math::canBeInterpretedAsInteger($theValue) ? '\'' . addslashes($theValue) . '\'' : $theValue) . '; ';
00159:    $label = '' . $label . '';
00160:   }

5 t3lib_arrayBrowser::wrapArrayKey("Pagetree", "BackendComponents.States.Pagetree", stdClass)

/home/phil/t3-playground/t3-git/t3lib/class.t3lib_arraybrowser.php:
00099: 
00100:    $label = $key;
00101:    $HTML .= $this->wrapArrayKey($label, $depth, !is_array($arr[$key]) ? $arr[$key] : '');
00102: 
00103:    if (!is_array($arr[$key])) {

4 t3lib_arrayBrowser::tree(array, "BackendComponents.States", "<img src="../../../sysext/t3skin/icons/gfx/ol/line.gif" width="18" height="16" align="top" alt="" />")

/home/phil/t3-playground/t3-git/t3lib/class.t3lib_arraybrowser.php:
00119:     $HTML .= $this->tree($arr[$key], $depth, $depthData . '
00121:      ' align="top" alt="" />');
00122:    }
00123:   }

3 t3lib_arrayBrowser::tree(array, "BackendComponents", "<img src="../../../sysext/t3skin/icons/gfx/ol/line….gif" width="18" height="16" align="top" alt="" />")

/home/phil/t3-playground/t3-git/t3lib/class.t3lib_arraybrowser.php:
00119:     $HTML .= $this->tree($arr[$key], $depth, $depthData . '
00121:      ' align="top" alt="" />');
00122:    }
00123:   }

2 t3lib_arrayBrowser::tree(array, "", "")

/home/phil/t3-playground/t3-git/typo3/sysext/lowlevel/config/index.php:
00241:   }
00242: 
00243:   $tree = $arrayBrowser->tree($theVar, '', '');
00244: 
00245:   $label = $this->MOD_MENU['function'][$this->MOD_SETTINGS['function']];

1 SC_mod_tools_config_index::main()

/home/phil/t3-playground/t3-git/typo3/sysext/lowlevel/config/index.php:
00386: $SOBE = t3lib_div::makeInstance('SC_mod_tools_config_index');
00387: $SOBE->init();
00388: $SOBE->main();
00389: $SOBE->printContent();
00390: ?>
Actions #3

Updated by Philipp Gampe almost 13 years ago

The value from UC field:

a:32:{s:19:"thumbnailsByDefault";i:1;s:14:"emailMeAtLogin";i:0;s:11:"startModule";s:10:"web_layout";s:8:"titleLen";s:2:"50";s:17:"edit_wideDocument";i:1;s:8:"edit_RTE";i:1;s:20:"edit_docModuleUpload";i:1;s:19:"enableFlashUploader";i:1;s:15:"disableCMlayers";i:0;s:15:"resizeTextareas";i:1;s:25:"resizeTextareas_MaxHeight";s:3:"500";s:24:"resizeTextareas_Flexible";i:0;s:4:"lang";s:0:"";s:8:"realName";s:0:"";s:5:"email";s:0:"";s:8:"password";s:0:"";s:9:"password2";s:0:"";s:10:"copyLevels";s:0:"";s:15:"recursiveDelete";i:0;s:8:"simulate";s:0:"";s:13:"debugInWindow";i:0;s:8:"rteWidth";s:0:"";s:9:"rteHeight";s:0:"";s:9:"rteResize";i:0;s:12:"rteMaxHeight";s:0:"";s:22:"rteCleanPasteBehaviour";s:9:"plainText";s:19:"firstLoginTimeStamp";i:1327516511;s:10:"moduleData";a:9:{s:10:"web_layout";a:7:{s:8:"function";s:1:"1";s:8:"language";s:1:"0";s:8:"tt_board";s:1:"0";s:10:"tt_address";s:1:"0";s:8:"tt_links";s:1:"0";s:11:"tt_calender";s:1:"0";s:11:"tt_products";s:1:"0";}s:9:"user_task";a:1:{s:4:"mode";s:11:"information";}s:9:"menuState";a:1:{s:12:"modmenu_file";i:0;}s:8:"web_perm";a:2:{s:5:"depth";s:1:"1";s:4:"mode";s:1:"0";}s:8:"web_func";a:3:{s:8:"function";s:22:"tx_funcwizards_webfunc";s:3:"wiz";s:26:"tx_wizardcrpages_webfunc_2";s:6:"cr_333";s:1:"0";}s:16:"web_txrecyclerM1";a:1:{s:8:"function";s:0:"";}s:8:"web_list";a:0:{}s:8:"web_info";a:9:{s:8:"function";s:30:"tx_linkvalidator_ModFuncReport";s:5:"pages";s:1:"0";s:9:"stat_type";s:1:"0";s:5:"depth";s:1:"0";s:2:"db";i:1;s:4:"file";i:1;s:8:"external";i:1;s:11:"linkhandler";i:0;s:11:"searchlevel";s:1:"3";}s:12:"tools_config";a:2:{s:8:"function";s:1:"8";s:6:"node_8";a:2:{s:17:"BackendComponents";i:1;s:24:"BackendComponents.States";i:1;}}}s:15:"moduleSessionID";a:8:{s:10:"web_layout";s:32:"8e3eb623a967efc9ea76c33a4f1afbdb";s:9:"user_task";s:32:"8e3eb623a967efc9ea76c33a4f1afbdb";s:8:"web_perm";s:32:"8e3eb623a967efc9ea76c33a4f1afbdb";s:8:"web_func";s:32:"8e3eb623a967efc9ea76c33a4f1afbdb";s:16:"web_txrecyclerM1";s:32:"8e3eb623a967efc9ea76c33a4f1afbdb";s:8:"web_list";s:32:"8e3eb623a967efc9ea76c33a4f1afbdb";s:8:"web_info";s:32:"8e3eb623a967efc9ea76c33a4f1afbdb";s:12:"tools_config";s:32:"8e3eb623a967efc9ea76c33a4f1afbdb";}s:17:"BackendComponents";a:1:{s:6:"States";a:2:{s:8:"Pagetree";O:8:"stdClass":1:{s:9:"stateHash";O:8:"stdClass":1:{s:3:"oot";i:1;}}s:19:"typo3-debug-console";O:8:"stdClass":1:{s:9:"collapsed";b:1;}}}s:11:"tx_recycler";a:2:{s:14:"depthSelection";i:0;s:14:"tableSelection";s:5:"pages";}s:14:"interfaceSetup";N;}
Actions #4

Updated by Gerrit Code Review almost 13 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8693

Actions #5

Updated by Gerrit Code Review almost 13 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8693

Actions #6

Updated by Gerrit Code Review almost 13 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8693

Actions #7

Updated by Gerrit Code Review almost 13 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8693

Actions #8

Updated by Gerrit Code Review over 12 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8693

Actions #9

Updated by Gerrit Code Review over 12 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8693

Actions #10

Updated by Gerrit Code Review over 12 years ago

Patch set 8 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8693

Actions #11

Updated by Gerrit Code Review over 12 years ago

Patch set 9 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8693

Actions #12

Updated by Gerrit Code Review over 12 years ago

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/12460

Actions #13

Updated by Gerrit Code Review over 12 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/12461

Actions #14

Updated by Susanne Moog over 12 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #15

Updated by Gerrit Code Review over 12 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/13166

Actions #16

Updated by Gerrit Code Review over 12 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/13278

Actions #17

Updated by Philipp Gampe over 11 years ago

  • Status changed from Under Review to Resolved

has been merged already, the last changesets are not public

Actions #18

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF