[TYPO3-core] RFC #16308: Bug: have editIcons replace null with empty array
Susanne Moog
typo3 at susannemoog.de
Fri Nov 26 10:35:21 CET 2010
Hi,
On 08.11.2010 22:37, Daniel Müller - Team Webdesign und
Systemadministration wrote:
> This is an SVN patch request.
>
> Type: Bugfix
>
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=16308
>
> Branches:
> TYPO3_4-4 & stable
>
> Problem:
> It seems possible to set $conf to null via typoscript. When using
> frontend-editing this will break the page for the user editing.
>
> Solution:
> Do not let t3lib_frontendedit::displayEditIcons() assume $conf to be an
> array or convert a value of null to an empty array beforehand in
> editIcons (class.tslib_content.php). The fix is pretty much
> straightforward and should not break anything.
>
> Notes:
> I am sorry I can't provide the typoscript to reproduce this problem, but
> I noticed there are many function that check is_array($conf) before
> doing anything. I think tslib_cObj::editIcons() is another candidate to
> do this. I already noticed this in 4.3.3:
> http://bugs.typo3.org/view.php?id=15194
Steps to reproduce:
- Add this TS:
tt_content.image.20.editIcons >
tt_content.image.20.editIcons = tt_content:bodytext, rte_enabled
config.admPanel = 1
- Go to a page with a textpic on it.
- Click on "Editing" in the admin panel and see the fatal error
The problem is in this case that not all callers ensure that
$conf['editIcons.'] is set before calling the function. I think the
clean solution here is to fix the callers, see attached patch.
Best regards,
Susanne
--
What's worth the price is always worth the fight
Every second counts 'cause there's no second try
TYPO3 Core Team Member
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 16308_v2.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101126/0ae35785/attachment.asc>
More information about the TYPO3-team-core
mailing list