[TYPO3-core] RFC: #15292: Bug: DB browser unusable

Alexandre Gravel-Raymond a.gravel-raymond at alienor.net
Thu Jul 29 19:11:15 CEST 2010


This is an SVN patch request.

Type: Bugfix

Bugtracker references:
http://bugs.typo3.org/view.php?id=15292

Branches: trunk, 4.4

Problem:
If you click on DB browser icon from, for example, the "db mount" field 
of a BE Group record, the usual page tree is replaced with the following 
error :
"t3lib_error_Exception
PHP Catchable Fatal Error: Argument 2 passed to 
t3lib_iconWorks::getSpriteIconForRecord() must be an array, null given, 
called in [...]/typo3/class.browse_links.php on line 1922 and defined in 
[...]/t3lib/class.t3lib_iconworks.php line 735"

Solution:
This was introduced by the patch to the bug 14880 that added array type 
hinting to the second argument of 
t3lib_iconWorks::getSpriteIconForRecord() method.
As no real record is found by the t3lib_BEfunc::getRecordWSOL() function 
called by browse_links::TBE_expandPage() when $this->expandPage = 0 (the 
root page - which is selected by default), a null value get passed to 
the method, hence the error.
Since the selectable icon is not needed for the root page, the suggested 
patch adds a condition that checks if a valid record was found before 
calling the getSpriteIconForRecord() method and related code.

Regards,

Alexandre Gravel-Raymond
Web developer, Alienor.net
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: class.browse_links.php.patch
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100729/cca9b7e6/attachment.asc>


More information about the TYPO3-team-core mailing list