Bug #21776
closedfe_adminLib.inc crashes on 5.3 because usage of split()
0%
Description
split is deprecated in php5.3 and throws an exception.
Solution:
use preg_split
(issue imported from #M12889)
Files
Updated by Franz Holzinger over 14 years ago
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');
Updated by Fernando Arconada about 14 years ago
or just replace with explode() if regexp arent needed
Updated by Andreas Dörler about 14 years ago
Beside of the spliti posted above, there are a few (4) other splits to replace:
-$cmdParts = split('\[|\]',$cmd);
+$cmdParts = preg_split('/\[|\]/', $cmd);
Updated by Chris topher about 14 years ago
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?
Updated by Andreas Dörler about 14 years ago
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!
Updated by BIDAU almost 14 years ago
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
Updated by Steffen Gebert almost 14 years ago
Committed to
- trunk rev. 8933
- 4-4 rev. 8934
- 4-3 rev. 8935