Bug #25045

Frontend editing is broken

Added by Jan Radecker over 2 years ago.

Status:New Start date:2011-02-15
Priority:Should have Due date:
Assignee:- % Done:

0%

Category:Communication
Target version:-
TYPO3 Version:4.5 Complexity:
PHP Version:5.2
Votes: 0

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)

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

Also available in: Atom PDF