Bug #21776
closed
fe_adminLib.inc crashes on 5.3 because usage of split()
Added by Steffen Kamper about 15 years ago.
Updated about 6 years ago.
Description
split is deprecated in php5.3 and throws an exception.
Solution:
use preg_split
(issue imported from #M12889)
Files
Where is this method preg_spliti documented?
function sendHTMLMail($content,$recipient,$dummy,$fromEmail,$fromName,$replyTo='') {
if (trim($recipient) && trim($content)) {
- $parts = spliti('<title>|</title>',$content,3);
+ $parts = preg_spliti('/<title>|</title>/', $content, 3);
$subject = trim($parts[1]) ? trim($parts[1]) : 'TYPO3 FE Admin message';
$Typo3_htmlmail = t3lib_div::makeInstance('t3lib_htmlmail');
or just replace with explode() if regexp arent needed
Beside of the spliti posted above, there are a few (4) other splits to replace:
-$cmdParts = split('\[|\]',$cmd);
+$cmdParts = preg_split('/\[|\]/', $cmd);
You mean occurences of split(), which are not in the diff file posted above?
If so, could you please post an updated patch here and on Core List?
Hi Chritopher,
no, the diff 12889.diff is OK!
Sorry, I misinterpreted the first comment of Franz Holzinger, as there was only one of the 5 occurances posted. I did not recognize the attached diff!
I attach a new patch that apply to current version, because there was a change with 4.4.3
no more while(list... but foreach() functions
Committed to
- trunk rev. 8933
- 4-4 rev. 8934
- 4-3 rev. 8935
- Status changed from Resolved to Closed
Also available in: Atom
PDF