[TYPO3-dam] PHP Warning for extended core method

Lorenz Ulrich lorenz-typo3 at visol.ch
Sun Mar 20 22:16:13 CET 2011


Hi Chetan

"$id: ID of the item"

A bit strange since we don't know the ID before it is created. I 
debugged it and found out that $id is always (int) 0 when creating a new 
folder. When deleting a folder, it was (string) 'NONE'.

I don't have time to find out if $id really is necessary somewhere in 
the depths of DAM, but I think defaulting it to false would be fine. Did 
you try it and did it work without any side-effects?


Best regards,


Lorenz


Am 28.02.2011 18:24, schrieb Chetan Thapliyal:
> TYPO3: 4.4.6
> DAM: 1.1.8
>
> Extension DAM extends the TYPO3 core class t3lib_extFileFunctions
> (t3lib/class.t3lib_extfilefunc.php) with
> /binding/tce/class.tx_dam_tce_extfilefunc.php. In one of the extended
> methods "func_newfolder" it adds a second parameter "$id". I am having
> the problem with some extensions that uses the original method
> signature. Since the new second parameter is not optional I am getting
> the following warning message in BE log.
>
>
> Core: Error handler (BE): PHP Warning: Missing argument 2 for
> ux_t3lib_extFileFunctions::func_newfolder(), called in ... on line xxx
> and defined in
> /.../typo3conf/ext/dam/binding/tce/class.tx_dam_tce_extfilefunc.php line
> 409
>
>
> My questions simply is what should be the value of $id in the context of
> function "func_newfolder". Sorry but this is not documented in the code.
>
> There is another function "func_upload" with same parameter, but default
> to false. Can we have the same for the method "func_newfolder" ? This
> way it would not affect the method calls with original signature.
>
> I checked the code in trunk as well but there is no change.
>
>
> Thanks,
> Chetan
>
>



More information about the TYPO3-project-dam mailing list