Project

General

Profile

Actions

Bug #22178

closed

Deprecated function sql_regcase in cms/tslib/class.tslib_pagegen.php

Added by Frank Buijze over 14 years ago. Updated about 6 years ago.

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

0%

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

Description

The function pagegenInit() in typo3/sysext/cms/tslib/class.tslib_pagegen.php is using the function sql_regcase() which is deprecated in PHP 5.3.

The default front-end search form is using this function. At least if a link in the result set is clicked.

Possible solution:

Add an additional function to replace sql_regcase:

function mb_sql_regcase($string,$encoding='auto'){
$max=mb_strlen($item,$encoding);
for ($i = 0; $i < $max; $i++) {
$char=mb_substr($item,$i,1,$encoding);
$up=mb_strtoupper ($char,$encoding);
$low=mb_strtolower($char,$encoding);
$ret.=($up!=$low)?'['.$up.$low.']' : $char;
}
return $ret;
}
?>

(issue imported from #M13649)


Files

patch_13649_1.diff (2.28 KB) patch_13649_1.diff Administrator Admin, 2010-05-07 17:09
patch_13649_2.diff (2.27 KB) patch_13649_2.diff Administrator Admin, 2010-06-25 13:45

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #21865: htmlmail: deprecated message with PHP 5.3 for sql_regcaseClosedChristian Kuhn2009-12-18

Actions
Has duplicate TYPO3 Core - Bug #21946: sql_regcase() deprecated with PHP 5.3.1ClosedChris topher2010-01-11

Actions
Actions #1

Updated by Philipp Gampe over 14 years ago

I can confirm this problem ...

sr_feuser_register uses this two

Actions #2

Updated by Christian Goudreau over 14 years ago

I can confirm this too...

Actions #3

Updated by Martin over 14 years ago

Hey,
the occurrence of depricated funktion is only on t3lib/class.t3lib_htmlmail.php and typo3/sysext/cms/tslib/class.tslib_pagegen.php

On file class.tslib_pagegen.php it is used for front-end search form only.
The intent is to produce a Regex with case insensitiv characters.

My proposal is to cut off additional functions for that case.
The patch #10231 / Revision 5574 replaced split() to preg_split() on class.tslib_content.php. Now we can use the regex-modifier on regex-pattern to achieve that.

My patch cut off sql_regcase() without adding an additional function.

Actions #4

Updated by Andreas over 14 years ago

what's with that patch? in SVN there is still no sight of that suggested change - so in php 5.3.x this typo3 classes still dont do there work. all the best!

Actions #5

Updated by Chris topher over 14 years ago

Hi Andreas,

you can post a reminder to the thread in Core List. People most likely won't see it here...

Actions #6

Updated by Andreas Lappe over 14 years ago

patch_2 works without offset against 4.4.0...

Actions #7

Updated by Steffen Kamper over 14 years ago

Committed to svn
4_3 rev 8293
4_4 rev 8294
trunk rev 8295

Actions #8

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF