Bug #46019
closed
htmlspecialchars in class.tslib_content.php
Added by Tomasz Krawczyk over 11 years ago.
Updated over 11 years ago.
Description
I have lots of such errors in my PHP error log:
[04-Mar-2013 06:35:49 UTC] PHP Warning: htmlspecialchars() expects parameter 1 to be string, array given in D:\Sites\www.mysite.pl\typo3_src\typo3\sysext\cms\tslib\class.tslib_content.php on line 5891
If I add this: var_dump($LD['target']); in line 5889 I can see this at the beginning of the output:
string(6) "_blank" string(6) "_blank" string(6) "_blank" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) ""
I noticet this on TYPO3 version 4.5.23, IIS 6.0, PHP 5.3.17, multidomain but single language. I see no other problems with this site. Can anyone help me?
Since this happens in one of the most widely used methods, namely typolink(), this can have a couple of root causes:
- Misused stdWrap on target in Typoscript
- Check if any extension is registered to the hook $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['linkData-PostProc']. If so, disable it and check again.
- Otherwise more or less any call to typolink() with a faulty configuration for the target may be the reason.
Could you ask questions in mailing lists (http://lists.typo3.org/)? Bug tracker is for bugs, not for questions.
Thank you!
- Status changed from New to Needs Feedback
I used TypoScript Analyzer to check all my TypoScript and didn't find any problems.
The only extension on my installation that uses this hook is RealUrl but I don't have such issue on another installations.
This error I can see in my log files since end of August. Since this time I updated TYPO3 a few times and I also updated 14 extensions.
It looks like it was my local problem. So, I will ask for help on the forum.
Thanks for hints and please close this bug.
- Status changed from Needs Feedback to Closed
Also available in: Atom
PDF