[Typo3-dev] warnings with images in cvs

Michael Stucki mundaun at gmx.ch
Tue Apr 13 22:12:22 CEST 2004


Dear Lars,

> Warning: Bad arguments to implode() in
> /var/lib/typo3/cvs/TYPO3core/t3lib/class.t3lib_stdgraphic.php on line 1899

This is the line:
$md5Hash = md5 (implode('', file($fileName)));

Yeah, that's cause the function md5_file is not present in PHP < 4.2.0.

I don't know why Robert used the implode function here, I solved the problem
a bit different using fread(), see here:
http://typo3.org/1383.0.html?&tx_extrepmgm_pi1[mode]=99&tx_extrepmgm_pi
[showUid]=1519&tx_extrepmgm_pi1[cmd]=details&tx_extrepmgm_pi1[DATA
[showFile]=pi1%2Fclass.ux_t3lib_stdgraphic.php

But when looking at it now, I think this could be easily solved by simply
replacing the line like below:

before:
$md5Hash = md5 (implode('', file($fileName)));

after:
$md5Hash = md5 (readfile($fileName));

Please let me know if this works.

Cheers - michael
-- 
Want support? Please read the list rules first: http://typo3.org/1438.0.html




More information about the TYPO3-dev mailing list