Bug #22178

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

Added by Frank Buijze over 10 years ago. Updated over 1 year ago.

Should have
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


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'){
for ($i = 0; $i < $max; $i++) {
$up=mb_strtoupper ($char,$encoding);
$ret.=($up!=$low)?'['.$up.$low.']' : $char;
return $ret;

(issue imported from #M13649)

patch_13649_1.diff View (2.28 KB) Administrator Admin, 2010-05-07 17:09

patch_13649_2.diff View (2.27 KB) Administrator Admin, 2010-06-25 13:45

Related issues

Related to TYPO3 Core - Bug #21865: htmlmail: deprecated message with PHP 5.3 for sql_regcase Closed 2009-12-18
Duplicated by TYPO3 Core - Bug #21946: sql_regcase() deprecated with PHP 5.3.1 Closed 2010-01-11


#1 Updated by Philipp Gampe about 10 years ago

I can confirm this problem ...

sr_feuser_register uses this two

#2 Updated by Christian Goudreau about 10 years ago

I can confirm this too...

#3 Updated by Martin about 10 years ago

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.

#4 Updated by Andreas almost 10 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!

#5 Updated by Chris topher almost 10 years ago

Hi Andreas,

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

#6 Updated by Andreas Lappe almost 10 years ago

patch_2 works without offset against 4.4.0...

#7 Updated by Steffen Kamper almost 10 years ago

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

#8 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF