[TYPO3-dam] foreach error in cc_meta_xmp

Dan Osipov dosipov at phillyburbs.com
Sat Nov 1 16:42:27 CET 2008


AFAIK, there are no plans to overtake cc_ extensions... Most of them 
work, so they're left as is - but in this case it would have to be fixed 
somehow.

Dan Osipov
Calkins Media
http://danosipov.com/blog/

Steffen Gebert wrote:
> Hi list,
> 
> I just set up a new test installation with DAM and found an error, i think i never got before in other tests. Nevertheless IMHO the error is quite obvious and occurs at uploading JPG-files (reproduced it with several files).
> 
> Warning: Invalid argument supplied for foreach() in /var/www/vhosts/dmm/typo3_src/t3lib/class.t3lib_cs.php on line 654
> 
> This is caused in tx_ccmetaxmp_sv1->postProcess() by calling 
> $csConvObj->convArray($this->out['fields'], 'utf-8', $this->conf['wantedCharset']);
> with $this->out['fields'] = null.
> 
> And this is caused by process() setting $this->out to array(), but not setting $this->out['fields'] to array(), too as cc_metaexif does!
> So if no XMP-data is found, it results in calling the foreach with null.
> Adding $this->out['fields'] = array() right after $this->out = array() in tx_ccmetaxmp_sv1->process() fixes this error.
> 
> But I don't know, why this error never appeared before. I think you can't reproduce it, right? It's IMHO to obvious to not find any postings for this anywhere. Could it depend on the order in which the indexing service extensions are installed?
> 
> Subtitle of this post: Are there any plans to overtake cc_* extensions to dam team? How do you handle your fixes to René's extensions?
> 
> Steffen


More information about the TYPO3-project-dam mailing list