[TYPO3-core] RFC: #7350:PHP5ize class.t3lib_div.php

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Sat Feb 2 11:07:55 CET 2008


Dmitry Dulepov [typo3] schrieb:
> Hi!
> 
> Stanislas Rolland wrote:
>> tslib_content fails:
>>
>> Catchable fatal error: Argument 1 passed to 
>> t3lib_div::implodeAttributes() must be an array, null given, called in 
>> /typo3/sysext/cms/tslib/class.tslib_content.php on line 4471
> 
> t3lib_div::get_tag_attributes did not work according to documentation. 
> Fix is attached. It may be sensitive, so I post here instead of 
> autocommitting.

Well, some code may not do a count() on th array in case they need it, 
but i agree that a function should either return a value or not. In case 
of error it may be eg FALSE. Returning an empty here array seems right.

I had a quick glance at tslib_content which expects an array (an turns 
an empty return value into an array itself).

But I found that class.t3lib_parsehtml.php and class.t3lib_htmlmail.php 
seems to have duplicates of this function.

+1, lets beautify this one.

Masi



More information about the TYPO3-team-core mailing list