Project

General

Profile

Actions

Bug #25045

closed

Frontend editing is broken

Added by Jan Radecker almost 14 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-02-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Reproduce:
- Install frontend edit (feedit).
- Logon to backend
- In frontend, open admin panel and enable "Display edit panels"
- Klick on Icon "edit" in edit panel and you will get an error.

Oops, an error occured!
PHP Warning: in_array() [function.in-array]: Wrong datatype for second argument in /path/to/website/t3lib/class.t3lib_iconworks.php line 649

Problem:
The available CSS Icons are pre-cached in serialized form in a file inside the directory typo3temp/sprites/.
The spritemanager tries to load the cached file using t3lib_div::getFilesInDir() and fails.
The returned array from t3lib_div::getFilesInDir() is an associative array having md5 hashes as key and file/path as value.
The spritemanager tries to extract the filename from that array with list() but fails because list() only supports numeric keys in arrays.
There is a note about that in the php documentation (see http://php.net/list)

Solution:
The attached patch file changes the corresponding line to use array_shift() instead.

(issue imported from #M17600)


Files

feedit.patch (674 Bytes) feedit.patch Administrator Admin, 2011-02-15 16:26
Actions

Also available in: Atom PDF