Bug #22178

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

Added by Frank Buijze over 11 years ago. Updated over 2 years ago.

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


Estimated time:
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 (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

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

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


Updated by Philipp Gampe over 11 years ago

I can confirm this problem ...

sr_feuser_register uses this two


Updated by Christian Goudreau about 11 years ago

I can confirm this too...


Updated by Martin about 11 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.


Updated by Andreas almost 11 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!


Updated by Chris topher almost 11 years ago

Hi Andreas,

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


Updated by Andreas Lappe almost 11 years ago

patch_2 works without offset against 4.4.0...


Updated by Steffen Kamper almost 11 years ago

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


Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF