Project

General

Profile

Actions

Bug #21776

closed

fe_adminLib.inc crashes on 5.3 because usage of split()

Added by Steffen Kamper about 14 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2009-12-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

split is deprecated in php5.3 and throws an exception.

Solution:
use preg_split

(issue imported from #M12889)


Files

12889.diff (3.59 KB) 12889.diff Administrator Admin, 2009-12-02 16:45
12889_2.diff (2.67 KB) 12889_2.diff Administrator Admin, 2010-09-30 15:11

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #23656: More instances of split() (deprecated in PHP 5.3.0)ClosedSteffen Kamper2010-09-30

Actions
Related to TYPO3 Core - Task #32773: fe_adminLib.inc crashes on 5.3 because usage of preg_spliti()Closed

Actions
Actions #1

Updated by Franz Holzinger about 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');
Actions #2

Updated by Fernando Arconada over 13 years ago

or just replace with explode() if regexp arent needed

Actions #3

Updated by Andreas Dörler over 13 years ago

Beside of the spliti posted above, there are a few (4) other splits to replace:

-$cmdParts = split('\[|\]',$cmd);
+$cmdParts = preg_split('/\[|\]/', $cmd);

Actions #4

Updated by Chris topher over 13 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?

Actions #5

Updated by Andreas Dörler over 13 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!

Actions #6

Updated by BIDAU over 13 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

Actions #7

Updated by Steffen Gebert over 13 years ago

Committed to
- trunk rev. 8933
- 4-4 rev. 8934
- 4-3 rev. 8935

Actions #8

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF